alex-plekhanov commented on a change in pull request #9826:
URL: https://github.com/apache/ignite/pull/9826#discussion_r827719650



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/agg/Accumulators.java
##########
@@ -81,16 +82,15 @@
     /** */
     private static Supplier<Accumulator> avgFactory(AggregateCall call) {
         switch (call.type.getSqlTypeName()) {
+            case ANY:
+                throw new UnsupportedOperationException("AVG() is not 
supported for UUID type.");

Review comment:
       Let's remove `UUID` from message too.

##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/agg/Accumulators.java
##########
@@ -123,6 +122,9 @@
     /** */
     private static Supplier<Accumulator> sumEmptyIsZeroFactory(AggregateCall 
call) {
         switch (call.type.getSqlTypeName()) {
+            case ANY:
+                throw new UnsupportedOperationException("SUM() is not 
supported for UUID type.");

Review comment:
       Let's remove `UUID` from message too.

##########
File path: 
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/DataTypesTest.java
##########
@@ -98,10 +103,13 @@ private void testUuid(boolean indexed) {
                 .returns(2, uuid2.toString(), uuid2)
                 .check();
 
-            assertQuery("SELECT t1.* from t t1, (select * from t) t2 where 
t1.uid = t2.uid")
-                .returns(1, "fd10556e-fc27-4a99-b5e4-89b8344cb3ce", uuid1)
-                .returns(2, uuid2.toString(), uuid2)
-                .check();
+            // TODO: IGNITE-16693 - Skip merge join. Incorrect processing of 
null values.

Review comment:
       Full link to ticket, let's add a hint to disable merge join.

##########
File path: 
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/DataTypesTest.java
##########
@@ -59,13 +59,17 @@ private void testUuid(boolean indexed) {
             UUID max = uuid1.compareTo(uuid2) > 0 ? uuid1 : uuid2;
             UUID min = max == uuid1 ? uuid2 : uuid1;
 
+            executeSql("SELECT COUNT(*), COUNT(DISTINCT uid) FROM (SELECT uid 
from t) GROUP BY uid");

Review comment:
       Some checks should be added

##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/agg/Accumulators.java
##########
@@ -99,6 +99,9 @@
     /** */
     private static Supplier<Accumulator> sumFactory(AggregateCall call) {
         switch (call.type.getSqlTypeName()) {
+            case ANY:
+                throw new UnsupportedOperationException("SUM() is not 
supported for UUID type.");

Review comment:
       Let's remove `UUID` from message too.




-- 
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]


Reply via email to