You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/12/02 11:10:00 UTC

[jira] [Work logged] (HIVE-26801) Query based compaction fails on tables having columns with keywords(i.e. row in this case)

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

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

                Author: ASF GitHub Bot
            Created on: 02/Dec/22 11:09
            Start Date: 02/Dec/22 11:09
    Worklog Time Spent: 10m 
      Work Description: ggangadharan opened a new pull request, #3828:
URL: https://github.com/apache/hive/pull/3828

   ### What changes were proposed in this pull request?
   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.
   
   
   ### Why are the changes needed?
   This fixes the current bug with Query based compaction
   
   
   ### Does this PR introduce _any_ user-facing change?
   NO
   
   
   ### How was this patch tested?
   Currently tested manually, and added a UT to TestCrudCompactorOnTez#testCompactionShouldNotFailOnKeywordField
   




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

            Worklog Id:     (was: 830615)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  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)