You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "zhouyuan (via GitHub)" <gi...@apache.org> on 2026/10/09 08:54:12 UTC
Re: [PR] [VL][Iceberg] Add fallback if vended credentials are present [gluten]
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org