Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tanclary committed Nov 28, 2023
1 parent 565ecf0 commit be6a9bf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1322,12 +1322,12 @@ private static String toSql(RelNode root, SqlDialect dialect,
final String expectedPartition = "SELECT PERCENTILE_CONT(product_id, 0.5) "
+ "OVER (PARTITION BY product_id)\n"
+ "FROM foodmart.product";
final String query = "select percentile_cont(\"product_id\", 0.5) over()\n"
final String noPartitionQuery = "select percentile_cont(\"product_id\", 0.5) over()\n"
+ "from \"foodmart\".\"product\"";
final String expected = "SELECT PERCENTILE_CONT(product_id, 0.5) OVER ()\n"
+ "FROM foodmart.product";
sql(partitionQuery).withBigQuery().withLibrary(SqlLibrary.BIG_QUERY).ok(expectedPartition);
sql(query).withBigQuery().withLibrary(SqlLibrary.BIG_QUERY).ok(expected);
sql(noPartitionQuery).withBigQuery().withLibrary(SqlLibrary.BIG_QUERY).ok(expected);
}

/** Test case for
Expand All @@ -1340,12 +1340,12 @@ private static String toSql(RelNode root, SqlDialect dialect,
final String expectedPartition = "SELECT PERCENTILE_DISC(product_id, 0.5) "
+ "OVER (PARTITION BY product_id)\n"
+ "FROM foodmart.product";
final String query = "select percentile_disc(\"product_id\", 0.5) over()\n"
final String noPartitionQuery = "select percentile_disc(\"product_id\", 0.5) over()\n"
+ "from \"foodmart\".\"product\"";
final String expected = "SELECT PERCENTILE_DISC(product_id, 0.5) OVER ()\n"
+ "FROM foodmart.product";
sql(partitionQuery).withBigQuery().withLibrary(SqlLibrary.BIG_QUERY).ok(expectedPartition);
sql(query).withBigQuery().withLibrary(SqlLibrary.BIG_QUERY).ok(expected);
sql(noPartitionQuery).withBigQuery().withLibrary(SqlLibrary.BIG_QUERY).ok(expected);
}

/** Test case for
Expand Down

0 comments on commit be6a9bf

Please sign in to comment.