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
We can reversely build the casting map from src/frontend/src/expr/type_inference/cast.rs CAST_MAP like what we did for the functions table. Then we can randomly choose a viable cast in gen_expr.
The reverse expr building path:
First we know exactly the select item's returning type.
Use gen_expr to randomly select an expr that will return the target type. At a certain probability, it tries to generate cast.
Reversely find the source type that is able to cast to the target type, according to the cast map.
Generate the cast.
Additionally, the non-viable castings are also needed to test. For example, SELECT bool 'test'. We will now fail on this SQL.
We can reversely build the casting map from src/frontend/src/expr/type_inference/cast.rs
CAST_MAP
like what we did for the functions table. Then we can randomly choose a viable cast ingen_expr
.The reverse expr building path:
gen_expr
to randomly select an expr that will return the target type. At a certain probability, it tries to generatecast
.Additionally, the non-viable castings are also needed to test. For example,
SELECT bool 'test'
. We will now fail on this SQL.The text was updated successfully, but these errors were encountered: