ArnavBalyan commented on code in PR #9560:
URL: https://github.com/apache/incubator-gluten/pull/9560#discussion_r2079469299


##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -133,10 +133,22 @@ bool SubstraitToVeloxPlanValidator::validateRound(
   // Velox has different result with Spark on negative scale.
   auto typeCase = arguments[1].value().literal().literal_type_case();
   switch (typeCase) {
-    case ::substrait::Expression_Literal::LiteralTypeCase::kI32:
-      return (arguments[1].value().literal().i32() >= 0);
-    case ::substrait::Expression_Literal::LiteralTypeCase::kI64:
-      return (arguments[1].value().literal().i64() >= 0);
+    case ::substrait::Expression_Literal::LiteralTypeCase::kI32: {
+      int32_t value = arguments[1].value().literal().i32();
+      if (value < 0) {
+        LOG_VALIDATION_MSG("Round scale validation failed: value " + 
std::to_string(value) + " is negative.");

Review Comment:
   nit: can we mention int 32 in the message



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to