Soumyadeep-github commented on code in PR #5027:
URL: https://github.com/apache/calcite/pull/5027#discussion_r3441149354


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -6617,31 +6617,31 @@ private void checkLiteral2(String expression, String 
expected) {
         + "UNION ALL\n"
         + "SELECT NULL) END AS `$f0`\n"
         + "FROM `foodmart`.`product`) AS `t0` ON TRUE\n"
-        + "WHERE `product`.`net_weight` > CAST(`t0`.`$f0` AS DOUBLE)";
+        + "WHERE `product`.`net_weight` > CAST(CAST(`t0`.`$f0` AS SIGNED) AS 
DOUBLE)";

Review Comment:
   Thanks for taking the time to review my changes! Agreed that we should not 
rely on later cast cleanup. I’ll go through the changed casts and drop any that 
aren’t needed for correctness.
   
   For the `CAST(CAST($f0 AS …) AS DOUBLE)` case in RelToSqlConverterTest: I’ll 
trace where each cast is introduced and try to simplify to a single cast (or 
align types earlier) if semantics stay the same; if two steps are still 
required I’ll note why in a short comment or reply here.



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