From 67a6224d91bf1d64cdd2aee63ec9652d3106e7d0 Mon Sep 17 00:00:00 2001 From: Abhishek Radhakrishnan Date: Tue, 27 Feb 2024 00:47:53 +0530 Subject: [PATCH] Fix up incorrect `PARTITIONED BY` error messages (#15961) * Fix up typos, inaccuracies and clean up code related to PARTITIONED BY. * Remove wrapper function and update tests to use DruidExceptionMatcher. * Checkstyle and Intellij inspection fixes. --- docs/multi-stage-query/reference.md | 10 +- sql/src/main/codegen/includes/common.ftl | 2 +- sql/src/main/codegen/includes/insert.ftl | 2 +- sql/src/main/codegen/includes/replace.ftl | 2 +- .../sql/calcite/parser/DruidSqlInsert.java | 9 +- .../calcite/parser/DruidSqlParserUtils.java | 200 +++++++----------- .../sql/calcite/parser/DruidSqlReplace.java | 9 +- .../calcite/parser/SqlGranularityLiteral.java | 19 +- .../sql/calcite/CalciteInsertDmlTest.java | 63 +++++- .../sql/calcite/CalciteReplaceDmlTest.java | 57 ++++- .../parser/DruidSqlParserUtilsTest.java | 92 ++++---- 11 files changed, 263 insertions(+), 202 deletions(-) diff --git a/docs/multi-stage-query/reference.md b/docs/multi-stage-query/reference.md index f03ac25b157..115a9e60050 100644 --- a/docs/multi-stage-query/reference.md +++ b/docs/multi-stage-query/reference.md @@ -256,12 +256,12 @@ For more information, see [Overwrite data with REPLACE](concepts.md#replace). ### `PARTITIONED BY` The `PARTITIONED BY