linhongliu-db commented on a change in pull request #31606:
URL: https://github.com/apache/spark/pull/31606#discussion_r580114213
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TableLookupCacheSuite.scala
##########
@@ -46,7 +48,12 @@ class TableLookupCacheSuite extends AnalysisTest with
Matchers {
ignoreIfExists = false)
val v2Catalog = new InMemoryTableCatalog {
override def loadTable(ident: Identifier): Table = {
- V1Table(externalCatalog.getTable("default", ident.name))
+ val catalogTable = externalCatalog.getTable("default", ident.name)
+ new InMemoryTable(
+ catalogTable.identifier.table,
+ catalogTable.schema,
+ Array.empty,
+ Map.empty[String, String].asJava)
Review comment:
change V1Table to V2Table here, because to lookup V1 table, the catalog
will return `UnresolvedCatalogRelation` first and it needs
`FindDataSourceTable` rule to resolve. But, `FindDataSourceTable` is in
sql/core while the test is in sql/catalyst. So we need to use V2Table instead
to avoid depending on `FindDataSourceTable`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]