Fix Adding Cluster Name for Refresh Meta Cache
This commit is contained in:
parent
c0e5cab002
commit
514fea339b
|
|
@ -6532,4 +6532,11 @@ public class TestHiveIntegrationSmokeTest
|
|||
assertEquals(sortResult.getMaterializedRows(), hashResult.getMaterializedRows());
|
||||
assertUpdate("DROP TABLE lineitem_orderkey_partkey_Distinct");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailRefreshMetaCache()
|
||||
{
|
||||
assertQueryFails("REFRESH META CACHE FOR abc", "Catalog does not exist:abc");
|
||||
assertQueryFails("REFRESH META CACHE FOR abc.def", "Catalog does not exist:abc.def");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ statement
|
|||
| SET PATH pathSpecification #setPath
|
||||
| VACUUM TABLE qualifiedName (FULL (UNIFY)?)? (PARTITION partition=string)?
|
||||
(AND_WAIT)? #vacuumTable
|
||||
| REFRESH META CACHE (FOR (catalog=identifier))? #refreshMetadataCache
|
||||
| REFRESH META CACHE (FOR (cluster=identifier '.')? catalog=identifier)? #refreshMetadataCache
|
||||
;
|
||||
|
||||
assignmentList
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ class AstBuilder
|
|||
@Override
|
||||
public Node visitRefreshMetadataCache(SqlBaseParser.RefreshMetadataCacheContext context)
|
||||
{
|
||||
Optional<Identifier> identifier = createIdentifier(null, context.catalog);
|
||||
Optional<Identifier> identifier = createIdentifier(context.cluster, context.catalog);
|
||||
return new RefreshMetadataCache(getLocation(context), identifier);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue