[ 
https://issues.apache.org/jira/browse/HIVE-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178965#comment-13178965
 ] 

Phabricator commented on HIVE-2478:
-----------------------------------

khorgath has commented on the revision "HIVE-2478 [jira] Support dry run option 
in hive".

INLINE COMMENTS
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java:135-140 PLAN is not 
explicitly used anywhere in code, because we need to only check 3 times to 
establish the 4 states.

  The first two checks happen in the compile part :
  First check is for PARSE, if it's PARSE, it's weeded out and if not, it 
continues.
  Second check is for ANALYZE, if it's that, it's weeded out and if not, it 
continues.

  The third check is after the compile, and thus, done for whether it's 
not-OFF(because both the PARSE and ANALYZE returns return here too, and we weed 
out all the non-OFF cases there.)

  I think I agree that an empty string would serve better than OFF, looking to 
change that.
  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:558 Ok, fixing 
along with trying to make OFF an empty string in the next patch.
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java:423 Good spot, changing.
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java:452 Yup. Without this, it 
does, because it tries to read .getFields() on the schema. Adding comment.
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java:479-488 Oh, ok - I wasn't 
entirely sure of that, given the LOG.info proclaiming semantic analysis was 
complete before the validation. Would the plan validation not count as part of 
the plan phase?
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java:944 Disagree. PARSE, 
ANALYZE and PLAN all come up to here, and need to be rejected. !OFF is the 
correct check here.
  ql/src/test/queries/clientnegative/dryrun_bad_fetch_serde.q:1 Ok, doing so.

REVISION DETAIL
  https://reviews.facebook.net/D927

                
> Support dry run option in hive
> ------------------------------
>
>                 Key: HIVE-2478
>                 URL: https://issues.apache.org/jira/browse/HIVE-2478
>             Project: Hive
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 0.9.0
>            Reporter: kalyan ram
>            Assignee: Sushanth Sowmyan
>            Priority: Minor
>         Attachments: HIVE-2478-1.patch, HIVE-2478-2.patch, HIVE-2478-3.patch, 
> HIVE-2478.D927.1.patch
>
>
> Hive currently doesn't support a dry run option. For some complex queries we 
> just want to verify the query syntax initally before running it. A dry run 
> option where just the parsing is done without actual execution is a good 
> option.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to