You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Aaron Baff (JIRA)" <ji...@apache.org> on 2018/10/05 21:49:00 UTC
[jira] [Created] (IMPALA-7673) Parse --var variable values to
replace variables within the value
Aaron Baff created IMPALA-7673:
----------------------------------
Summary: Parse --var variable values to replace variables within the value
Key: IMPALA-7673
URL: https://issues.apache.org/jira/browse/IMPALA-7673
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Affects Versions: Impala 2.11.0
Environment: CentOS Linux release 7.4.1708
CDH 5.14.4
Reporter: Aaron Baff
Related to IMPALA-2180
In working on a query using SET variables, and trying to move them to impala-shell --var options to set the variables, the later variable which depends on the 1st one doesn't have the 1st one be replaced properly like it does with a SET.
For example:
--var="DATA_DATE_START='2018-09-28'
--var="START_ACTION_CLICK_RANGE=from_timestamp(date_sub(to_timestamp(\${var:DATA_DATE_START},'yyyy-MM-dd'), 93), 'yyyy-MM-dd')"
In the query that gets run, the ${var:START_ACTION_CLICK_RANGE} gets replaced with
from_timestamp(date_sub(to_timestamp(${var:DATA_DATE_START},'yyyy-MM-dd'), 93), 'yyyy-MM-dd')
not with
from_timestamp(date_sub(to_timestamp('2018-09-28','yyyy-MM-dd'), 93), 'yyyy-MM-dd')
as I would expect it to.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org