Skip to content

[GLUTEN-12863][CH][TEST] Record why four ClickHouse exclusions exist on Spark 3.5 - #12889

Closed
LuciferYang wants to merge 3 commits into
apache:mainfrom
LuciferYang:spark33-drop-p07-ch-cast-excludes
Closed

[GLUTEN-12863][CH][TEST] Record why four ClickHouse exclusions exist on Spark 3.5#12889
LuciferYang wants to merge 3 commits into
apache:mainfrom
LuciferYang:spark33-drop-p07-ch-cast-excludes

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

ClickHouseTestSettings in gluten-ut/spark35 excluded four cases with no comment saying why. This adds the reasons. The exclusions themselves are unchanged, so the net diff is eight comment lines.

enableSuite[GlutenMathExpressionsSuite]
  .excludeCH("tanh")

enableSuite[GlutenTryCastSuite]
  .excludeCH("cast from array II")
  .excludeCH("cast from array III")
  .excludeCH("cast from struct III")

The reasons come from actually running them. All four are declared in Spark 3.3.1 and none of them is excluded in gluten-ut/spark33, so they run on ClickHouse 3.3 today and would have lost their only run site when that module goes away under #12807; backends-clickhouse/pom.xml has profiles for 3.3 and 3.5 only. That made it worth finding out whether the 3.5 exclusions were still needed, so this PR first removed all four and let the ClickHouse CI answer. It failed all four:

- tanh *** FAILED ***
  Incorrect evaluation: TANH(-0.1), actual: -0.0996695958408681, expected: -0.09966799462495582
- cast from array II *** FAILED ***
  Exception evaluating try_cast([123,true,f] as array<boolean>)
- cast from array III *** FAILED ***
  Incorrect evaluation: try_cast([2.147483648E9] as array<int>),
  actual: ArraySeq(-2147483648), expected: [Lscala.runtime.Null$;@73684390
- cast from struct III *** FAILED ***
  Incorrect evaluation: try_cast([2.147483648E9] as struct<a:int>),
  actual: [-2147483648], expected: [null]

So the exclusions are right and only their reasons were missing. cast from array III and cast from struct III are one behaviour: TRY-mode overflow inside a complex type wraps on ClickHouse instead of yielding null. tanh differs from Spark's result at the sixth significant digit. cast from array II throws rather than returning null.

That also answers the question this started from: removing gluten-ut/spark33 does not lose ClickHouse coverage worth keeping here, because these four do not pass on 3.5 either. Whether ClickHouse should be fixed to match is a separate matter and out of scope; these comments just record what it does today so the next person auditing reason-less exclusions does not have to re-run CI to find out.

Only gluten-ut/spark35 is touched. The same entries exist under gluten-ut/spark34, spark40 and spark41, but no ClickHouse profile selects those modules.

Tracked in #12863.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude claude-opus-5

@github-actions github-actions Bot added the CORE works for Gluten Core label Aug 25, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@LuciferYang LuciferYang changed the title [GLUTEN-12863][CH][TEST] Re-enable three cast cases on ClickHouse Spark 3.5 [GLUTEN-12863][CH][TEST] Re-enable four cases on ClickHouse Spark 3.5 Aug 25, 2026
@LuciferYang LuciferYang changed the title [GLUTEN-12863][CH][TEST] Re-enable four cases on ClickHouse Spark 3.5 [GLUTEN-12863][CH][TEST] Record why four ClickHouse exclusions exist on Spark 3.5 Aug 25, 2026
@LuciferYang
LuciferYang marked this pull request as ready for review August 25, 2026 10:58
Copilot AI lite review requested due to automatic review settings August 25, 2026 10:58
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR documents the rationale for four existing ClickHouse-specific test exclusions in the Spark 3.5 gluten-ut module, so future audits don’t require rerunning CI to rediscover the failures.

Changes:

  • Add explanatory comments for the tanh exclusion in GlutenMathExpressionsSuite.
  • Add explanatory comments for three TRY_CAST-related exclusions in GlutenTryCastSuite (exception vs null, and overflow behavior inside complex types).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1183 to +1184
// ClickHouse's tanh differs from Spark's at the sixth significant digit:
// TANH(-0.1) returns -0.0996695958408681, the case expects -0.09966799462495582.
@LuciferYang

Copy link
Copy Markdown
Contributor Author

Folding this into #12888 and closing here.

The split made sense while this was an open question: it removed four ClickHouse exclusions to find out from CI whether they were still needed, and bundling an experiment with an unknown outcome into a PR that was ready to merge would have held that one up. The experiment is done, the ClickHouse CI failed all four, and what is left is eight lines of comments recording why. That is the same activity as #12888, on a file #12888 already modifies, so keeping them apart only buys a second review and a rebase for whichever lands second.

The CI evidence and the resulting comments are carried over verbatim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants