xushiyan commented on a change in pull request #4789:
URL: https://github.com/apache/hudi/pull/4789#discussion_r814457167
##########
File path:
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/AvroConversionUtils.scala
##########
@@ -41,8 +107,8 @@ object AvroConversionUtils {
else {
val schema = new Schema.Parser().parse(schemaStr)
val dataType = convertAvroSchemaToStructType(schema)
- val convertor = AvroConversionHelper.createConverterToRow(schema,
dataType)
- records.map { x => convertor(x).asInstanceOf[Row] }
+ val converter = createConverterToRow(schema, dataType)
Review comment:
@yihua i think even in row writing path, we still need to use
`InternalRow` quite a bit, to achieve some data manipulation. Sorry i made the
discussion way out of scope from here. iceberg made a similar extension to
InternalRow for writing
https://github.com/apache/iceberg/blob/24896d84c5/spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/StructInternalRow.java
cc @vinothchandar @alexeykudinkin @nsivabalan
--
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]