surawut-jirasaktavee commented on code in PR #7680:
URL: https://github.com/apache/datafusion-comet/pull/7680#discussion_r4638595961
##########
spark/src/main/scala/org/apache/comet/serde/operator/CometIcebergNativeWrite.scala:
##########
@@ -1093,8 +1147,19 @@ object CometIcebergNativeWrite extends
CometOperatorSerde[IcebergWriteExec] {
}
private val requireSupportedS3FileIOProperties: TriggerRule = ctx =>
- s3DataLocation(ctx).flatMap { _ =>
- unsupportedSettingsReason("S3 FileIO",
unsupportedS3FileIOProperties(ctx.fileIOProperties))
+ s3DataLocation(ctx).flatMap { location =>
+ // Resolving a ResolvingFileIO's delegate instantiates it.
+ lazy val s3FileIO = IcebergReflection
+ .getFileIO(ctx.table)
+ .flatMap(io => IcebergReflection.resolveFileIOClass(io, location))
+ .exists(cls =>
+ IcebergReflection
+ .classNameInHierarchy(cls,
Set(IcebergReflection.ClassNames.S3_FILE_IO)))
+ unsupportedSettingsReason(
+ "S3 FileIO",
+ unsupportedS3FileIOProperties(
+ ctx.fileIOProperties,
+ ctx.fileIOProperties.contains(S3FileIOClientFactoryProperty) &&
s3FileIO))
Review Comment:
Fixed. The decision is now `isS3FileIO(resolvedFileIO: Option[Class[_]])`,
the same shape as `gcsDataLocationRejection`. It matches
`org.apache.iceberg.aws.s3.S3FileIO` exactly instead of using
`classNameInHierarchy`, so a subclass falls back. A new test checks `S3FileIO`,
an `S3FileIO` subclass, `HadoopFileIO` and `None`
--
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]