-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When a user provides a spec-based index hint on a viewless timeseries collection, translateIndexHintIfRequiredImpl attempts to translate the hint from logical to bucket format via createBucketsIndexSpecFromTimeseriesIndexSpec. For btree specs (numeric values like 1/-1), the translation proceeds and the
resulting double-prefixed spec (control.min.control.min.x) doesn't match any index, so the hint is correctly rejected with BadValue.
However, for non-numeric index types like "hashed", the translation fails with BadValue at the !elem.isNumber() check in createBucketsIndexSpecFromTimeseriesIndexSpec. The calling code in translateIndexHintIfRequiredImpl silently passes the hint through unchanged when translation fails. This allows the
untranslated bucket-level spec to reach the planner, where it matches the bucket-level index directly.
This is inconsistent: {"control.min.x": 1} is rejected as a hint, but {"control.min.x": "hashed"} is accepted. Both are bucket-level specs that shouldn't be usable as hints on the logical namespace. The same issue would apply to any non-numeric index type string (e.g., "text", "2d").