Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: Separate ProcessDefinition and ScriptTemplate from functions #33975

Closed
costin opened this issue Sep 23, 2018 · 1 comment
Closed

SQL: Separate ProcessDefinition and ScriptTemplate from functions #33975

costin opened this issue Sep 23, 2018 · 1 comment

Comments

@costin
Copy link
Member

costin commented Sep 23, 2018

When first introduced, ProcessDefinition and ScriptTemplate were part of ScalarFunction however the concept proved to me much more generic.
For example arithmetic operators were transformed into functions (despite not being one); the same situation needs to be applied with the rest of the operators, namely the comparison and some predicates (Like/RLike).
In fact, most (if not all) expressions require these as they can appear both on the invoking node and inside a script.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

costin added a commit to costin/elasticsearch that referenced this issue Sep 26, 2018
Rename ProcessDefinition to Pipe
Add asScript / asPipe onto Expression (might be pushed further down)
Add ScriptWeaver as a mixin-in interface for script customization
Add logic for equals/lte/lt
Improve BinaryOperator/expression toString
Minimize duplication across string functions

Close elastic#33975
costin added a commit that referenced this issue Sep 27, 2018
Centralize and simplify the script generation between operators and functions which are currently decoupled. As part of this process most predicates (<, <=, etc...) were made ScalarFunction as their purpose and functionality is quite similar (see % and MOD functions).
Renamed ProcessDefinition to Pipe
Add ScriptWeaver as a mixin-in interface for script customization
Add logic for equals/lte/lt
Improve BinaryOperator/expression toString
Minimize duplication across string functions

Close #33975
costin added a commit that referenced this issue Sep 27, 2018
Centralize and simplify the script generation between operators and functions which are currently decoupled. As part of this process most predicates (<, <=, etc...) were made ScalarFunction as their purpose and functionality is quite similar (see % and MOD functions).
Renamed ProcessDefinition to Pipe
Add ScriptWeaver as a mixin-in interface for script customization
Add logic for equals/lte/lt
Improve BinaryOperator/expression toString
Minimize duplication across string functions

Close #33975

(cherry picked from commit 15515a6)
kcm pushed a commit that referenced this issue Oct 30, 2018
Centralize and simplify the script generation between operators and functions which are currently decoupled. As part of this process most predicates (<, <=, etc...) were made ScalarFunction as their purpose and functionality is quite similar (see % and MOD functions).
Renamed ProcessDefinition to Pipe
Add ScriptWeaver as a mixin-in interface for script customization
Add logic for equals/lte/lt
Improve BinaryOperator/expression toString
Minimize duplication across string functions

Close #33975
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants