jonvex commented on code in PR #12283:
URL: https://github.com/apache/hudi/pull/12283#discussion_r1850598408
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HiveHoodieReaderContext.java:
##########
@@ -265,10 +266,10 @@ public UnaryOperator<ArrayWritable> projectRecord(Schema
from, Schema to, Map<St
@Override
public Comparable castValue(Comparable value, Schema.Type newType) {
//TODO: [HUDI-8261] actually do casting here
- if (newType == Schema.Type.STRING) {
- return value.toString();
+ if (value instanceof WritableComparable) {
+ return value;
}
- return value;
+ return (WritableComparable)
HoodieRealtimeRecordReaderUtils.avroToArrayWritable(value,
Schema.create(newType));
Review Comment:
No, it doesn't fix everything, but I think it might be worth it to fix that
here as well
--
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]