zhangbutao commented on code in PR #5038:
URL: https://github.com/apache/hive/pull/5038#discussion_r1476113895
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -5094,26 +5094,22 @@ public static String verifyStatsChangeCtx(String
fullTableName, Map<String, Stri
if (validWriteIds != null && writeId > 0) {
return null; // We have txn context.
}
- String oldVal = oldP == null ? null :
oldP.get(StatsSetupConst.COLUMN_STATS_ACCURATE);
- String newVal = newP == null ? null :
newP.get(StatsSetupConst.COLUMN_STATS_ACCURATE);
- // We don't need txn context is that stats state is not being changed.
- if (StringUtils.isEmpty(oldVal) && StringUtils.isEmpty(newVal)) {
+
+ if (!StatsSetupConst.areBasicStatsUptoDate(newP)) {
+ // The validWriteIds can be absent, for example, in case of Impala alter.
Review Comment:
Since some components(such as Impala&Trino) may don't care the field
`validWriteIds` , can we set the fileld a default value to fix this issue? Like
`engine `field i have done:
https://github.com/apache/hive/blob/0f8190fefa56513a042566ef87b852e8343610aa/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift#L903-L904
It seems that we have introduced some extra filelds in stats related class
since Hive4, but the stats related class are often used by other
components(Impala&Trino, etc), so some incompatible issues are reported by the
other components(Impala&Trino, etc). In one word, if we can set a default value
for these new added field, maybe we can fix similar issues at its root?
--
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]