ayushtkn commented on code in PR #4546:
URL: https://github.com/apache/hive/pull/4546#discussion_r1284127283


##########
iceberg/iceberg-handler/src/test/queries/positive/query_iceberg_virtualcol.q:
##########
@@ -2,8 +2,17 @@ drop table if exists tbl_ice;
 create external table tbl_ice(a int, b string) partitioned by (c int) stored 
by iceberg stored as orc tblproperties ('format-version'='2');
 insert into tbl_ice values (1, 'one', 50), (2, 'two', 50), (3, 'three', 50), 
(4, 'four', 52), (5, 'five', 54), (111, 'one', 52), (333, 'two', 56);
 
+select tbl_ice.ROW__POSITION from tbl_ice order by tbl_ice.ROW__POSITION;
+
 select a, c, tbl_ice.PARTITION__SPEC__ID, tbl_ice.PARTITION__HASH, 
tbl_ice.ROW__POSITION from tbl_ice
 order by tbl_ice.PARTITION__HASH, tbl_ice.ROW__POSITION desc;
 
 select a, c, tbl_ice.PARTITION__SPEC__ID, tbl_ice.PARTITION__HASH, 
tbl_ice.ROW__POSITION from tbl_ice
 sort by tbl_ice.PARTITION__HASH, tbl_ice.ROW__POSITION desc;
+
+
+-- create a table with more than 4 columns
+create table ice01 (a int, b int, c int, d int, e int) stored by iceberg 
tblproperties ('format-version'='2');
+insert into ice01 values (1,2,3,4,5), (6,7,8,9,10);
+
+select ice01.ROW__POSITION from ice01 order by ice01.ROW__POSITION;

Review Comment:
   I tried again and it reproduced, may be the order by clause which I added 
here for the sake of test is doing something. I ran the current test reverting 
the prod fix & it failed.
   ```
   [ERROR] Failures: 
   [ERROR]   TestIcebergCliDriver.testCliDriver:61 Client execution failed with 
error code = 1 
   running 
   
   select tbl_ice.ROW__POSITION from tbl_ice 
   fname=query_iceberg_virtualcol.q
   
   See ./ql/target/tmp/log/hive.log or ./itests/qtest/target/tmp/log/hive.log, 
or check ./ql/target/surefire-reports or 
./itests/qtest/target/surefire-reports/ for specific test cases logs.
    java.lang.RuntimeException: java.io.IOException: 
java.lang.IndexOutOfBoundsException: start index (4) must not be greater than 
size (3)
           at 
org.apache.hadoop.hive.ql.exec.FetchTask.executeInner(FetchTask.java:210)
           at 
org.apache.hadoop.hive.ql.exec.FetchTask.execute(FetchTask.java:95)
           at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:212)
           at org.apache.hadoop.hive.ql.Driver.run(Driver.java:154)
           at org.apache.hadoop.hive.ql.Driver.run(Driver.java:149)
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to