[ 
https://issues.apache.org/jira/browse/HIVE-26801?focusedWorklogId=831419&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-831419
 ]

ASF GitHub Bot logged work on HIVE-26801:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Dec/22 12:59
            Start Date: 06/Dec/22 12:59
    Worklog Time Spent: 10m 
      Work Description: abstractdog merged PR #3828:
URL: https://github.com/apache/hive/pull/3828




Issue Time Tracking
-------------------

    Worklog Id:     (was: 831419)
    Time Spent: 40m  (was: 0.5h)

> Query based compaction fails on tables having columns with keywords(i.e. row 
> in this case)
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-26801
>                 URL: https://issues.apache.org/jira/browse/HIVE-26801
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Gopinath
>            Assignee: Gopinath
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Query-based compaction fails on tables having columns with keywords(i.e. row 
> in this case) for columns. The compaction fails while running insert into 
> statement as it does not quote the columns correctly.
> Below are the steps to reproduce the issue.
> {noformat}
> CREATE TABLE aggregated_data(`sessionid` string,`row` int,`timeofoccurrence` 
> bigint);
> insert into table aggregated_data values ("abcd",300,21111111111);
> insert into table aggregated_data values ("abcd",300,21111111111);
> alter table aggregated_data compact 'MAJOR' and wait;{noformat}
> Error - 
> {noformat}
> 2022-11-30 13:04:33,309 INFO  
> org.apache.hadoop.hive.ql.txn.compactor.QueryCompactor: [repro894918]: 
> Running major compaction via query: INSERT into table 
> default_tmp_compactor_aggregated_data_1669813472898 select 
> validate_acid_sort_order(ROW__ID.writeId, ROW__ID.bucketId, ROW__ID.rowId), 
> ROW__ID.writeId, ROW__ID.bucketId, ROW__ID.rowId, ROW__ID.writeId, 
> NAMED_STRUCT('sessionid', sessionid, 'row', row, 'timeofoccurrence', 
> timeofoccurrence)  from default.aggregated_data
> 2022-11-30 13:04:33,309 INFO  org.apache.hadoop.hive.ql.Driver: 
> [repro894918]: Compiling 
> command(queryId=hive_20221130130433_de2a8b2d-f993-44e5-8aeb-decba3342a85): 
> INSERT into table default_tmp_compactor_aggregated_data_1669813472898 select 
> validate_acid_sort_order(ROW__ID.writeId, ROW__ID.bucketId, ROW__ID.rowId), 
> ROW__ID.writeId, ROW__ID.bucketId, ROW__ID.rowId, ROW__ID.writeId, 
> NAMED_STRUCT('sessionid', sessionid, 'row', row, 'timeofoccurrence', 
> timeofoccurrence)  from default.aggregated_data
> 2022-11-30 13:04:33,314 ERROR org.apache.hadoop.hive.ql.Driver: 
> [repro894918]: FAILED: ParseException line 1:277 cannot recognize input near 
> 'row' ',' ''timeofoccurrence'' in select expression
> org.apache.hadoop.hive.ql.parse.ParseException: line 1:277 cannot recognize 
> input near 'row' ',' ''timeofoccurrence'' in select expression
>         at 
> org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:128)
>         at 
> org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:82)
>         at 
> org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:74)
>         at org.apache.hadoop.hive.ql.Compiler.parse(Compiler.java:173)
>         at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:102)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:196)
>         at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:615)
>         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:673)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:505)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:494)
>         at 
> org.apache.hadoop.hive.ql.DriverUtils.runOnDriver(DriverUtils.java:70)
>         at 
> org.apache.hadoop.hive.ql.txn.compactor.QueryCompactor.runCompactionQueries(QueryCompactor.java:133)
>         at 
> org.apache.hadoop.hive.ql.txn.compactor.MajorQueryCompactor.runCompaction(MajorQueryCompactor.java:63)
>         at 
> org.apache.hadoop.hive.ql.txn.compactor.Worker.findNextCompactionAndExecute(Worker.java:562)
>         at 
> org.apache.hadoop.hive.ql.txn.compactor.Worker.lambda$run$0(Worker.java:113)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:750){noformat}



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

Reply via email to