zhouyuan commented on code in PR #13008:
URL: https://github.com/apache/gluten/pull/13008#discussion_r4228369348
##########
gluten-iceberg/src/main/scala/org/apache/iceberg/spark/source/GlutenIcebergSourceUtil.scala:
##########
@@ -49,6 +50,26 @@ object GlutenIcebergSourceUtil {
def isSparkStagedScan(sparkScan: Scan): Boolean =
sparkScan.isInstanceOf[SparkStagedScan]
+ def hasVendedCredentials(sparkScan: Scan): Boolean =
+ isSupportedScan(sparkScan) &&
hasVendedCredentials(getTable(sparkScan).io())
+
+ private def hasVendedCredentials(io: FileIO): Boolean = {
+ io match {
+ case credentials: SupportsStorageCredentials if
!credentials.credentials().isEmpty =>
+ return true
+ case _ =>
+ }
+ val properties =
+ try {
+ io.properties()
+ } catch {
+ case _: UnsupportedOperationException => return false
+ }
+ (Option(properties.get("s3.access-key-id")).exists(_.nonEmpty) &&
Review Comment:
do we really need this check? Users might use other remote storage service
--
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]