leonardBang commented on code in PR #1441:
URL: https://github.com/apache/fluss/pull/1441#discussion_r2282083654
##########
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:
I still did't get the reason why we need to use reflection in our code base,
I guess some lower version of Arrow doesn't expose `getter` method and use
reflection to achieve the compatibility, but I'm not sure now.
--
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]