drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] paul-rogers commented on a change in pull request #1726: DRILL-7143: Support default value for empty columns
Date Sun, 07 Apr 2019 22:56:26 GMT
paul-rogers commented on a change in pull request #1726: DRILL-7143: Support default value
for empty columns
URL: https://github.com/apache/drill/pull/1726#discussion_r272855606
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/SchemaHandler.java
 ##########
 @@ -139,6 +139,11 @@ public PhysicalPlan getPlan(SqlNode sqlNode) {
           .message(e.getMessage())
           .addContext("Error while preparing / creating schema for [%s]", schemaSource)
           .build(logger);
+      } catch (IllegalArgumentException e) {
 
 Review comment:
   I did, in fact, use that approach at first. But, there are two distinct error cases here.
   
   1) Could not read your file: there is something wrong at that level.
   2) Could read the file just fine, the file parsed, but there is something wrong with the
semantics (at present of the VarDecimal type.)
   
   We could have conditional logic to create the right kind of error. Or, we can just do it
the easy way as the code here does.
   
   In fact, I think we could change the message for the IOException case to say that there
was a problem reading the file.
   
   By the way, were are parse exceptions reported? Should we be catching parse exceptions
here?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message