jinchengchenghh commented on code in PR #5763:
URL: https://github.com/apache/incubator-gluten/pull/5763#discussion_r1616437020


##########
gluten-core/src/main/java/org/apache/gluten/substrait/expression/BinaryLiteralNode.java:
##########
@@ -33,6 +36,14 @@ public BinaryLiteralNode(byte[] value, TypeNode typeNode) {
 
   @Override
   protected void updateLiteralBuilder(Builder literalBuilder, byte[] value) {
-    literalBuilder.setBinary(ByteString.copyFrom(value));
+    ByteString byteValue;
+    try {
+      Method m = ByteString.class.getDeclaredMethod("wrap", byte[].class);
+      m.setAccessible(true);
+      byteValue = (ByteString) m.invoke(null, value);
+    } catch (NoSuchMethodException | InvocationTargetException | 
IllegalAccessException e) {
+      throw new RuntimeException(e);
+    }
+    literalBuilder.setBinary(byteValue);

Review Comment:
   These exceptions only occur when the code is wrong, so we should not hide 
the exception



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