hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakub Kukul (JIRA)" <>
Subject [jira] [Created] (HIVE-10034) Variable substitution broken when a query is contained in double quotes
Date Fri, 20 Mar 2015 14:01:38 GMT
Jakub Kukul created HIVE-10034:

             Summary: Variable substitution broken when a query is contained in double quotes
                 Key: HIVE-10034
             Project: Hive
          Issue Type: Bug
          Components: CLI
    Affects Versions: 0.13.1
         Environment: Ubuntu 12.04.5 LTS
            Reporter: Jakub Kukul
            Priority: Minor

Variable substitution works fine when SQL passed from the command line is a single quoted
hive --hivevar a=b -e 'create table if not exists b (col int); describe ${a}'
, but when the query string is contained within double quotes:
hive --hivevar a=b -e "create table if not exists b (col int); describe ${a}"
it fails with the following stack:
	at org.apache.hadoop.hive.ql.parse.HiveParser.descStatement(
	at org.apache.hadoop.hive.ql.parse.HiveParser.ddlStatement(
	at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(
	at org.apache.hadoop.hive.ql.parse.HiveParser.statement(
	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(
	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(
	at org.apache.hadoop.hive.ql.Driver.compile(
	at org.apache.hadoop.hive.ql.Driver.compile(
	at org.apache.hadoop.hive.ql.Driver.compileInternal(
	at org.apache.hadoop.hive.ql.Driver.runInternal(
	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(
	at org.apache.hadoop.hive.cli.CliDriver.processCmd(
	at org.apache.hadoop.hive.cli.CliDriver.processLine(
	at org.apache.hadoop.hive.cli.CliDriver.processLine(
	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(
	at org.apache.hadoop.hive.cli.CliDriver.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.hadoop.util.RunJar.main(
FAILED: ParseException line 1:1 cannot recognize input near 'describe' '<EOF>' '<EOF>'
in describe statement

This behaviour is a bit confusing, since cli accepts double quoted strings in other cases.

This message was sent by Atlassian JIRA

View raw message