elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.6k stars 8.21k forks source link

[ES|QL] Improve arithmetic unary expression nodes #189258

Open vadimkibana opened 3 months ago

vadimkibana commented 3 months ago

For unary arithmetic expressions, say -column, the constructed AST is modified to create a binary expression where column is multiplied by -1. So, -column is transformed to -1 * column. Instead we should just create a unary expression function call node. We are already doing that for NOT unary expressions, like NOT column.

elasticmachine commented 3 months ago

Pinging @elastic/kibana-esql (Team:ESQL)