Skip to content

Commit

Permalink
[UT] Make ReplayFromDumpTest.testGroupByDistinctColumnSkewHint stable (
Browse files Browse the repository at this point in the history
…#52483)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 47cf36c)

# Conflicts:
#	fe/fe-core/src/test/java/com/starrocks/sql/plan/ReplayFromDumpTest.java
  • Loading branch information
satanson authored and mergify[bot] committed Oct 31, 2024
1 parent d3cdd0b commit 53b6c41
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,12 @@ public void testGroupByDistinctColumnSkewHint() throws Exception {
Assert.assertTrue(replayPair.second, replayPair.second.contains(" 9:Project\n" +
" | <slot 39> : 39: year\n" +
" | <slot 42> : 42: case\n" +
<<<<<<< HEAD
" | <slot 45> : CAST(murmur_hash3_32(CAST(42: case AS VARCHAR)) % 512 AS SMALLINT)" +
""));
=======
" | <slot 45> : CAST(murmur_hash3_32(CAST(42: case AS VARCHAR)) % 512 AS SMALLINT)"));
>>>>>>> 47cf36c7a7 ([UT] Make ReplayFromDumpTest.testGroupByDistinctColumnSkewHint stable (#52483))
}

@Test
Expand All @@ -737,8 +741,24 @@ public void testGroupByDistinctColumnOptimization() throws Exception {
Assert.assertTrue(replayPair.second, replayPair.second.contains(" 9:Project\n" +
" | <slot 39> : 39: year\n" +
" | <slot 42> : 42: case\n" +
<<<<<<< HEAD
" | <slot 45> : CAST(murmur_hash3_32(CAST(42: case AS VARCHAR)) % 512 AS SMALLINT)" +
""));
=======
" | <slot 45> : CAST(murmur_hash3_32(CAST(42: case AS VARCHAR)) % 512 AS SMALLINT)"));
}

@Test
public void testPushDownDistinctAggBelowWindowRewrite() throws Exception {
Pair<QueryDumpInfo, String> replayPair =
getPlanFragment(getDumpInfoFromFile("query_dump/pushdown_distinct_agg_below_window"), null,
TExplainLevel.COSTS);
Assert.assertTrue(replayPair.second, replayPair.second.contains(" 1:AGGREGATE (update finalize)\n" +
" | aggregate: sum[([3: gross, DECIMAL128(10,2), false]); args: DECIMAL128; " +
"result: DECIMAL128(38,2); args nullable: false; result nullable: true]\n" +
" | group by: [1: country, VARCHAR, true], [2: trans_date, DATE, false]\n" +
" | cardinality: 49070\n"));
>>>>>>> 47cf36c7a7 ([UT] Make ReplayFromDumpTest.testGroupByDistinctColumnSkewHint stable (#52483))
}

@Test
Expand Down

0 comments on commit 53b6c41

Please sign in to comment.