Shekharrajak commented on code in PR #3558:
URL: https://github.com/apache/datafusion-comet/pull/3558#discussion_r2835849234
##########
spark/src/main/scala/org/apache/comet/serde/operator/CometIcebergNativeScan.scala:
##########
@@ -770,23 +758,12 @@ object CometIcebergNativeScan extends
CometOperatorSerde[CometBatchScanExec] wit
commonBuilder.addRequiredSchema(field.build())
}
- // Load Iceberg classes once (avoid repeated class loading in loop)
- // scalastyle:off classforname
- val contentScanTaskClass =
Class.forName(IcebergReflection.ClassNames.CONTENT_SCAN_TASK)
- val fileScanTaskClass =
Class.forName(IcebergReflection.ClassNames.FILE_SCAN_TASK)
- val contentFileClass =
Class.forName(IcebergReflection.ClassNames.CONTENT_FILE)
- val schemaParserClass =
Class.forName(IcebergReflection.ClassNames.SCHEMA_PARSER)
- val schemaClass = Class.forName(IcebergReflection.ClassNames.SCHEMA)
- // scalastyle:on classforname
+ // Create reflection cache once - avoids repeated class loading and method
lookups
+ // This provides ~50% serialization speedup for large tables (see issue
#3456)
Review Comment:
updated
--
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]