LuciferYang commented on code in PR #38933:
URL: https://github.com/apache/spark/pull/38933#discussion_r1040616970
##########
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVectorUtils.java:
##########
@@ -165,7 +171,17 @@ private static void appendValue(WritableColumnVector dst,
DataType t, Object o)
dst.getChild(1).appendInt(c.days);
dst.getChild(2).appendLong(c.microseconds);
} else if (t instanceof DateType) {
- dst.appendInt(DateTimeUtils.fromJavaDate((Date)o));
+ if (o instanceof Date) {
Review Comment:
@cloud-fan As I mentioned at
https://github.com/apache/spark/pull/38873#discussion_r1039618680
`ColumnVectorUtils#toBatch` and related `appendValue` methods only used by
test cases:
1. this pr add more primitive dataType support for `toBatch` method and add
more test in `ColumnarBatchSuite#testRandomRows`, do you think this is
valuable? I haven't created Jira.
2. `ColumnVectorUtils#toBatch` only used by test, should we move it from
`ColumnVectorUtils` to a test only helper class?
--
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]