Peng-Lei commented on a change in pull request #32340:
URL: https://github.com/apache/spark/pull/32340#discussion_r620035435
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/vectorized/ArrowColumnVector.java
##########
@@ -508,4 +516,39 @@ final ColumnarMap getMap(int rowId) {
super(vector);
}
}
+
+ private static class IntervalYearAccessor extends ArrowVectorAccessor {
+
+ private final IntervalYearVector accessor;
+
+ IntervalYearAccessor(IntervalYearVector vector) {
+ super(vector);
+ this.accessor = vector;
+ }
+
+ @Override
+ int getInt(int rowId) {
+ int months = accessor.get(rowId);
+ return months;
+ }
+ }
+
+ private static class IntervalDayAccessor extends ArrowVectorAccessor {
+
+ private final IntervalDayVector accessor;
+ private final NullableIntervalDayHolder intervalDayHolder = new
NullableIntervalDayHolder();
+
+ IntervalDayAccessor(IntervalDayVector vector) {
+ super(vector);
+ this.accessor = vector;
+ }
+
+ @Override
+ long getLong(int rowId) {
+ accessor.get(rowId, intervalDayHolder);
+ final long microseconds = intervalDayHolder.days * MICROS_PER_DAY
+ + (long)intervalDayHolder.milliseconds *
MICROS_PER_MILLIS;
Review comment:
resolved,Thanks very much
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]