okumin commented on code in PR #5768:
URL: https://github.com/apache/hive/pull/5768#discussion_r2041393750
##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java:
##########
@@ -943,6 +944,31 @@ public void testPartitionStatisticsOps() throws Exception {
Assert.assertEquals(0, stat.size());
}
+ @Test
Review Comment:
I verified this test case would expectedly fail without the patch.
```
MetaException(message:See previous errors; Error executing SQL query "select
"COLUMN_NAME", "COLUMN_TYPE", min("LONG_LOW_VALUE"), max("LONG_HIGH_VALUE"),
min("DOUBLE_LOW_VALUE"), max("DOUBLE_HIGH_VALUE"),
min(cast("BIG_DECIMAL_LOW_VALUE" as decimal)),
max(cast("BIG_DECIMAL_HIGH_VALUE" as decimal)), sum("NUM_NULLS"),
max("NUM_DISTINCTS"), max("AVG_COL_LEN"), max("MAX_COL_LEN"), sum("NUM_TRUES"),
sum("NUM_FALSES"),
avg(("LONG_HIGH_VALUE"-"LONG_LOW_VALUE")/cast("NUM_DISTINCTS" as
decimal)),avg(("DOUBLE_HIGH_VALUE"-"DOUBLE_LOW_VALUE")/"NUM_DISTINCTS"),avg((cast("BIG_DECIMAL_HIGH_VALUE"
as decimal)-cast("BIG_DECIMAL_LOW_VALUE" as
decimal))/"NUM_DISTINCTS"),sum("NUM_DISTINCTS") from "PART_COL_STATS" inner
join "PARTITIONS" on "PART_COL_STATS"."PART_ID" = "PARTITIONS"."PART_ID" inner
join "TBLS" on "PARTITIONS"."TBL_ID" = "TBLS"."TBL_ID" inner join "DBS" on
"TBLS"."DB_ID" = "DBS"."DB_ID" where "DBS"."CTLG_NAME" = ? and "DBS"."NAME" = ?
and "TBLS"."TBL_NAME" = ? and "COLUMN_NAME" in (?)
and "PARTITION_NAME" in (?,?,?) and "ENGINE" = ? group by "COLUMN_NAME",
"COLUMN_TYPE"".Failed to execute [select "COLUMN_NAME", "COLUMN_TYPE",
min("LONG_LOW_VALUE"), max("LONG_HIGH_VALUE"), min("DOUBLE_LOW_VALUE"),
max("DOUBLE_HIGH_VALUE"), min(cast("BIG_DECIMAL_LOW_VALUE" as decimal)),
max(cast("BIG_DECIMAL_HIGH_VALUE" as decimal)), sum("NUM_NULLS"),
max("NUM_DISTINCTS"), max("AVG_COL_LEN"), max("MAX_COL_LEN"), sum("NUM_TRUES"),
sum("NUM_FALSES"),
avg(("LONG_HIGH_VALUE"-"LONG_LOW_VALUE")/cast("NUM_DISTINCTS" as
decimal)),avg(("DOUBLE_HIGH_VALUE"-"DOUBLE_LOW_VALUE")/"NUM_DISTINCTS"),avg((cast("BIG_DECIMAL_HIGH_VALUE"
as decimal)-cast("BIG_DECIMAL_LOW_VALUE" as
decimal))/"NUM_DISTINCTS"),sum("NUM_DISTINCTS") from "PART_COL_STATS" inner
join "PARTITIONS" on "PART_COL_STATS"."PART_ID" = "PARTITIONS"."PART_ID" inner
join "TBLS" on "PARTITIONS"."TBL_ID" = "TBLS"."TBL_ID" inner join "DBS" on
"TBLS"."DB_ID" = "DBS"."DB_ID" where "DBS"."CTLG_NAME" = ? and "DBS"."NAME" = ?
and "TBLS"."TBL_
NAME" = ? and "COLUMN_NAME" in (?) and "PARTITION_NAME" in (?,?,?) and
"ENGINE" = ? group by "COLUMN_NAME", "COLUMN_TYPE"] with parameters [hive,
testobjectstoredb1, testobjectstoretable1, test_part_col, test_part_col=a0,
test_part_col=a1, test_part_col=a2, hive]
)
at
org.apache.hadoop.hive.metastore.MetastoreDirectSqlUtils.executeWithArray(MetastoreDirectSqlUtils.java:81)
at
org.apache.hadoop.hive.metastore.MetaStoreDirectSql.executeWithArray(MetaStoreDirectSql.java:2417)
at
org.apache.hadoop.hive.metastore.MetaStoreDirectSql.executeWithArray(MetaStoreDirectSql.java:2412)
at
org.apache.hadoop.hive.metastore.MetaStoreDirectSql.aggrStatsUseDB(MetaStoreDirectSql.java:2002)
at
org.apache.hadoop.hive.metastore.MetaStoreDirectSql.columnStatisticsObjForPartitionsBatch(MetaStoreDirectSql.java:1939)
at
org.apache.hadoop.hive.metastore.MetaStoreDirectSql.access$1800(MetaStoreDirectSql.java:134)
```
--
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]