[
https://issues.apache.org/jira/browse/IMPALA-7673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fredy Wijaya resolved IMPALA-7673.
----------------------------------
Resolution: Fixed
Fix Version/s: Impala 3.1.0
> 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: Clients
> Affects Versions: Impala 2.11.0, Impala 3.0
> Environment: CentOS Linux release 7.4.1708
> CDH 5.14.4
> Reporter: Aaron Baff
> Assignee: Fredy Wijaya
> Priority: Minor
> Fix For: Impala 3.1.0
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]