[ 
https://issues.apache.org/jira/browse/HIVE-30259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

László Bodor updated HIVE-30259:
--------------------------------
    Attachment: Screenshot 2026-11-12 at 14.22.38.png

> SQLOperation: a query that times out while compiling should report a timeout
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-30259
>                 URL: https://issues.apache.org/jira/browse/HIVE-30259
>             Project: Hive
>          Issue Type: Bug
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>         Attachments: Screenshot 2026-11-12 at 14.22.38.png
>
>
> When hive.query.timeout.seconds expires while the query is still compiling, 
> the client gets a generic SQLException instead of a SQLTimeoutException:
>   org.apache.hive.service.cli.HiveSQLException: Illegal Operation state 
> transition from TIMEDOUT to ERROR
> The timeout timer is started in SQLOperation.prepare() before the query is 
> compiled. When it fires, the operation moves to TIMEDOUT and the compilation 
> is cancelled. The compile failure then makes prepare() set the state to 
> ERROR, and the TIMEDOUT -> ERROR transition is illegal. runQuery() already 
> leaves a terminal state alone when the query fails; prepare() should do the 
> same, so that the client sees TIMEDOUT and the "Query timed out after N 
> seconds" message (HIVE-28265).
> This shows up as a flaky TestJdbcDriver2#testURLWithHiveQueryTimeoutSeconds 
> (and the other timeout tests) on slow or loaded hosts. It can be reproduced 
> by running them on half a CPU, e.g. inside "docker run --cpus=0.5".



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to