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
ReplaceMissingFieldWithNull local logical optimization rule replaces expressions with a NULL Literal when a field is not mapped on local node.
This is dangerous because a Literal could not match the type of the expressions that are being replaced (eg. if the command expects a NamedExpression like in this case), and it can trigger a ClassCastException.
With current feature set this optimization is safe, but we could miss the problem when we add new commands.
Notice that this optimization triggers a few other downstream optimizations that can be quite important, see LocalLogicalPlanOptimizerTests.testMissingField*
The text was updated successfully, but these errors were encountered:
IMO this is a bug, so I marked this accordingly. This piece of code performs a wild, unchecked cast without any safeguards; this is bound to break again in the future, especially since we plan to add new logical plan nodes (and evolve existing ones).
ReplaceMissingFieldWithNull local logical optimization rule replaces expressions with a NULL
Literal
when a field is not mapped on local node.This is dangerous because a
Literal
could not match the type of the expressions that are being replaced (eg. if the command expects aNamedExpression
like in this case), and it can trigger a ClassCastException.With current feature set this optimization is safe, but we could miss the problem when we add new commands.
Notice that this optimization triggers a few other downstream optimizations that can be quite important, see
LocalLogicalPlanOptimizerTests.testMissingField*
The text was updated successfully, but these errors were encountered: