Skip to content

fix(spec): accept the legacy first_not_null_value aggregate name - #794

Merged
JingsongLi merged 1 commit into
apache:mainfrom
jackylee-ch:fix/legacy-aggregate-name
Sep 10, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
jackylee-ch:fix/legacy-aggregate-name

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

Java registers first_not_null_value as an SPI alias of first_non_null_value:
FieldFirstNonNullValueAggLegacyFactory sits next to the canonical factory in
META-INF/services/org.apache.paimon.factories.Factory and builds the same
aggregator. It is deliberate rather than residue — it survives the switch-case to
SPI refactor in #4335 and FirstValueAggregationITCase still creates a table with
it — but undocumented, so nothing advertises it.

Rust rejected the name at all three sites that key off it, so a table written by
Java or Flink planned fine and then failed once rows were pulled, with
ConfigInvalid: Unknown aggregate function 'first_not_null_value'. CREATE and
ALTER rejected it outright. The write path never checks the name, which is why
this only surfaces where the merge function is built.

Resolved through a single canonicalization point rather than one arm per site: the
validator/constructor guard test iterates a hardcoded name list, so a one-sided
edit would slip past it. Matching is exact, mirroring FactoryUtil#discoverFactory,
which compares identifiers with equals.

The alias stays out of the supported: ... hint — Java does not document it, so it
is read but never suggested — and errors still echo whatever the user wrote.

FieldAggregator::name is &'static str, so the aggregator reports the canonical
name. That costs no parity: the only Java message repeating the configured
identifier is the retract rejection, and retract is refused here before an
aggregator exists.

@QuakeWang QuakeWang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JingsongLi
JingsongLi merged commit 78e7ebb into apache:main Sep 10, 2026
14 checks passed
jerry-024 added a commit to jerry-024/paimon-rust that referenced this pull request Sep 14, 2026
…em-table

* upstream/main:
  feat(datafusion): support ANALYZE TABLE on catalog-managed format tables (apache#815)
  refactor(table): unify vector search scan and read APIs (apache#822)
  fix(rest): sign the query string the client actually sends (apache#821)
  feat(datafusion): add MSCK REPAIR TABLE for catalog-managed format tables (apache#817)
  feat(table): execute a primary-key vector search over engine-planned splits (apache#771)
  feat(datafusion): add SHOW, ADD and DROP PARTITION for catalog-managed format tables (apache#816)
  feat(table): read the registered partitions of a catalog-managed format table (apache#814)
  fix: report unsupported time travel instead of returning current data (apache#753)
  fix(file_index): skip pruning for narrowing integer schema changes (apache#806)
  fix(c): align append vector filter with core behavior (apache#793)
  fix(table): skip staging files and list format table partitions concurrently (apache#813)
  feat(rest): add partition registration, lookup and statistics APIs (apache#812)
  fix(datafusion): keep format table partition columns out of decoder filters (apache#811)
  fix(read): null-fill nested fields a data file predates (apache#805)
  fix(scan): prune NOT IN predicates using file stats (apache#795)
  fix(spec): accept the legacy first_not_null_value aggregate name (apache#794)
  fix(table): check batch arity instead of asserting it in debug builds (apache#801)
  fix(vindex): bound a deletion-vector position by its own source file (apache#802)
  fix(lumina): decide on the index size before parsing the metric (apache#803)

# Conflicts:
#	crates/integrations/datafusion/src/physical_plan/scan.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants