You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/06/06 06:24:39 UTC

[GitHub] [druid] adarshsanjeev opened a new pull request, #12611: Change error message to be more specific

adarshsanjeev opened a new pull request, #12611:
URL: https://github.com/apache/druid/pull/12611

   - Update the error to specify whether the ingest is INSERT or REPLACE for better user experience
   
   This PR has:
   - [x] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] kfaraz commented on a diff in pull request #12611: Change error message to be more specific

Posted by GitBox <gi...@apache.org>.
kfaraz commented on code in PR #12611:
URL: https://github.com/apache/druid/pull/12611#discussion_r889860228


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidPlanner.java:
##########
@@ -694,15 +694,15 @@ private String validateAndGetDataSourceForIngest(final SqlInsert insert) throws
     }
 
     if (insert.getTargetColumnList() != null) {
-      throw new ValidationException("Ingestion with target column list is not supported.");
+      throw new ValidationException(insert.getOperator().getName() + " with target column list is not supported.");

Review Comment:
   `insert.getOperator().getName()` is being used in several places.
   Maybe assign it to a variable 
   `final String insertOperatorName = insert.getOperator().getName();`



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] kfaraz commented on pull request #12611: Change SQL validation error messages to be more specific

Posted by GitBox <gi...@apache.org>.
kfaraz commented on PR #12611:
URL: https://github.com/apache/druid/pull/12611#issuecomment-1147311328

   Merging as failure is unrelated.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] kfaraz merged pull request #12611: Change SQL validation error messages to be more specific

Posted by GitBox <gi...@apache.org>.
kfaraz merged PR #12611:
URL: https://github.com/apache/druid/pull/12611


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] adarshsanjeev commented on a diff in pull request #12611: Change SQL validation error messages to be more specific

Posted by GitBox <gi...@apache.org>.
adarshsanjeev commented on code in PR #12611:
URL: https://github.com/apache/druid/pull/12611#discussion_r889872933


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidPlanner.java:
##########
@@ -694,15 +694,15 @@ private String validateAndGetDataSourceForIngest(final SqlInsert insert) throws
     }
 
     if (insert.getTargetColumnList() != null) {
-      throw new ValidationException("Ingestion with target column list is not supported.");
+      throw new ValidationException(insert.getOperator().getName() + " with target column list is not supported.");

Review Comment:
   Nice catch! Changed



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org