abhishekrb19 commented on PR #16288: URL: https://github.com/apache/druid/pull/16288#issuecomment-2067520196
Thanks for the review, @LakshSingla! > I have an overarching question, regarding the <, >, <=, >= filters. I think it would be easier if we have the type as "predicate", a predicate field like ">" and then the LHS and RHS for the predicate, rather than having a separate type for each, since that resembles closely to what we want to do. Yeah, the Delta Kernel [API](https://docs.delta.io/3.0.0/api/java/kernel/io/delta/kernel/expressions/Predicate.html) considers all the expressions, including `AND`, `OR`, as a Predicate type. So I think it'd make sense to treat user-facing filters as one common entity that can be translated one-to-one into an underlying Delta `Predicate`, rather than breaking them up into their own Filter and Predicate classes. Added javadocs to sort of reflect the intent. Let me know if that clarifies things. > is there a way to write something like the following, without extra effort from the developer to convert it to its normal form? !(col1 > col2 && col3 < col4) Yes, that should be possible! Please see the unit test `DeltaNotFilterTest.testNotFilterWithAndExpression()`. Related, I plan to add recursive flattening of the `AND`, `OR` filters to support complex filter expressions in a follow up. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
