You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zhihua Deng (Jira)" <ji...@apache.org> on 2026/04/15 22:57:00 UTC

[jira] [Resolved] (HIVE-29481) Select queries fail with java.lang.NumberFormatException, when table is created with 'transactional'='false' and 'transactional_properties'='insert_only'

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

Zhihua Deng resolved HIVE-29481.
--------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

> Select queries fail with java.lang.NumberFormatException, when table is created with 'transactional'='false' and 'transactional_properties'='insert_only' 
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-29481
>                 URL: https://issues.apache.org/jira/browse/HIVE-29481
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>         Environment: {code:java}
> {code}
>            Reporter: Venugopal Reddy K
>            Assignee: Venugopal Reddy K
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> *[Description]*
> Select queries fail with ("Error: Error while compiling statement: java.io.IOException: java.lang.NumberFormatException: For input string: "0000_copy_1") when table is created with properties 'transactional'='false' and 'transactional_properties'='insert_only'.
> *[Steps to reproduce]*
>  # Create a table with tblproperties 'transactional'='false' and 'transactional_properties'='insert_only'.
>  # Insert some data into it.
>  # Run a select query on it. Fails with java.lang.NumberFormatException: For input string: "0000_copy_1" exception.
> {code:java}
> 0: jdbc:hive2://localhost:10000> create table t1 (i int) tblproperties('transactional'='false','transactional_properties'='insert_only');
> 0: jdbc:hive2://localhost:10000> 
> 0: jdbc:hive2://localhost:10000> desc formatted t1;
> +-------------------------------+---------------------------------------------------+----------------------------------------------------+
> |           col_name            |                     data_type                     |                      comment                       |
> +-------------------------------+---------------------------------------------------+----------------------------------------------------+
> | i                             | int                                               |                                                    |
> |                               | NULL                                              | NULL                                               |
> | # Detailed Table Information  | NULL                                              | NULL                                               |
> | Database:                     | default                                           | NULL                                               |
> | OwnerType:                    | USER                                              | NULL                                               |
> | Owner:                        | hive                                              | NULL                                               |
> | CreateTime:                   | Tue Mar 03 23:16:42 IST 2026                      | NULL                                               |
> | LastAccessTime:               | UNKNOWN                                           | NULL                                               |
> | Retention:                    | 0                                                 | NULL                                               |
> | Location:                     | file:/tmp/warehouse/managed/t1                    | NULL                                               |
> | Table Type:                   | MANAGED_TABLE                                     | NULL                                               |
> | Table Parameters:             | NULL                                              | NULL                                               |
> |                               | COLUMN_STATS_ACCURATE                             | {\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"i\":\"true\"}} |
> |                               | bucketing_version                                 | 2                                                  |
> |                               | numFiles                                          | 0                                                  |
> |                               | numRows                                           | 0                                                  |
> |                               | rawDataSize                                       | 0                                                  |
> |                               | totalSize                                         | 0                                                  |
> |                               | transactional_properties                          | insert_only                                        |
> |                               | transient_lastDdlTime                             | 1772560002                                         |
> |                               | NULL                                              | NULL                                               |
> | # Storage Information         | NULL                                              | NULL                                               |
> | SerDe Library:                | org.apache.hadoop.hive.ql.io.orc.OrcSerde         | NULL                                               |
> | InputFormat:                  | org.apache.hadoop.hive.ql.io.orc.OrcInputFormat   | NULL                                               |
> | OutputFormat:                 | org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat  | NULL                                               |
> | Compressed:                   | No                                                | NULL                                               |
> | Num Buckets:                  | -1                                                | NULL                                               |
> | Bucket Columns:               | []                                                | NULL                                               |
> | Sort Columns:                 | []                                                | NULL                                               |
> | Storage Desc Params:          | NULL                                              | NULL                                               |
> |                               | serialization.format                              | 1                                                  |
> +-------------------------------+---------------------------------------------------+----------------------------------------------------+
> 31 rows selected (0.264 seconds)
> 0: jdbc:hive2://localhost:10000> insert into t1 values (1),(2),(3);
> 0: jdbc:hive2://localhost:10000> select * from t1;
> INFO  : Compiling command(queryId=kvenureddy_20260303232617_1c894296-edfa-4c81-b45e-255d6e874ade): select * from t1
> INFO  : Semantic Analysis Completed (retrial = false)
> INFO  : Created Hive schema: Schema(fieldSchemas:[FieldSchema(name:t1.i, type:int, comment:null)], properties:null)
> INFO  : Completed compiling command(queryId=kvenureddy_20260303232617_1c894296-edfa-4c81-b45e-255d6e874ade); Time taken: 0.163 seconds
> INFO  : Executing command(queryId=kvenureddy_20260303232617_1c894296-edfa-4c81-b45e-255d6e874ade): select * from t1
> INFO  : Completed executing command(queryId=kvenureddy_20260303232617_1c894296-edfa-4c81-b45e-255d6e874ade); Time taken: 0.0 seconds
> ERROR : Failed with exception java.io.IOException:java.lang.NumberFormatException: For input string: "0000_copy_1"
> java.io.IOException: java.lang.NumberFormatException: For input string: "0000_copy_1"
>  at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:628)
>  at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:535)
>  at org.apache.hadoop.hive.ql.exec.FetchTask.executeInner(FetchTask.java:194)
>  at org.apache.hadoop.hive.ql.exec.FetchTask.execute(FetchTask.java:95)
>  at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:196)
>  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:142)
>  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:137)
>  at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:190)
>  at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:234)
>  at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:334)
>  at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
>  at java.base/javax.security.auth.Subject.doAs(Subject.java:525)
>  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899)
>  at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:354)
>  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
>  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
>  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
>  at java.base/java.lang.Thread.run(Thread.java:1583)
> Caused by: java.lang.NumberFormatException: For input string: "0000_copy_1"
>  at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
>  at java.base/java.lang.Integer.parseInt(Integer.java:662)
>  at java.base/java.lang.Integer.parseInt(Integer.java:778)
>  at org.apache.hadoop.hive.ql.io.AcidUtils$ParsedDeltaLight.parse(AcidUtils.java:1082)
>  at org.apache.hadoop.hive.ql.io.AcidUtils.parsedDelta(AcidUtils.java:1262)
>  at org.apache.hadoop.hive.ql.io.AcidUtils.processDeltaDir(AcidUtils.java:1911)
>  at org.apache.hadoop.hive.ql.io.AcidUtils.getChildState(AcidUtils.java:1858)
>  at org.apache.hadoop.hive.ql.io.AcidUtils.getAcidState(AcidUtils.java:1355)
>  at org.apache.hadoop.hive.ql.io.AcidUtils.getAcidState(AcidUtils.java:1321)
>  at org.apache.hadoop.hive.ql.io.HiveInputFormat.processForWriteIdsForMmRead(HiveInputFormat.java:734)
>  at org.apache.hadoop.hive.ql.io.HiveInputFormat.processPathsForMmRead(HiveInputFormat.java:683)
>  at org.apache.hadoop.hive.ql.exec.FetchOperator.processCurrPathForMmWriteIds(FetchOperator.java:470)
>  at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextSplits(FetchOperator.java:385)
>  at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:310)
>  at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:566)
>  ... 18 more
>  
> Error: Error while compiling statement: java.io.IOException: java.lang.NumberFormatException: For input string: "0000_copy_1"; Query ID: kvenureddy_20260303232617_1c894296-edfa-4c81-b45e-255d6e874ade (state=,code=1)
> 0: jdbc:hive2://localhost:10000> 
> {code}
>  
>  



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