[VL] Native Delta writes fail on DOUBLE partition columns instead of falling back
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- scala
- Área
- backend, databases, testing-qa
Línea de trabajo
Start with the two failing cases in org.apache.spark.sql.delta.DeltaUpdateCatalogSuite and reproduce the DOUBLE-partition write using the provided configuration. Trace the native Delta write entry point to Velox's PartitionIdGenerator.cpp and compare supported partition types with ordinary DOUBLE data columns. Done means unsupported partition columns fall back, supported partitions remain native, and regression coverage is added while the #13131 known-failure entries can be removed.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Backend
VL (Velox)
Bug description
Expected behavior: A valid Delta write partitioned by a Spark DOUBLE column should succeed. If Velox cannot write that partition type, Gluten should validate the partition columns and fall back to Spark's Delta writer before starting the write.
Current status (2026-10-19): the original tests now pass, but this does not establish native DOUBLE partition support.
The rebase of #13131 brought in #13271 and Delta 4.4.1. Delta now defaults to writing partition columns inside Parquet data files. GlutenDeltaNativeWriteGate rejects that layout for native writing and selects the vanilla Delta writer before Velox's partition-ID generation. This is a general write-layout fallback, not a check specifically rejecting DOUBLE partition columns.
Both original org.apache.spark.sql.delta.DeltaUpdateCatalogSuite cases now pass in CI run 39332447295, shard 3:
creating and replacing a table puts the schema and table properties in the metastorepartitioned table + add column
The tests still derive part as id / 2 (DOUBLE) and retain their assertions. Their temporary known-failure entries were removed in 95e93654e; the tests remain enabled.
Remaining scenario to verify: a DOUBLE partition with delta.writePartitionColumnsToParquet=false, without Iceberg compatibility or the materialized-partition-columns feature forcing partition columns into the files. The layout-based fallback no longer applies in that configuration. Its current behavior has not yet been reproduced, so neither continued failure nor full resolution should be inferred from the passing default-configured tests.
Candidate reproduction for that follow-up, using a fresh table and a Spark session configured for Delta and Gluten:
import org.apache.spark.sql.functions.col
val df = spark.range(10)
.withColumn("part", col("id") / 2)
.withColumn("id2", col("id"))
df.writeTo("delta_double_partition_repro")
.tableProperty("delta.writePartitionColumnsToParquet", "false")
.partitionedBy(col("part"))
.using("delta")
.create()
The explicit table property is the proposed follow-up condition, not part of the original observed Delta 4.2.0 failure. Keep this issue open until that scenario is verified. If unsupported partition types still reach Velox, add partition-type validation and fall back before writing; preserve native eligibility for supported partition types and ordinary DOUBLE data columns.
Original behavior (Delta 4.2.0): With native Delta writes enabled, the two tests above reached Velox's PartitionIdGenerator and failed with Unsupported partition type: DOUBLE., wrapped as [TASK_WRITE_FAILED], before their catalog assertions. #13131 exposed this in the Hive-based fixture by configuring Gluten/native Delta writing consistently. This is separate from the task-resource initialization failure and the adaptive-prefetch SIGFPE.
Original test sources:
This description was updated with assistance from GitHub Copilot 1.0.99-2 (GPT-6 Astra).
Gluten version
main branch / 1.8.0-SNAPSHOT.
Original failure: #13131 at migration commit 9388f6307c6e618ee0fab25375e1d21b006a91c4, CI merge commit a28c4edc8b4ed35c7b02dfab3fba74a2b88c765b, without an upstream Velox PR override.
Passing default-configured cases: #13131 at c2161f6c8f8be2fd42b1c98c4a8ab92313f330c4, rebased onto e920e70e453fe9d035e84fd75b635ba03324f387 (#13271).
Spark version
Spark-4.1.x. The original Delta v4.2.0 tests selected Spark 4.1.0; their CI bundle metadata reports Spark 4.1.1 and Scala 2.13.17. The passing rebased run uses Delta v4.4.1 with Spark profile 4.1.
Spark configurations
Relevant effective defaults, with native Delta writing still enabled:
spark.plugins=org.apache.gluten.GlutenPlugin
spark.shuffle.manager=org.apache.spark.shuffle.sort.ColumnarShuffleManager
spark.memory.offHeap.enabled=true
spark.memory.offHeap.size=2g
spark.default.parallelism=1
spark.sql.shuffle.partitions=5
spark.sql.ansi.enabled=false
spark.gluten.sql.ansiFallback.enabled=false
spark.gluten.sql.columnar.backend.velox.delta.enableNativeWrite=true
spark.databricks.delta.snapshotPartitions=2
The Delta fixture also configures io.delta.sql.DeltaSparkSessionExtension and org.apache.spark.sql.delta.catalog.DeltaCatalog.
For the unverified follow-up, explicitly set the table property delta.writePartitionColumnsToParquet=false and ensure no table feature forces partition columns into the data files.
System information
Original CI run 36165436135, shard 3: JDK 17.0.20, Linux runner, apache/gluten:centos-9-jdk17 test container; native build used CentOS 8 and GCC 13.3.1. IBM Velox pin: dft-2026_09_25 (340ab366bdf5a7c25c913c84730227675aad72c5).
Passing rebased run 39332447295, shard 3: Delta 4.4.1, JDK 17.0.20.1, with Gluten and native Delta writing enabled. These are different dependency snapshots; the passing result should not be attributed to new native DOUBLE support without further verification.
dev/info.sh output from the CI runners is not available; details above come from the workflow, build metadata, and test reports.
Relevant logs
Historical failure: CI job and test step, at 2026-09-25T18:52:38Z and 2026-09-25T18:53:04Z. Both XML reports and the log contain:
org.apache.spark.SparkException: [TASK_WRITE_FAILED] Task failed while writing rows ...
Cause: org.apache.gluten.exception.GlutenException: Exception: VeloxUserError
Error Source: USER
Error Code: INVALID_ARGUMENT
Reason: Unsupported partition type: DOUBLE.
Retriable: False
Expression: hashers_.back()->typeSupportsValueIds()
Function: PartitionIdGenerator
File: /work/ep/build-velox/build/velox_ep/velox/connectors/hive/PartitionIdGenerator.cpp
Line: 34
Current default-configured result: CI run 39332447295 reports both original cases as passing in both XML reporters. Its shard gate failed only because four catalog cases were still listed as known failures despite passing; there were zero new regressions. Those obsolete baseline entries were subsequently removed in 95e93654e.
- Lenguaje dominante
- Scala
- Estrellas
- 1.6k
- Forks
- 685
- Merge medio
- 4 d 16 h
- PR fusionados (30 d)
- 84
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/gluten
-
[CORE] Selecting a cost model the backend has no coster for fails with ClassNotFoundExceptionPosiblemente ocupada @LuciferYang la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 3 días
-
bug unit testing velox backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/gluten#13463 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching lengthQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
Todos los issues de apache/gluten
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rchillyard/TableParser#206 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
? - Needs Triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
NVIDIA/cudf-spark#17063 ·
Los mantenedores suelen responder en 2 días