[
https://issues.apache.org/jira/browse/HIVE-29760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098802#comment-18098802
]
Ruben Q L edited comment on HIVE-29760 at 7/24/26 9:07 AM:
-----------------------------------------------------------
I'd say arguably simpler, in the sense that we have the same expression with a
single operator (without any logical operator combining several expressions).
Similar to what happens already in the same transformer with:
- NOT EQUALS: x <>0 ; instead of x < 0 OR x > 0
- BETWEEN: x BETWEEN 10 20; instead of x >= 10 AND x <= 20
Also, this change would remove the "test plan change nº 12" observed in
https://github.com/apache/hive/pull/6523 after a Calcite upgrade.
was (Author: rubenql):
I'd say arguably simpler, in the sense that we have the same expression with a
single operator (without any logical operator combining several expressions).
Similar to what happens already in the same transformer with:
- NOT EQUALS: x <>0 ; instead of x < 0 OR x > 0
- BETWEEN: x BETWEEN 10 20; instead of x >= 10 AND x <= 20
Also, this change would remove the "test plan change nº 12" observed in
https://github.com/apache/hive/pull/6523
> Improve SEARCH expansion to exploit NOT_BETWEEN operator
> --------------------------------------------------------
>
> Key: HIVE-29760
> URL: https://issues.apache.org/jira/browse/HIVE-29760
> Project: Hive
> Issue Type: Task
> Reporter: Ruben Q L
> Assignee: Ruben Q L
> Priority: Major
> Labels: pull-request-available
>
> Improve SEARCH expansion to exploit NOT_BETWEEN operator.
> Currently a search range like "{{{}(-INF, 10), (20, INF)"{}}} is expanded as:
> {noformat}
> x < 10 OR x > 20
> {noformat}
> But we could simplify the expression by using NOT_BETWEEN (i.e. Hive.BETWEEN
> operator with inverse flag enabled):
> {noformat}
> x NOT BETWEEN 10, 20
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)