Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix](Jdbc-Hive) fix the order of partition keys #33963

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private List<Partition> getPartitionsByNames(String dbName, String tblName, List

private List<String> getPartitionValues(int partitionId) {
String sql = String.format("SELECT \"PART_KEY_VAL\" FROM \"PARTITION_KEY_VALS\""
+ " WHERE \"PART_ID\" = " + partitionId);
+ " WHERE \"PART_ID\" = " + partitionId + " ORDER BY \"INTEGER_IDX\"");
if (LOG.isDebugEnabled()) {
LOG.debug("getPartitionValues exec sql: {}", sql);
}
Expand Down Expand Up @@ -366,7 +366,7 @@ private Map<String, String> getSerdeInfoParameters(int serdeId) {

private List<FieldSchema> getTablePartitionKeys(int tableId) {
String sql = "SELECT \"PKEY_NAME\", \"PKEY_TYPE\", \"PKEY_COMMENT\" from \"PARTITION_KEYS\""
+ " WHERE \"TBL_ID\"= " + tableId;
+ " WHERE \"TBL_ID\"= " + tableId + " ORDER BY \"INTEGER_IDX\"";
if (LOG.isDebugEnabled()) {
LOG.debug("getTablePartitionKeys exec sql: {}", sql);
}
Expand Down
Loading