Skip to content

Commit

Permalink
udpate
Browse files Browse the repository at this point in the history
Signed-off-by: Seaven <[email protected]>
  • Loading branch information
Seaven committed Nov 19, 2024
1 parent 08b652c commit 591af59
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ public void testSampleJobs() {
Assert.assertEquals(1, sql.size());

assertContains(sql.get(0), "with base_cte_table as " +
"(SELECT * FROM `test`.`t_struct` LIMIT 200000) " +
"SELECT cast(4 as INT), cast(14418 as BIGINT), 'c2', cast(0 as BIGINT), " +
"cast(IFNULL(SUM(CHAR_LENGTH(`c2`)) * 0/ COUNT(*), 0) as BIGINT), " +
"(SELECT * FROM `test`.`t_struct` LIMIT 200000) ");
assertContains(sql.get(0), "cast(IFNULL(SUM(CHAR_LENGTH(`c2`)) * 0/ COUNT(*), 0) as BIGINT), " +
"hex(hll_serialize(IFNULL(hll_raw(`c2`), hll_empty())))," +
" cast((COUNT(*) - COUNT(`c2`)) * 0 / COUNT(*) as BIGINT), " +
"IFNULL(MAX(LEFT(`c2`, 200)), ''), IFNULL(MIN(LEFT(`c2`, 200)), '') " +
Expand All @@ -225,11 +224,11 @@ public void testSubfieldSampleJobs() {
List<String> sql = jobs.get(0).buildQuerySQL();
Assert.assertEquals(1, sql.size());

assertContains(sql.get(0), "with base_cte_table as (SELECT * FROM `test`.`t_struct` LIMIT 200000) " +
"SELECT cast(4 as INT), cast(14418 as BIGINT), 'c6.c.b', cast(0 as BIGINT), cast(4 * 0 as BIGINT), " +
"hex(hll_serialize(IFNULL(hll_raw(`c6`.`c`.`b`), hll_empty()))), " +
"cast((COUNT(*) - COUNT(`c6`.`c`.`b`)) * 0 / COUNT(*) as BIGINT), " +
"IFNULL(MAX(`c6`.`c`.`b`), ''), IFNULL(MIN(`c6`.`c`.`b`), '') FROM base_cte_table");
assertContains(sql.get(0), "with base_cte_table as (SELECT * FROM `test`.`t_struct` LIMIT 200000) ");
assertContains(sql.get(0), "'c6.c.b', cast(0 as BIGINT), cast(4 * 0 as BIGINT), ");
assertContains(sql.get(0), "hex(hll_serialize(IFNULL(hll_raw(`c6`.`c`.`b`), hll_empty()))), ");
assertContains(sql.get(0), "cast((COUNT(*) - COUNT(`c6`.`c`.`b`)) * 0 / COUNT(*) as BIGINT), " +
"IFNULL(MAX(`c6`.`c`.`b`), ''), IFNULL(MIN(`c6`.`c`.`b`), '') FROM base_cte_table ");
}

@AfterClass
Expand Down

0 comments on commit 591af59

Please sign in to comment.