hive
hive copied to clipboard
HIVE-28091: Remove invalid long datatype in ColumnStatsUpdateTask
What changes were proposed in this pull request?
Remove invalid long datatype in ColumnStatsUpdateTask::constructColumnStatsFromInput
Why are the changes needed?
IMO, Hive column does not support long data type. We should remove the incorrect data type in ColumnStatsUpdateTask. https://github.com/apache/hive/blob/a348e5d86adc611e4f72d386815a21a96b667ab4/ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsUpdateTask.java#L104-L106
In addition, the column stats related code blocks should be consistent with code in StatObjectConverter.java, which also does not have long type.
https://github.com/apache/hive/blob/a348e5d86adc611e4f72d386815a21a96b667ab4/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java#L378-L379
Does this PR introduce any user-facing change?
No
Is the change a dependency upgrade?
No
How was this patch tested?
Existing UTs
Quality Gate passed
Issues
1 New issue
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.
@zhangbutao , could we extract this check logic into some method to be consistent in multiple places where this check is used?
@zhangbutao , could we extract this check logic into some method to be consistent in multiple places where this check is used?
It seems that it is not easy to extract this check logic. ColumnStatsUpdateTask::constructColumnStatsFromInput
is used for update/write table/partition stats, and StatObjectConverter::getTableColumnStatisticsObj
is used for get/read table/partition stats. The two method has some different check & one is in hive-exec
and another is in standalone-metastore
.
Quality Gate passed
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication