alex-plekhanov commented on code in PR #12037:
URL: https://github.com/apache/ignite/pull/12037#discussion_r2113603799


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/sql/SqlReservedWordsTest.java:
##########
@@ -38,6 +38,7 @@ public class SqlReservedWordsTest extends 
GridCommonAbstractTest {
         "ANY",
         "ARRAY",
         "AS",
+        "ASOF",

Review Comment:
   We don't use these words, why they are reserved? Let's reserve only used 
words.



##########
modules/calcite/src/test/sql/function/numeric/test_invalid_math.test:
##########
@@ -7,13 +7,17 @@ SELECT SQRT(-1), SQRT(0)
 ----
 NaN    0.000000
 
-query RRRR
-SELECT LN(-1), LN(0), LOG10(-1), LOG10(0)
-----
-NaN
--Infinity
-NaN
--Infinity
+statement error
+SELECT LN(-1)
+
+statement error
+SELECT LN(0)
+
+statement error
+SELECT LOG10(-1)
+
+statement error
+SELECT LOG10(0)

Review Comment:
   Looks weird. Why other math function produces NaN and Infinity, but 
logarithm throws an error?



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/IgniteSqlFunctions.java:
##########
@@ -72,6 +77,16 @@ public static String toString(BigDecimal x) {
         return x == null ? null : x.toPlainString();
     }
 
+    /** Keeps casting like in v1.37 and Postgres. Example: 2::FLOAT is "2", 
not "2.0". */
+    public static String toString(double x) {

Review Comment:
   Why only for double but not for float?
   Maybe it's better to change tests?



##########
modules/calcite/src/test/sql/join/inner/join_cross_product.test:
##########
@@ -35,5 +35,8 @@ select * from t1 join t2 on (i=j), t3 join t4 on (k=l) order 
by 1, 2, 3, 4;
 1      1       2       2
 1      1       3       3
 
-statement error
+query IIII
 select * from t1 join t2 on (i=j), t3 join t4 on (i+k=j+l)

Review Comment:
   Locally this test throws an error. Why it was uncommented?



##########
modules/calcite/src/test/sql/types/collections/array_agg.test:
##########
@@ -60,25 +60,4 @@ query T
 SELECT ARRAY_AGG(b ORDER BY b) as c FROM T1 GROUP BY a ORDER BY a
 ----
 [10, 22]
-[21]
-
-query T
-SELECT ARRAY_AGG(b ORDER BY c) as c FROM T1 GROUP BY a ORDER BY a
-----
-[22, 10]
-[21]
-
-query T
-SELECT ARRAY_CONCAT_AGG(a) FROM (SELECT 1 as id, ARRAY[1, 2, 3] as a UNION 
SELECT 1 as id, ARRAY[4, 5, 6] as a) GROUP BY id
-----
-[1, 2, 3, 4, 5, 6]
-
-query T
-SELECT ARRAY_CONCAT_AGG(a ORDER BY rate DESC) FROM (SELECT 1 as id, ARRAY[10, 
2, 24] as a, 2 as rate UNION SELECT 1 as id, ARRAY[4, 5, 2] as a, 1 as rate) 
GROUP BY id
-----
-[10, 2, 24, 4, 5, 2]
-
-query T
-SELECT ARRAY_CONCAT_AGG(a ORDER BY CARDINALITY(a)) FROM (SELECT 1 as id, 
ARRAY[3, 7, 2, 5] as a UNION SELECT 1 as id, ARRAY[2, 0] as a) GROUP BY id
-----
-[2, 0, 3, 7, 2, 5]

Review Comment:
   Why these queries were deleted?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to