[VL] Flaky test on Delta insert
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 657
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 85
Description
### Backend
VL (Velox)
### Bug description
https://github.com/apache/incubator-gluten/actions/runs/21213749038/job/61120030133?pr=11460
```
08:40:27.664 ERROR org.apache.spark.task.TaskResources: Task 958 failed by error:
org.apache.spark.SparkNumberFormatException: [CAST_INVALID_INPUT] The value 'a' of the type "STRING" cannot be cast to "BIGINT" because it is malformed. Correct the value as per the syntax, or change its target type. Use `try_cast` to tolerate malformed input and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error.
== SQL(line 1, position 1) ==
INSERT INTO TABLE delta.`file:/__w/incubator-gluten/incubator-gluten/backends-velox/spark-warehouse/org.apache.spark.sql.delta.DeltaInsertIntoSQLByPathSuite/tbl` SELECT * FROM tmp_view
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at org.apache.spark.sql.errors.QueryExecutionErrors$.invalidInputInCastToNumberError(QueryExecutionErrors.scala:145)
at org.apache.spark.sql.catalyst.util.UTF8StringUtils$.withException(UTF8StringUtils.scala:51)
at org.apache.spark.sql.catalyst.util.UTF8StringUtils$.toLongExact(UTF8StringUtils.scala:31)
08:40:27.665 ERROR org.apache.spark.sql.delta.files.DeltaFileFormatWriter: Job job_20260122004027157266434489327819_1194 aborted.
08:40:27.665 ERROR org.apache.spark.executor.Executor: Exception in task 0.0 in stage 1194.0 (TID 958)
org.apache.spark.SparkException: [TASK_WRITE_FAILED] Task failed while writing rows to file:/__w/incubator-gluten/incubator-gluten/backends-velox/spark-warehouse/org.apache.spark.sql.delta.DeltaInsertIntoSQLByPathSuite/tbl.
at org.apache.spark.sql.errors.QueryExecutionErrors$.taskFailedWhileWritingRowsError(QueryExecutionErrors.scala:775)
at org.apache.spark.sql.delta.files.DeltaFileFormatWriter$.executeTask(DeltaFileFormatWriter.scala:467)
at org.apache.spark.sql.delta.files.DeltaFileFormatWriter$.$anonfun$executeWrite$3(DeltaFileFormatWriter.scala:279)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:93)
at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:166)
at org.apache.spark.scheduler.Task.run(Task.scala:141)
at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$4(Executor.scala:620)
08:40:27.666 WARN org.apache.spark.scheduler.TaskSetManager: Lost task 0.0 in stage 1194.0 (TID 958) (28728cf20a53 executor driver): org.apache.spark.SparkException: [TASK_WRITE_FAILED] Task failed while writing rows to file:/__w/incubator-gluten/incubator-gluten/backends-velox/spark-warehouse/org.apache.spark.sql.delta.DeltaInsertIntoSQLByPathSuite/tbl.
at org.apache.spark.sql.errors.QueryExecutionErrors$.taskFailedWhileWritingRowsError(QueryExecutionErrors.scala:775)
at org.apache.spark.sql.delta.files.DeltaFileFormatWriter$.executeTask(DeltaFileFormatWriter.scal...
```
### Gluten version
_No response_
### Spark version
None
### Spark configurations
_No response_
### System information
_No response_
### Relevant logs
```bash
```
Contributor guide
Research direction
Start with the referenced CI job and the DeltaInsertIntoSQLByPathSuite test identified in the log. Investigate why the insert intermittently attempts to cast 'a' to BIGINT, then make the test or underlying behavior deterministic and verify that the suite passes consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100