swuferhong commented on code in PR #20664: URL: https://github.com/apache/flink/pull/20664#discussion_r953582258
########## flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveTableSourceStatisticsReportTest.java: ########## @@ -255,7 +257,7 @@ protected Map<String, List<Object>> getDataMap() { } private static void assertHiveTableOrcFormatTableStatsEquals( - TableStats tableStats, int expectedRowCount, long nullCount) { + TableStats tableStats, String hiveVersion, int expectedRowCount, long nullCount) { Review Comment: > To get `hiveVersion`, you can use `String hiveVersion = HiveShimLoader.getHiveVersion();` directly. So that, we won't need to pass the `hiveVersion`. Done! ########## flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveTableSourceStatisticsReportTest.java: ########## @@ -292,20 +294,41 @@ private static void assertHiveTableOrcFormatTableStatsEquals( expectedColumnStatsMap.put( "f_string", new ColumnStats.Builder().setMax("def").setMin("abcd").setNullCount(0L).build()); - expectedColumnStatsMap.put( - "f_decimal5", - new ColumnStats.Builder() - .setMax(new BigDecimal("223.45")) - .setMin(new BigDecimal("123.45")) - .setNullCount(0L) - .build()); - expectedColumnStatsMap.put( - "f_decimal14", - new ColumnStats.Builder() - .setMax(new BigDecimal("123333333355.33")) - .setMin(new BigDecimal("123333333333.33")) - .setNullCount(0L) - .build()); + if (hiveVersion.startsWith("3.")) { Review Comment: > You can follow the check logic in `HiveModuleTest#verifyNumBuiltInFunctions`. Done! -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org