You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this task is to enable a simple query pushdown for querier that looks like {_id: <ObjectID>}.
Only that field name (_id) is supported, and only that value type (ObjectID).
In the future, we will add support for other fields (starting with simple scalar fields),
other values (starting with strings, numbers, and other simple scalar values),
other conditions like {_id: <ObjectID>, field: value} (so only the first part is pushed down).
Tigris
Support tables where the primary key is only one field.
The tjson package ensures that primary key is always ["_id"] and always 1 length.
So no need to check:
it's not necessary to get the schema description to check Primary Key fields and it's count.
if len(schema.PrimaryKey) > 1 raise error.
because user expects single one value in _id.
to comply and be compatible with MongoDB.
if len(schema.PrimaryKey) == 0 raise error.
But need to check if valaue type if not ObjectID (raise error in that case).
Proof of concept for a {_id: <ObjectID>} pushdown query, Tigris, see example.
Integration tests.
Provide a new test flag that enables a query pushdown.
Run with and without flag: results must be the same.
When explain feature will be ready, compare the query plan.
The goal of this task is to enable a simple query pushdown for querier that looks like
{_id: <ObjectID>}
.Only that field name (
_id
) is supported, and only that value type (ObjectID
).In the future, we will add support for other fields (starting with simple scalar fields),
other values (starting with strings, numbers, and other simple scalar values),
other conditions like
{_id: <ObjectID>, field: value}
(so only the first part is pushed down).Tigris
Support tables where the primary key is only one field.
The tjson package ensures that primary key is always
["_id"]
and always 1 length.So no need to check:
len(schema.PrimaryKey) > 1
raise error._id
.len(schema.PrimaryKey) == 0
raise error.But need to check if valaue type if not
ObjectID
(raise error in that case).Proof of concept for a
{_id: <ObjectID>}
pushdown query, Tigris, see example.Test
Integration tests.
Provide a new test flag that enables a query pushdown.
Run with and without flag: results must be the same.
When explain feature will be ready, compare the query plan.
Links
Issue analysis: #847
The text was updated successfully, but these errors were encountered: