adarshsanjeev commented on code in PR #15689:
URL: https://github.com/apache/druid/pull/15689#discussion_r1471243219
##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/IngestHandler.java:
##########
@@ -106,12 +110,45 @@ protected String operationName()
@Override
public void validate()
{
- if (ingestNode().getPartitionedBy() == null) {
+ if (ingestNode().getTargetTable() instanceof
ExternalDestinationSqlIdentifier) {
+ if
(!handlerContext.plannerContext().featureAvailable(EngineFeature.WRITE_EXTERNAL_DATA))
{
Review Comment:
IngestHandler is used by native queries as well, just that it throws an
exception immediately. Currently, this wouldn't be triggered since the child
classes of IngestHandler already check if it is an insert or replace.
However, for correctness's sake, this should be present, even if a test
cannot reach it. If in the future, say, a new engine is added which supports
insert and replace, but not export, this would be needed.
--
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]