You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Aman Raj (Jira)" <ji...@apache.org> on 2022/11/17 07:24:00 UTC

[jira] [Updated] (HIVE-22582) Avoid reading table as ACID when table name is starting with "delta" , but table is not transactional and BI Split Strategy is used

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

Aman Raj updated HIVE-22582:
----------------------------
    Fix Version/s: 3.2.0

> Avoid reading table as ACID when table name is starting with "delta" , but table is not transactional and BI Split Strategy is used
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-22582
>                 URL: https://issues.apache.org/jira/browse/HIVE-22582
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Aditya Shah
>            Assignee: Aditya Shah
>            Priority: Major
>             Fix For: 3.2.0, 4.0.0-alpha-1
>
>         Attachments: HIVE-22582.patch
>
>
> The issue is fixed in HIVE-22473 but missed a check for BI Split Strategy.
> Steps to reproduce: 
> {code:java}
> set hive.exec.orc.split.strategy=BI;
> create table delta_result (a int) stored as orc tblproperties('transactional'='false');
> insert into delta_result select 1;
> select * from delta_result;
> {code}
> Exception Stack Trace:
> {code:java}
> Caused by: java.lang.RuntimeException: ORC split generation failed with exception: String index out of range: -1
>         at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1929)
>         at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.getSplits(OrcInputFormat.java:2016)
>         at org.apache.hadoop.hive.ql.exec.FetchOperator.generateWrappedSplits(FetchOperator.java:461)
>         at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextSplits(FetchOperator.java:430)
>         at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:336)
>         at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:576)
>         ... 50 more
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1967)
>         at org.apache.hadoop.hive.ql.io.AcidUtils.parsedDelta(AcidUtils.java:1128)
>         at org.apache.hadoop.hive.ql.io.AcidUtils$ParsedDeltaLight.parse(AcidUtils.java:921)
>         at org.apache.hadoop.hive.ql.io.AcidUtils.getLogicalLength(AcidUtils.java:2084)
>         at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat$BISplitStrategy.getSplits(OrcInputFormat.java:1115)
>         at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1905)
>         ... 55 more
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)