Skip to content

[spark] SparkFilterConverter: support AlwaysTrue/False, fix silent NaN drop#8060

Open
heye1005 wants to merge 1 commit into
apache:masterfrom
heye1005:spark-filter-converter-todos
Open

[spark] SparkFilterConverter: support AlwaysTrue/False, fix silent NaN drop#8060
heye1005 wants to merge 1 commit into
apache:masterfrom
heye1005:spark-filter-converter-todos

Conversation

@heye1005
Copy link
Copy Markdown
Contributor

@heye1005 heye1005 commented Jun 1, 2026

Purpose

fix two TODOs in SparkFilterConverter:

  • translate AlwaysTrue / AlwaysFalse
  • rewrite col = NaN to IsNaN(col) — Spark treats NaN = NaN as true, Paimon doesn't, so NaN rows were getting silently dropped on pushdown.

Tests

SparkFilterConverterTest#testAlwaysTrueFalse, #testEqualToNaN.

…rkFilterConverter

* Add AlwaysTrue / AlwaysFalse to the list of supported Spark filters
  and translate them to the corresponding Paimon predicates.
* Intercept EqualTo with a NaN Float/Double literal and push it down
  as an IsNaN predicate, since Spark's EqualTo treats NaN as equal to
  NaN while Paimon's equality predicate would not match any row.
* Drop the two obsolete TODOs covered by the changes above.
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.

1 participant