somu-imply commented on code in PR #14510:
URL: https://github.com/apache/druid/pull/14510#discussion_r1272835720
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteReplaceDmlTest.java:
##########
@@ -440,9 +440,8 @@ public void testReplaceWithoutCompleteOverwriteClause()
{
testIngestionQuery()
.sql("REPLACE INTO dst OVERWRITE SELECT * FROM foo PARTITIONED BY ALL
TIME")
- .expectValidationError(invalidSqlIs(
- "Missing time chunk information in OVERWRITE clause for REPLACE. "
- + "Use OVERWRITE WHERE <__time based condition> or OVERWRITE ALL
to overwrite the entire table."
+ .expectValidationError(invalidSqlContains(
+ "Incorrect syntax near the keyword 'OVERWRITE' at line 1, column
18."
Review Comment:
These messages come after the sql has been validated at
https://github.com/apache/druid/blob/28914bbab82480f33a345913a30c32321d36fc37/sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidPlanner.java#L146.
Here the SQL cannot be validated as the acceptable syntaxes are OVERWRITE
ALL/OVERWRITE WHERE where as the query has only OVERWRITE. This fails planning
because of bad syntax
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]