Github user scwf commented on the pull request:

    https://github.com/apache/spark/pull/3761#issuecomment-67934889
  
    This is because it always return ResponseCode(0), even if we pass a invalid 
sql. So  
    ```
         if (ret != 0) {
                console.printError(rc.getErrorMessage())
                driver.close()
                return ret
              }
    ``` will be never executed.
    And after we config ```hive.cli.print.header```
    ```
    if (HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_CLI_PRINT_HEADER)) {
                // Print the column names.
                Option(driver.getSchema.getFieldSchemas).map { fields =>
                  out.println(fields.map(_.getName).mkString("\t"))
                }
              }
    ``` will throw NPE when passed in a invalid sql


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to