luis4a0 commented on code in PR #13103:
URL: https://github.com/apache/gluten/pull/13103#discussion_r4283474280


##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -127,6 +127,19 @@ bool SubstraitToVeloxPlanValidator::validateRound(
     return false;
   }
 
+  const auto& valueType = params[0]->type();
+  if (valueType->isDecimal()) {
+    const auto& scale = arguments[1].value().literal();
+    if (scale.has_null() && scale.null().has_i32()) {
+      return true;
+    }
+    if (scale.has_i32() && scale.i32() >= -400 && scale.i32() <= 400) {
+      return true;
+    }
+    LOG_VALIDATION_MSG("Decimal ROUND requires an INTEGER scale in [-400, 400] 
or NULL.");
+    return false;
+  }

Review Comment:
   The same verified private-helper invariant applies here as in 
https://github.com/apache/gluten/pull/13282#discussion_r4281934039 . The sole 
caller creates one non-null converted expression per argument and dispatches 
only after the loop succeeds; failed validation returns early and conversion 
errors throw. The existing argument-count guard therefore also protects the 
aligned parameter vector. This precondition is documented at the helper 
declaration. The decimal caller is visible at 
https://github.com/apache/gluten/blob/28d77cb4ddd683c1f48059d84d6f876350cffc11/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc#L205-L229
 . No additional reachable failure path is identified by this repeated warning.



##########
ep/build-velox/src/get-velox.sh:
##########
@@ -25,7 +25,7 @@ RUN_SETUP_SCRIPT=ON
 ENABLE_ENHANCED_FEATURES=OFF
 
 # Developer use only for testing Velox PR.
-UPSTREAM_VELOX_PR_ID=""
+UPSTREAM_VELOX_PR_ID="19141"

Review Comment:
   Tracked by the original dependency/merge-gate thread: 
https://github.com/apache/gluten/pull/13103#discussion_r4269051542 . This 
validation revision deliberately tests the unmerged upstream change as 
requested; before merging, a qualified normal dependency must contain the fix 
and the hook must return to its empty default. Closing this duplicate only. The 
original dependency gate remains open.



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