deniskuzZ commented on code in PR #6379:
URL: https://github.com/apache/hive/pull/6379#discussion_r3362200454
##########
ql/src/java/org/apache/hadoop/hive/llap/ProactiveEviction.java:
##########
@@ -233,19 +224,28 @@ public
List<LlapDaemonProtocolProtos.EvictEntityRequestProto> toProtoRequests()
* @return true if cacheTag matches and the related buffer is eligible for
proactive eviction, false otherwise.
*/
public boolean isTagMatch(CacheTag cacheTag) {
- String db = getSingleDbName();
+ String[] names = cacheTag.getTableName().split("\\.");
+ String catalog = Warehouse.DEFAULT_CATALOG_NAME;
+ String db = null;
+ if (names.length == 2) {
+ db = names[0];
+ } else if (names.length == 3) {
+ catalog = names[0];
+ db = names[1];
+ }
if (db == null) {
- // Number of DBs in the request was not exactly 1.
- throw new UnsupportedOperationException("Predicate only implemented
for 1 DB case.");
+ // Number of (catalog, DB) pairs in the request was not exactly 1.
+ throw new UnsupportedOperationException("Predicate only implemented
for 1 catalog and 1 DB case.");
Review Comment:
do we need to throw exception?
````
if (db == null) {
// Unexpected tag shape: 1 part, or >3 parts (e.g. an Iceberg
metadata-table tag
// "cat.db.tbl.<metaRef>"). Not a DROP target, so it can't match -
skip it. Must not throw:
// this predicate runs over every cached buffer, so an exception
here would abort the whole
// eviction sweep.
return false;
}
````
--
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]