[ https://issues.apache.org/jira/browse/SPARK-19927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937644#comment-15937644 ]
bruce xu edited comment on SPARK-19927 at 3/23/17 3:39 AM: ----------------------------------------------------------- [~q79969786] Thx for response. your comment is half right. reason: - issue SPARK-19927 derives from SPARK-13983, but SPARK-13983 still not merge into master. - SPARK-18086 has merged into master. however this issue only resolve bin/spark-sql shell interface(code change in SparkSQLCLIDriver) problem but not dealing with bin/beeline interface(without code change in SparkSQLOperationManager). that's why cmd: bin/beeline -f test.sql --hivevar db_name=online can not work in spark 2.X. so SPARK-19927's value is to deal with this problem. hope to review again. was (Author: xwc3504): [~q79969786] Thx for response. your comment is half right. reason: - issue SPARK-19927 derives from SPARK-13983, but SPARK-13983 still not merge into master. - SPARK-18086 has merged into master. however this issue only resolve bin/spark-sql shell interface(code change in SparkSQLCLIDriver) problem but not dealing with bin/beeline interface(without code change in SparkSQLOperationManager). that's why cmd: bin/beeline -f test.sql --hivevar db_name=online can not work in spark 2.X. so SPARK-19927's value is to deal with this problem. > SparkThriftServer2 can not get ''--hivevar" variables in spark 2.1 > ------------------------------------------------------------------ > > Key: SPARK-19927 > URL: https://issues.apache.org/jira/browse/SPARK-19927 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.1, 2.1.0 > Environment: CentOS 6.5,spark 2.1 build with mvn -Pyarn -Phadoop-2.6 > -Dhadoop.version=2.6.0 -Phive -Phive-thriftserver -Dscala-2.11 > Reporter: bruce xu > > suppose the content of file test.sql: > ------------------------------------------------- > !connect jdbc:hive2://localhost:10000 test test > USE ${hivevar:db_name}; > ------------------------------------------------- > > when execute beeline command: bin/beeline -f /tmp/test.sql --hivevar > db_name=offline > the output is: > ------------------------------------------------------------------------------------ > Error: org.apache.spark.sql.catalyst.parser.ParseException: > no viable alternative at input '<EOF>'(line 1, pos 4) > == SQL == > use > ----^^^ (state=,code=0) > ------------------------------------------------------------------------------------- > so the parameter --hivevar can not be read from beeline CLI. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org