xtern commented on code in PR #1734:
URL: https://github.com/apache/ignite-3/pull/1734#discussion_r1122787553
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItUuidTest.java:
##########
@@ -265,4 +266,22 @@ private void checkUuidComparison(Object uuid1, Object
uuid2) {
assertQuery("SELECT ? < ?").withParams(uuid1,
uuid2).returns(false).check();
assertQuery("SELECT ? <= ?").withParams(uuid1,
uuid2).returns(false).check();
}
+
+ @Test
+ public void testRandomUuid() {
+ assertQuery("INSERT INTO t SELECT x, RAND_UUID(), RAND_UUID() FROM
TABLE(SYSTEM_RANGE(0, 99))").returns(100L).check();
+ assertQuery("SELECT uuid_key FROM t").columnTypes(UUID.class).check();
+ assertQuery("SELECT COUNT(*) FROM t WHERE uuid_key =
uuid_key2").returns(0L).check();
+ assertQuery("SELECT COUNT(*) FROM t WHERE uuid_key =
RAND_UUID()").returns(0L).check();
+ assertQuery("SELECT COUNT(*) FROM t WHERE uuid_key !=
uuid_key2").returns(100L).check();
+ }
+
+ @Test
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-18931")
+ public void testRandomUuidComparison() {
+ assertQuery("SELECT RAND_UUID() = RAND_UUID()").returns(false).check();
+ assertQuery("SELECT RAND_UUID() != RAND_UUID()").returns(true).check();
+ assertQuery("SELECT RAND_UUID() >= RAND_UUID()").returns(true).check();
+ assertQuery("SELECT RAND_UUID() <= RAND_UUID()").returns(true).check();
Review Comment:
Thanks, I just wanted to add checks that ">=" and "<=" comparisons would be
correctly optimized, but the tests themselves are wrong, so I removed them.
--
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]