xuzifu666 commented on code in PR #4395:
URL: https://github.com/apache/calcite/pull/4395#discussion_r2101477170
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -9855,7 +9861,35 @@ private void checkLiteral2(String expression, String
expected) {
String query2 = "SELECT CAST(array[1,2,3] AS real multiset) FROM
\"employee\"";
sql(query2)
.withPhoenix().throws_("Phoenix dialect does not support cast to
MULTISET")
+ .withStarRocks().throws_("StarRocks dialect does not support cast to
MULTISET")
.withHive().throws_("Hive dialect does not support cast to MULTISET");
+
+ String query3 = "SELECT CAST(MAP[1.0,2.0,3.0,4.0] AS MAP<FLOAT, REAL>)
FROM \"employee\"";
+ String expectedStarRocks = "SELECT CAST(MAP { 1.0 : 2.0, 3.0 : 4.0 } AS
MAP< FLOAT, FLOAT >)\n"
+ + "FROM `foodmart`.`employee`";
+ sql(query3)
+ .withStarRocks()
+ .ok(expectedStarRocks);
+
+ String query4 = "SELECT CAST(MAP[1.0,MAP[3.0,4.0]]"
+ + " AS MAP<FLOAT, MAP<REAL, REAL>>)"
+ + " FROM \"employee\"";
+ String expectedStarRocks1 = "SELECT CAST(MAP { 1.0 : MAP { 3.0 : 4.0 } }"
+ + " AS MAP< FLOAT, MAP< FLOAT, FLOAT > >)\n"
+ + "FROM `foodmart`.`employee`";
+ sql(query4)
+ .withStarRocks()
+ .ok(expectedStarRocks1);
+
+ String query5 = "SELECT CAST(\"department_id\" AS float), "
Review Comment:
Had added simple case only involving DOUBLE、REAL、FLOAT types,do you mean
this case?@mihaibudiu
--
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]