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 "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/11/07 01:07:00 UTC

[jira] [Commented] (IMPALA-3860) Expr evaluation from the FE turns expr warnings into query failures wrapped with "InternalException"

    [ https://issues.apache.org/jira/browse/IMPALA-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677477#comment-16677477 ] 

Tim Armstrong commented on IMPALA-3860:
---------------------------------------

I think we need to stop turning warnings into errors here: https://github.com/apache/impala/blob/master/be/src/service/fe-support.cc#L251 and then make sure that we have a reasonable way to propagate the warning. I think we should probably add it as an analyzer warning.

> Expr evaluation from the FE turns expr warnings into query failures wrapped with "InternalException"
> ----------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-3860
>                 URL: https://issues.apache.org/jira/browse/IMPALA-3860
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.7.0
>         Environment: 5.7.1-1.cdh5.7.1.p0.11
>            Reporter: kuduser
>            Priority: Minor
>              Labels: supportability, timestamp
>
> I am using this clause to filter a query against a table with partition columns (year,month,day,hour):
> select * from someTable where  
>  cast(concat(cast(year as string), '-', 
>            lpad(cast(month as string), 2, "0"), "-", 
>            lpad(cast(day as string), 2, "0"), " ", 
>            lpad(cast(hour as string), 2, "0"), ":00:00"
>     ) as timestamp) > date_sub(cast('2016-07-15T04:45:15Z' as timestamp), interval 5000001 hour)
> And I get back a non-empty result set.
> However, if I bump up the interval to 6000001, I get back an empty result set.
> This should produce a warning but it does not because the predicate is constant and is evaluated by the FE which cannot propagate the expr warnings.
> Executing the following query does result in the expected warning because the BE executes the fn:
> {code}
> [localhost:21000] > select date_sub(cast('2016-07-15T04:45:15Z' as timestamp), interval 6000001 hour);
> Query: select date_sub(cast('2016-07-15T04:45:15Z' as timestamp), interval 6000001 hour)
> Query submitted at: 2016-08-09 13:01:20 (Coordinator: http://0.0.0.0:25000)
> Query progress can be monitored at: http://0.0.0.0:25000/query_plan?query_id=8e495db99ec360d3:44dec66f8285dbbe
> +----------------------------------------------------------------------------+
> | date_sub(cast('2016-07-15t04:45:15z' as timestamp), interval 6000001 hour) |
> +----------------------------------------------------------------------------+
> | NULL                                                                       |
> +----------------------------------------------------------------------------+
> WARNINGS: UDF WARNING: Cannot subtract interval 6000001: Year is out of valid range: 1400..10000
> Fetched 1 row(s) in 0.01s
> {code}



--
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