Skip to content

Commit

Permalink
see if this works
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Vexler committed Nov 27, 2023
1 parent 91be81a commit a045da6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.avro.Schema;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.spark.sql.HoodieCatalystExpressionUtils;
import org.apache.spark.sql.HoodieInternalRowUtils;
import org.apache.spark.sql.HoodieUnsafeRowUtils;
import org.apache.spark.sql.catalyst.InternalRow;
Expand Down Expand Up @@ -129,7 +128,7 @@ private Object getFieldValueFromInternalRow(InternalRow row, Schema recordSchema

@Override
public UnaryOperator<InternalRow> projectRecord(Schema from, Schema to) {
UnsafeProjection projection = HoodieCatalystExpressionUtils.generateUnsafeProjection(AvroConversionUtils.convertAvroSchemaToStructType(from),
UnsafeProjection projection = HoodieInternalRowUtils.getCachedUnsafeProjection(AvroConversionUtils.convertAvroSchemaToStructType(from),
AvroConversionUtils.convertAvroSchemaToStructType(to));
return projection::apply;
}
Expand Down

0 comments on commit a045da6

Please sign in to comment.