pan3793 commented on code in PR #54411:
URL: https://github.com/apache/spark/pull/54411#discussion_r2836090772
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2DataFrameSessionCatalogSuite.scala:
##########
@@ -108,6 +108,19 @@ class InMemoryTableSessionCatalog extends
TestV2SessionCatalogBase[InMemoryTable
}
override def loadTable(ident: Identifier): Table = {
+ // Check for metadata table pattern: namespace = [db, tableName], name =
"snapshots"
+ // This simulates how Iceberg handles metadata tables like
db.table.snapshots
+ if (ident.name() == "snapshots" && ident.namespace().length >= 1) {
Review Comment:
`identToUse` should be used instead of `ident`, otherwise,
`customIdentifierResolution` does not take effect.
I checked the iceberg code base, it first tries to load the ident as the
table, fallback to resolve metadata table only when `NoSuchTableException`,
which is more reasonable
--
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]