Skip to content

HIVE-27190: Implement col stats cache for hive iceberg table#6380

Open
deniskuzZ wants to merge 1 commit intoapache:masterfrom
deniskuzZ:HIVE-27190
Open

HIVE-27190: Implement col stats cache for hive iceberg table#6380
deniskuzZ wants to merge 1 commit intoapache:masterfrom
deniskuzZ:HIVE-27190

Conversation

@deniskuzZ
Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@sonarqubecloud
Copy link
Copy Markdown

}
}

if (hiveColStats != null && hiveColStats.size() == nonPartColNamesThatRqrStats.size()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the null check removed?

computePartitionList(hiveConf, null, new HashSet<>());
}

String partitionListKey = partitionList.getKey().orElse(null);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the null key check removed?

@Override
public long getSnapshotId(org.apache.hadoop.hive.ql.metadata.Table hmsTable) {
Table table = IcebergTableUtil.getTable(conf, hmsTable.getTTable());
Snapshot snapshot = IcebergTableUtil.getTableSnapshot(table, hmsTable);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we handle the exception case where the table is null?

key = tab.getFullyQualifiedName() + "." + tab.getMetaTable() + ";";
} else if (tab.getSnapshotRef() != null) {
key = tab.getFullyQualifiedName() + "." + tab.getSnapshotRef() + ";";
} else if (tab.isNonNative()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we currently limit ourselves to only Iceberg tables, rather than all non-native tables?

nonPartColNamesThatRqrStats.get(i),
hiveNonPartitionColsMap.get(nonPartColIndxsThatRqrStats.get(i)).getTypeName()));
}
colNamesFailedStats.clear();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was it removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants