hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-28091: Remove invalid long datatype in ColumnStatsUpdateTask

Open zhangbutao opened this issue 1 year ago • 1 comments

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

zhangbutao avatar Feb 24 '24 11:02 zhangbutao

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Feb 24 '24 13:02 sonarqubecloud[bot]

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.

github-actions[bot] avatar Apr 25 '24 00:04 github-actions[bot]

@zhangbutao , could we extract this check logic into some method to be consistent in multiple places where this check is used?

deniskuzZ avatar May 27 '24 08:05 deniskuzZ

@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.

zhangbutao avatar May 28 '24 09:05 zhangbutao

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 29 '24 00:05 sonarqubecloud[bot]