apache / incubator-gluten

Gluten is a middle layer responsible for offloading JVM-based SQL engines' execution to native engines.
https://gluten.apache.org/
Apache License 2.0
1.21k stars 435 forks source link

read iceberg table fail for timestamp type column. #6514

Open j7nhai opened 3 months ago

j7nhai commented 3 months ago

Backend

VL (Velox)

Bug description

throw exception when iceberg with single timestamp column.

spark-sql> CREATE TABLE timestamp_test (
         >   timestamp_col TIMESTAMP
         > ) USING iceberg;
Time taken: 0.029 seconds
spark-sql>
         > INSERT INTO timestamp_test VALUES (
         >   TIMESTAMP '2022-01-01 00:00:00'
         > );
Time taken: 0.093 seconds
spark-sql>
         > SELECT * FROM timestamp_test;
E20240719 11:27:29.049535 2611175 Exceptions.h:67] Line: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h:448, Function:readInt, Expression:  , Source: RUNTIME, ErrorCode: NOT_IMPLEMENTED
24/07/19 11:27:29 ERROR TaskResources: Task 14 failed by error:
org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/timestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:39)
    at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
    at org.apache.gluten.utils.iterator.IteratorsV1$InvocationFlowProtection.hasNext(IteratorsV1.scala:159)
    at org.apache.gluten.utils.iterator.IteratorsV1$IteratorCompleter.hasNext(IteratorsV1.scala:71)
    at org.apache.gluten.utils.iterator.IteratorsV1$PayloadCloser.hasNext(IteratorsV1.scala:37)
    at org.apache.gluten.utils.iterator.IteratorsV1$LifeTimeAccumulator.hasNext(IteratorsV1.scala:100)
    at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
    at scala.collection.Iterator.isEmpty(Iterator.scala:387)
    at scala.collection.Iterator.isEmpty$(Iterator.scala:387)
    at org.apache.spark.InterruptibleIterator.isEmpty(InterruptibleIterator.scala:28)
    at org.apache.gluten.execution.VeloxColumnarToRowExec$.toRowIterator(VeloxColumnarToRowExec.scala:108)
    at org.apache.gluten.execution.VeloxColumnarToRowExec.$anonfun$doExecuteInternal$1(VeloxColumnarToRowExec.scala:79)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:855)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:855)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
    at org.apache.spark.scheduler.Task.run(Task.scala:136)
    at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
    at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1504)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
    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)
Caused by: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.nativeHasNext(Native Method)
    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.hasNextInternal(ColumnarBatchOutIterator.java:61)
    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:37)
    ... 27 more
24/07/19 11:27:29 ERROR Executor: Exception in task 0.0 in stage 14.0 (TID 14)
org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:39)
    at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
    at org.apache.gluten.utils.iterator.IteratorsV1$InvocationFlowProtection.hasNext(IteratorsV1.scala:159)
    at org.apache.gluten.utils.iterator.IteratorsV1$IteratorCompleter.hasNext(IteratorsV1.scala:71)
    at org.apache.gluten.utils.iterator.IteratorsV1$PayloadCloser.hasNext(IteratorsV1.scala:37)
    at org.apache.gluten.utils.iterator.IteratorsV1$LifeTimeAccumulator.hasNext(IteratorsV1.scala:100)
    at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
    at scala.collection.Iterator.isEmpty(Iterator.scala:387)
    at scala.collection.Iterator.isEmpty$(Iterator.scala:387)
    at org.apache.spark.InterruptibleIterator.isEmpty(InterruptibleIterator.scala:28)
    at org.apache.gluten.execution.VeloxColumnarToRowExec$.toRowIterator(VeloxColumnarToRowExec.scala:108)
    at org.apache.gluten.execution.VeloxColumnarToRowExec.$anonfun$doExecuteInternal$1(VeloxColumnarToRowExec.scala:79)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:855)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:855)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
    at org.apache.spark.scheduler.Task.run(Task.scala:136)
    at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
    at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1504)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
    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)
Caused by: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.nativeHasNext(Native Method)
    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.hasNextInternal(ColumnarBatchOutIterator.java:61)
    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:37)
    ... 27 more
24/07/19 11:27:29 WARN TaskSetManager: Lost task 0.0 in stage 14.0 (TID 14) (9.134.12.69 executor driver): org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:39)
    at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
    at org.apache.gluten.utils.iterator.IteratorsV1$InvocationFlowProtection.hasNext(IteratorsV1.scala:159)
    at org.apache.gluten.utils.iterator.IteratorsV1$IteratorCompleter.hasNext(IteratorsV1.scala:71)
    at org.apache.gluten.utils.iterator.IteratorsV1$PayloadCloser.hasNext(IteratorsV1.scala:37)
    at org.apache.gluten.utils.iterator.IteratorsV1$LifeTimeAccumulator.hasNext(IteratorsV1.scala:100)
    at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
    at scala.collection.Iterator.isEmpty(Iterator.scala:387)
    at scala.collection.Iterator.isEmpty$(Iterator.scala:387)
    at org.apache.spark.InterruptibleIterator.isEmpty(InterruptibleIterator.scala:28)
    at org.apache.gluten.execution.VeloxColumnarToRowExec$.toRowIterator(VeloxColumnarToRowExec.scala:108)
    at org.apache.gluten.execution.VeloxColumnarToRowExec.$anonfun$doExecuteInternal$1(VeloxColumnarToRowExec.scala:79)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:855)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:855)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
    at org.apache.spark.scheduler.Task.run(Task.scala:136)
    at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
    at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1504)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
    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)
Caused by: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.nativeHasNext(Native Method)
    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.hasNextInternal(ColumnarBatchOutIterator.java:61)
    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:37)
    ... 27 more

24/07/19 11:27:29 ERROR TaskSetManager: Task 0 in stage 14.0 failed 1 times; aborting job
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 14.0 failed 1 times, most recent failure: Lost task 0.0 in stage 14.0 (TID 14) (9.134.12.69 executor driver): org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:39)
    at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
    at org.apache.gluten.utils.iterator.IteratorsV1$InvocationFlowProtection.hasNext(IteratorsV1.scala:159)
    at org.apache.gluten.utils.iterator.IteratorsV1$IteratorCompleter.hasNext(IteratorsV1.scala:71)
    at org.apache.gluten.utils.iterator.IteratorsV1$PayloadCloser.hasNext(IteratorsV1.scala:37)
    at org.apache.gluten.utils.iterator.IteratorsV1$LifeTimeAccumulator.hasNext(IteratorsV1.scala:100)
    at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
    at scala.collection.Iterator.isEmpty(Iterator.scala:387)
    at scala.collection.Iterator.isEmpty$(Iterator.scala:387)
    at org.apache.spark.InterruptibleIterator.isEmpty(InterruptibleIterator.scala:28)
    at org.apache.gluten.execution.VeloxColumnarToRowExec$.toRowIterator(VeloxColumnarToRowExec.scala:108)
    at org.apache.gluten.execution.VeloxColumnarToRowExec.$anonfun$doExecuteInternal$1(VeloxColumnarToRowExec.scala:79)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:855)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:855)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
    at org.apache.spark.scheduler.Task.run(Task.scala:136)
    at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
    at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1504)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
    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)
Caused by: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.nativeHasNext(Native Method)
    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.hasNextInternal(ColumnarBatchOutIterator.java:61)
    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:37)
    ... 27 more

Driver stacktrace:
    at org.apache.spark.scheduler.DAGScheduler.failJobAndIndependentStages(DAGScheduler.scala:2672)
    at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2(DAGScheduler.scala:2608)
    at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2$adapted(DAGScheduler.scala:2607)
    at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
    at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
    at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:2607)
    at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1(DAGScheduler.scala:1182)
    at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1$adapted(DAGScheduler.scala:1182)
    at scala.Option.foreach(Option.scala:407)
    at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:1182)
    at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2860)
    at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2802)
    at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2791)
    at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
    at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:952)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:2228)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:2249)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:2268)
    at org.apache.spark.SparkContext.runJob(SparkContext.scala:2293)
    at org.apache.spark.rdd.RDD.$anonfun$collect$1(RDD.scala:1021)
    at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
    at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
    at org.apache.spark.rdd.RDD.withScope(RDD.scala:406)
    at org.apache.spark.rdd.RDD.collect(RDD.scala:1020)
    at org.apache.spark.sql.execution.SparkPlan.executeCollect(SparkPlan.scala:424)
    at org.apache.spark.sql.execution.SparkPlan.executeCollectPublic(SparkPlan.scala:451)
    at org.apache.spark.sql.execution.HiveResult$.hiveResultString(HiveResult.scala:76)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLDriver.$anonfun$run$2(SparkSQLDriver.scala:69)
    at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:109)
    at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:169)
    at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:95)
    at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:779)
    at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:64)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLDriver.run(SparkSQLDriver.scala:69)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.processCmd(SparkSQLCLIDriver.scala:384)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.$anonfun$processLine$1(SparkSQLCLIDriver.scala:504)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.$anonfun$processLine$1$adapted(SparkSQLCLIDriver.scala:498)
    at scala.collection.Iterator.foreach(Iterator.scala:943)
    at scala.collection.Iterator.foreach$(Iterator.scala:943)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
    at scala.collection.IterableLike.foreach(IterableLike.scala:74)
    at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
    at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.processLine(SparkSQLCLIDriver.scala:498)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver$.main(SparkSQLCLIDriver.scala:286)
    at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.main(SparkSQLCLIDriver.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
    at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958)
    at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
    at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
    at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
    at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: org.apache.gluten.exception.GlutenException: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:39)
    at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:45)
    at org.apache.gluten.utils.iterator.IteratorsV1$InvocationFlowProtection.hasNext(IteratorsV1.scala:159)
    at org.apache.gluten.utils.iterator.IteratorsV1$IteratorCompleter.hasNext(IteratorsV1.scala:71)
    at org.apache.gluten.utils.iterator.IteratorsV1$PayloadCloser.hasNext(IteratorsV1.scala:37)
    at org.apache.gluten.utils.iterator.IteratorsV1$LifeTimeAccumulator.hasNext(IteratorsV1.scala:100)
    at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
    at scala.collection.Iterator.isEmpty(Iterator.scala:387)
    at scala.collection.Iterator.isEmpty$(Iterator.scala:387)
    at org.apache.spark.InterruptibleIterator.isEmpty(InterruptibleIterator.scala:28)
    at org.apache.gluten.execution.VeloxColumnarToRowExec$.toRowIterator(VeloxColumnarToRowExec.scala:108)
    at org.apache.gluten.execution.VeloxColumnarToRowExec.$anonfun$doExecuteInternal$1(VeloxColumnarToRowExec.scala:79)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2(RDD.scala:855)
    at org.apache.spark.rdd.RDD.$anonfun$mapPartitions$2$adapted(RDD.scala:855)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
    at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:365)
    at org.apache.spark.rdd.RDD.iterator(RDD.scala:329)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
    at org.apache.spark.scheduler.Task.run(Task.scala:136)
    at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:548)
    at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1504)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:551)
    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)
Caused by: org.apache.gluten.exception.GlutenException: Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: NOT_IMPLEMENTED
Retriable: False
Context: Split [Hive: /home/j7nhai/wh/my_test_databasetimestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet 4 - 477] Task Gluten_Stage_14_TID_14_VTID_7
Additional Context: Operator: TableScan[0] 0
Function: readInt
File: /opt/gluten/ep/build-velox/build/velox_ep/./velox/dwio/common/IntDecoder.h
Line: 448
Stack trace:
# 0  _ZN8facebook5velox7process10StackTraceC1Ei
# 1  _ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
# 2  _ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorENS1_22CompileTimeEmptyStringEEEvRKNS1_18VeloxCheckFailArgsET0_
# 3  _ZN8facebook5velox4dwio6common10IntDecoderILb1EE7readIntInEET_v
# 4  _ZN8facebook5velox7parquet10PageReader15readWithVisitorINS0_4dwio6common13ColumnVisitorInNS0_6common10AlwaysTrueENS5_15ExtractToReaderELb1EEEEEvRT_
# 5  _ZN8facebook5velox4dwio6common28SelectiveIntegerColumnReader10readHelperINS0_7parquet19IntegerColumnReaderENS0_6common10AlwaysTrueELb1ENS2_15ExtractToReaderEEEvPNS7_6FilterEN5folly5RangeIPKiEET2_
# 6  _ZN8facebook5velox7parquet21TimestampColumnReader4readEiN5folly5RangeIPKiEEPKm
# 7  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4readEiN5folly5RangeIPKiEEPKm
# 8  _ZN8facebook5velox4dwio6common31SelectiveStructColumnReaderBase4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS2_8MutationE
# 9  _ZN8facebook5velox7parquet16ParquetRowReader4nextEmRSt10shared_ptrINS0_10BaseVectorEEPKNS0_4dwio6common8MutationE
# 10 _ZN8facebook5velox9connector4hive7iceberg18IcebergSplitReader4nextEmRSt10shared_ptrINS0_10BaseVectorEE
# 11 _ZN8facebook5velox9connector4hive14HiveDataSource4nextEmRN5folly10SemiFutureINS4_4UnitEEE
# 12 _ZN8facebook5velox4exec9TableScan9getOutputEv
# 13 _ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
# 14 _ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
# 15 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
# 16 _ZN6gluten24WholeStageResultIterator4nextEv
# 17 Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext
# 18 0x00007f0879017de7

    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.nativeHasNext(Native Method)
    at org.apache.gluten.vectorized.ColumnarBatchOutIterator.hasNextInternal(ColumnarBatchOutIterator.java:61)
    at org.apache.gluten.vectorized.GeneralOutIterator.hasNext(GeneralOutIterator.java:37)
    ... 27 more

Spark version

None

Spark configurations

No response

System information

No response

Relevant logs

No response

j7nhai commented 3 months ago

Can you provide some debugging suggestions? @liujiayi771

liujiayi771 commented 3 months ago

@j7nhai This is not related to Iceberg reader; rather, it's that Velox is unable to handle your parquet file. Which engine wrote the iceberg table? I have encountered this issue when reading timestamps written by StarRocks, where the parquet timestamps written by SR lacked some information.

You can use duckdb to read the schema of this parquet file. It may also be a specific timestamp type that is not yet supported by Velox.

select * from parquet_schema('xx.parquet');
j7nhai commented 3 months ago

@j7nhai This is not related to Iceberg reader; rather, it's that Velox is unable to handle your parquet file. Which engine wrote the iceberg table? I have encountered this issue when reading timestamps written by StarRocks, where the parquet timestamps written by SR lacked some information.

@liujiayi771

I wrote the iceberg table by spark-3.3 + iceberg-1.3.0. Here is the code I created the test data.

spark-sql> CREATE TABLE timestamp_test (
         >   timestamp_col TIMESTAMP
         > ) USING iceberg;
Time taken: 0.029 seconds
spark-sql>
         > INSERT INTO timestamp_test VALUES (
         >   TIMESTAMP '2022-01-01 00:00:00'
         > );

So the parquet file is created by iceberg. Maybe Velox is not able to handle the parquet files created by iceberg with timestamp? Or there is something wrong for substrait? I don't have any debugging idea right now.

liujiayi771 commented 3 months ago

@j7nhai Can you use duckdb to read the schema information of this parquet file? I can help you take a look at it. I updated the duckdb sql in my previous response.

j7nhai commented 3 months ago
D select * from parquet_schema("/data/j7nhai/wh/my_test_database/timestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet");
+-----------------------------------------------------------------------------------------------------------------------------+---------------+-------+-------------+-----------------+--------------+------------------+-------+-----------+----------+-----------------------------------------------------------------------------------------------------+
|                                                          file_name                                                          |     name      | type  | type_length | repetition_type | num_children |  converted_type  | scale | precision | field_id |                                            logical_type                                             |
+-----------------------------------------------------------------------------------------------------------------------------+---------------+-------+-------------+-----------------+--------------+------------------+-------+-----------+----------+-----------------------------------------------------------------------------------------------------+
| /data/j7nhai/wh/my_test_database/timestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet            | table         |       |             |                 | 1            |                  |       |           |          |                                                                                                     |
| /data/j7nhai/wh/my_test_database/timestamp_test/data/00000-13-073df184-31d4-445c-aeef-b3cc036c693e-00001.parquet            | timestamp_col | INT64 |             | REQUIRED        |              | TIMESTAMP_MICROS |       |           | 1        | TimestampType(isAdjustedToUTC=1, unit=TimeUnit(MILLIS=<null>, MICROS=MicroSeconds(), NANOS=<null>)) |
+-----------------------------------------------------------------------------------------------------------------------------+---------------+-------+-------------+-----------------+--------------+------------------+-------+-----------+----------+-----------------------------------------------------------------------------------------------------+

@liujiayi771  thx!
liujiayi771 commented 3 months ago

@j7nhai For int64 timestamps, you'll need to wait for this pull request to be merged. https://github.com/facebookincubator/velox/pull/8325

j7nhai commented 3 months ago

@j7nhai For int64 timestamps, you'll need to wait for this pull request to be merged. facebookincubator/velox#8325

@liujiayi771 thx, but i am confused that if the partition column is timestamp, the file can be read by native even if it's int64.

the substrait:

{
  "relations": [{
    "root": {
      "input": {
        "read": {
          "common": {
            "direct": {
            }
          },
          "baseSchema": {
            "names": ["col"],
            "struct": {
              "types": [{
                "timestamp": {
                  "nullability": "NULLABILITY_NULLABLE"
                }
              }]
            },
            "columnTypes": ["PARTITION_COL"]
          },
          "advancedExtension": {
            "optimization": {
              "@type": "/google.protobuf.StringValue",
              "value": "isMergeTree\u003d0\n"
            }
          }
        }
      },
      "names": ["col#1", "col#1"]
    }
  }]
}

and the schema from duckdb:

select * from parquet_schema("/data/j7nhai/wh/my_test_databases/part_ts/data/col=2021-12-31T16%3A00Z/00154-1-891d43cb-312e-49d2-b88c-880f1fe026f8-00001.parquet");
+---------------------------------------------------------------------------------------------------------------------------------------------+-------+-------+-------------+-----------------+--------------+------------------+-------+-----------+----------+-----------------------------------------------------------------------------------------------------+
|                                                                  file_name                                                                  | name  | type  | type_length | repetition_type | num_children |  converted_type  | scale | precision | field_id |                                            logical_type                                             |
+---------------------------------------------------------------------------------------------------------------------------------------------+-------+-------+-------------+-----------------+--------------+------------------+-------+-----------+----------+-----------------------------------------------------------------------------------------------------+
| /data/j7nhai/wh/my_test_databases/part_ts/data/col=2021-12-31T16%3A00Z/00154-1-891d43cb-312e-49d2-b88c-880f1fe026f8-00001.parquet           | table |       |             |                 | 1            |                  |       |           |          |                                                                                                     |
| /data/j7nhai/wh/my_test_databases/part_ts/data/col=2021-12-31T16%3A00Z/00154-1-891d43cb-312e-49d2-b88c-880f1fe026f8-00001.parquet           | col   | INT64 |             | REQUIRED        |              | TIMESTAMP_MICROS |       |           | 1        | TimestampType(isAdjustedToUTC=1, unit=TimeUnit(MILLIS=<null>, MICROS=MicroSeconds(), NANOS=<null>)) |
+---------------------------------------------------------------------------------------------------------------------------------------------+-------+-------+-------------+-----------------+--------------+------------------+-------+-----------+----------+-----------------------------------------------------------------------------------------------------+
liujiayi771 commented 3 months ago

@j7nhai For partition column, gluten will read the partition values and pass them to velox, velox will not read them from the parquet file.