Handle Pinot Project Expressions - SWITCH#17800
Conversation
|
@xiangfu0 let me know your thoughts when you get a chance |
xiangfu0
left a comment
There was a problem hiding this comment.
Overall LGTM!
Some generated query details should be tested for pinot syntax, mostly negation and not equal.
...t-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotProjectExpressionConverter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pinot uses != for not equal, you may need to convert it when generating a pinot query.
Or you can use the map to make it generic just like this PRESTO_TO_PINOT_OPERATORS.
There was a problem hiding this comment.
my understanding here is that based on the calcite spec, <> and != are both okay with != permissible based on the level of conformance, which is currently at BABEL. Tested <> and this runs well, so curious where this is defined internally?
There was a problem hiding this comment.
can you give some examples/test cases for these negation cases?
Will the negation sign just work or the NOT statement is required?
There was a problem hiding this comment.
these in particular are for arithmetic expressions, so we wouldn't go down this path for an expression with a NOT statement.
|
@NikhilCollooru can you take a look at this when you get a chance? Thanks! |
highker
left a comment
There was a problem hiding this comment.
could you squash two commits into one?
...ot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotFilterExpressionConverter.java
Outdated
Show resolved
Hide resolved
...ot-toolkit/src/main/java/com/facebook/presto/pinot/query/PinotFilterExpressionConverter.java
Outdated
Show resolved
Hide resolved
98aa061 to
a5d1995
Compare
|
@highker let me know if there are any other concerns, thanks! |
|
Test failure is related |
|
Could squash all commits into one? |
- handle SWITCH statement pushdown - add additional pushdown operators - properly handle negation
17563bb to
8780d49
Compare
Support Presto switch statement pushdown to Pinot. The motivation for this is to allow for less data transfer when working with multicolumn projections like CASE statements, other functionality, and leading up to supporting COALESCE once NULL can be properly handled.
Enable this feature by setting
pinot.pushdown_project_expressions=trueTest plan