From be6a9bf986794bb0fff9dca2b2995c1ec3a7271d Mon Sep 17 00:00:00 2001 From: Tanner Clary Date: Tue, 28 Nov 2023 14:55:29 -0800 Subject: [PATCH] fix test --- .../apache/calcite/rel/rel2sql/RelToSqlConverterTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java b/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java index ddacd6fec29..0442c9dc189 100644 --- a/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java +++ b/core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java @@ -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 @@ -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