slinkydeveloper opened a new pull request #19001:
URL: https://github.com/apache/flink/pull/19001


   ## What is the purpose of the change
   
   This PR implements the `SEARCH` operator in the codegen, and removes the 
scalar implementation of `IN` and `NOT_IN`. Now every scalar `IN`/`NOT_IN` 
using a constant set is implemented through `SEARCH` (following Calcite's 
development on the topic https://issues.apache.org/jira/browse/CALCITE-4173) 
and plans will only have `SEARCH`
   
   ## Brief change log
   
   * Remove `NOT_IN` from the plans, which was added only by the 
`ConvertToNotInOrInRule`. With this commit every scalar `IN`/`NOT_IN` using a 
constant set is converted to `SEARCH`, otherwise it's converted to a chain of 
disjunctions (see `RexUtil#expandSearch`)
   * `ScalarOperatorGens#generateLiteral` is a bit more flexible now and it 
understands the `Comparable` type system by Calcite, which is the 
representation of the values in `RexLiteral`.
   * Add `SearchOperatorGen` to implement the `SEARCH` operator starting from 
the previous `generateIn` function in `ScalarOperatorGens`.
   
   ## Verifying this change
   
   Existing code is already testing thoroughly IN/NOT_IN. I added an additional 
test for the plan
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
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]


Reply via email to