feat(interactive): Support implicit type conversion for vertex index scan #3418
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For Interactive compute engine, we need to provide the ability for implicit type conversion in predicate. (The only scenario where the type conversion may happen).
For most of the predicates, we convert it to a c++ expression, and the implicit conversion if down by C++ compiler. For example.
will be convert into an expression
However, when the query perform index scan for the vertex, we use indices for faster scan.
will be compiled to
Which will cause runtime error.
So, In this PR, we enable
id_indexer
support implicit type conversion between currently supported primary keys:Note that conversion between String and other type are not supported, since compiler will throw the error before compiling to a physical plan.