Skip to content

[core] Register IsNaN for predicate JSON deserialization - #10917

Merged
JingsongLi merged 1 commit into
apache:masterfrom
skyyyy955:fix/isnan-predicate-json-20261101
Nov 1, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
skyyyy955:fix/isnan-predicate-json-20261101

Conversation

@skyyyy955

Copy link
Copy Markdown
Contributor

Purpose

An IS_NAN row filter returned by query authorization fails while planning a scan with Could not resolve leaf function 'IS_NAN'. IsNaN already serializes to this name, but LeafFunction does not register it for JSON deserialization.

Register IsNaN.INSTANCE with the existing leaf functions.

Tests

  • Add FLOAT and DOUBLE cases to PredicateJsonSerdeTest for exact JSON parsing and serialization round trips.
  • Add IsNaNQueryAuthTest: write and commit a Parquet table containing NaN, a finite number, signed zeros, infinities and null; then read only the ID column under an IS_NAN authorization filter and check that only the NaN row remains. The catalog response is mocked; table storage, scanning and reading use the real implementation.

The four new JSON parsing checks and both table-read cases fail on the upstream baseline before the fix. With the fix, the same five test classes pass: 125 JUnit invocations, including the existing query-auth and split serialization tests. The existing serde test provider also invokes no-op branches for fixtures that do not apply to a given test method.

Validated on Windows with JDK 8, with Checkstyle, Spotless and Enforcer enabled. The fresh reactor was packaged first to prepare codegen-loader resources; the final test run used:

mvn -o -B -ntp -pl paimon-core -am -DwildcardSuites=none -DfailIfNoTests=false \
  -Dtest=PredicateJsonSerdeTest,IsNaNQueryAuthTest,TableQueryAuthResultTest,QueryAuthSplitTest,NestedFieldQueryAuthTest test

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 121cdae into apache:master Nov 1, 2026
18 checks passed
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.

2 participants