luoyuxia commented on code in PR #1441:
URL: https://github.com/apache/fluss/pull/1441#discussion_r2286845134


##########
fluss-lake/fluss-lake-lance/src/main/java/com/alibaba/fluss/lake/lance/utils/LanceArrowUtils.java:
##########
@@ -187,4 +222,66 @@ protected ArrowType defaultMethod(DataType dataType) {
                             "Unsupported data type %s currently.", 
dataType.asSummaryString()));
         }
     }
+
+    private static int getPrecision(DecimalVector decimalVector) {
+        int precision = -1;
+        try {
+            java.lang.reflect.Field precisionField =
+                    decimalVector.getClass().getDeclaredField("precision");
+            precisionField.setAccessible(true);
+            precision = (int) precisionField.get(decimalVector);

Review Comment:
   It's copied from Flink code base, it's because that Flink uses an old 
version of arrow which don't expose getPrecision. But I think we don't need to 
use reflection in 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