[VL] Pandas UDFs fail with "Cannot retain a released vector" on partitions with more than one batch

オープン
#13,706 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@LuciferYang がすでに取り組んでいます。

2026年11月21日 から。

  • #13707 @LuciferYang による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
pandas, python, scala, spark

調査の方向性

The failure is in ColumnarArrowEvalPythonExec.scala, where adjustRefCnt retains vectors that RefCountedArrowColumnVector.java has already released after the first joined batch. Read how the Python runner's reader reuses the Arrow stream root's vectors, then reproduce with a pandas UDF over a 10,000-row Parquet partition. Done means the second batch no longer hits the released-vector error; PR #13707 is already open against this, so check it first.

索引モデルが issue の本文から書いたものです。

説明

Since #13280, a scalar pandas UDF that runs in ColumnarArrowEvalPythonExec fails when a partition sends more than one batch to Python, which happens once a partition has more than spark.gluten.sql.columnar.maxBatchSize rows (4096 by default):

java.lang.IllegalStateException: Cannot retain a released vector
	at org.apache.gluten.vectorized.RefCountedArrowColumnVector.retain(RefCountedArrowColumnVector.java:49)
	at org.apache.spark.api.python.ColumnarArrowEvalPythonExec.adjustRefCnt(ColumnarArrowEvalPythonExec.scala:519)

The Python runner's reader returns every output batch over the same RefCountedArrowColumnVectors, which wrap the vectors of the Arrow stream reader's root. Closing the first joined batch releases them, and the second batch then retains a released vector.

It reproduces on v1.8.0-rc1 with the default configuration: a pandas UDF over a single 10,000-row Parquet partition fails.

This issue was written with the assistance of AI (Claude Opus).

主要言語
Scala
スター
1.6k
フォーク
685
平均マージ
4日 16時間
マージ済み PR(30日)
84

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/gluten のほかの issue

apache/gluten の issue をすべて見る

似ている issue

Scala の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。