HIVE-29765: HiveBetween#unparse ignores negated flag - #6637
Conversation
ayushtkn
left a comment
There was a problem hiding this comment.
Does it lead to any query level failure or so? If so can we extend a test?
|
@ayushtkn it seems this was untested, I will prepare a test |
|
@ayushtkn I included a new unit test, could you please take another look? |
|
@rubenada why are we going with Junit style test, can't we we have a q file test? |
|
@ayushtkn it was simpler. It seems in practice the "NOT BETWEEN" operator is currently not generated in the intermediate planner conversions (that's probably why this bug went under the radar). |
|
soumyakanti3578
left a comment
There was a problem hiding this comment.
LGTM. +1 pending tests.
zabetak
left a comment
There was a problem hiding this comment.
LGTM!
There is one test failure on the CI run but has to do with container startup so unrelated to the changes here.
Testing / split-08 / PostProcess / testCliDriver[iceberg_rest_catalog_gravitino] – org.apache.hadoop.hive.cli.TestIcebergRESTCatalogGravitinoLlapLocalCliDriver
Error
Container startup failed for image apache/ozone:2.1.0
Stacktrace
org.testcontainers.containers.ContainerLaunchException: Container startup failed for image apache/ozone:2.1.0
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:351)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
at org.apache.hadoop.hive.cli.OzoneS3GatewayContainers.startS3g(OzoneS3GatewayContainers.java:194)
at org.apache.hadoop.hive.cli.OzoneS3GatewayContainers.start(OzoneS3GatewayContainers.java:77)
at org.apache.hadoop.hive.cli.TestIcebergRESTCatalogGravitinoLlapLocalCliDriver.setup(TestIcebergRESTCatalogGravitinoLlapLocalCliDriver.java:130)



What changes were proposed in this pull request?
HiveBetween#unparse will consider the negated flag.
Why are the changes needed?
Fix the unparse of NOT BETWEEN.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New unit test added.