Skip to content

chore: Add extended explain plans to stability suite - #2669

Merged
andygrove merged 10 commits into
apache:mainfrom
andygrove:extended-explain-stability
Oct 31, 2025
Merged

chore: Add extended explain plans to stability suite#2669
andygrove merged 10 commits into
apache:mainfrom
andygrove:extended-explain-stability

Conversation

@andygrove

@andygrove andygrove commented Oct 30, 2025

Copy link
Copy Markdown
Member

Which issue does this PR close?

N/A

Rationale for this change

When we see changes in golden files, it is not always clear why they changed, because we do not show any fallback reasons. Adding the extended explain plan helps with that.

Also, we have very little testing for extended explain plans, so this helps with that too.

Another bonus is that it makes it much easier to see all fallbacks for TPC-DS.

$ find . -name  extended.txt -exec grep "COMET:" {} \; | grep -oP "\[COMET: (.*)]" | sort | uniq
[COMET: ]
[COMET: Comet does not support Spark's BigDecimal rounding]
[COMET: concat is not supported, Unsupported result expressions found in: List(catalog channel AS channel#38539, concat(catalog_page, cp_catalog_page_id#38775) AS id#38540, MakeDecimal(sum(UnscaledValue(cs_ext_sales_price#185))#38691L,17,2) AS sales#38531, sum(coalesce(cast(cr_return_amount#214 as decimal(12,2)), 0.00))#38695 AS returns#38532, sum((cs_net_profit#195 - coalesce(cast(cr_net_loss#222 as decimal(12,2)), 0.00)))#38696 AS profit#38533)]
[COMET: concat is not supported, Unsupported result expressions found in: List(catalog channel AS channel#41920, concat(catalog_page, cp_catalog_page_id#42093) AS id#41921, MakeDecimal(sum(UnscaledValue(sales_price#41887))#42023L,17,2) AS sales#41897, MakeDecimal(sum(UnscaledValue(return_amt#41889))#42025L,17,2) AS returns#41899, (MakeDecimal(sum(UnscaledValue(profit#41888))#42024L,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#41890))#42026L,17,2)) AS profit#41922)]
[COMET: concat is not supported, Unsupported result expressions found in: List(catalog channel AS channel#54, concat(catalog_page, cp_catalog_page_id#491) AS id#55, MakeDecimal(sum(UnscaledValue(sales_price#21))#411L,17,2) AS sales#31, MakeDecimal(sum(UnscaledValue(return_amt#23))#413L,17,2) AS returns#33, (MakeDecimal(sum(UnscaledValue(profit#22))#412L,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#24))#414L,17,2)) AS profit#56)]
[COMET: concat is not supported, Unsupported result expressions found in: List(catalog channel AS channel#79978, concat(catalog_page, cp_catalog_page_id#80214) AS id#79979, MakeDecimal(sum(UnscaledValue(cs_ext_sales_price#185))#80130L,17,2) AS sales#79970, sum(coalesce(cast(cr_return_amount#214 as decimal(12,2)), 0.00))#80134 AS returns#79971, sum((cs_net_profit#195 - coalesce(cast(cr_net_loss#222 as decimal(12,2)), 0.00)))#80135 AS profit#79972)]
[COMET: concat is not supported, Unsupported result expressions found in: List(store channel AS channel#38537, concat(store, s_store_id#38735) AS id#38538, MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#77))#38690L,17,2) AS sales#38527, sum(coalesce(cast(sr_return_amt#96 as decimal(12,2)), 0.00))#38693 AS returns#38528, sum((ss_net_profit#84 - coalesce(cast(sr_net_loss#104 as decimal(12,2)), 0.00)))#38694 AS profit#38529)]
[COMET: concat is not supported, Unsupported result expressions found in: List(store channel AS channel#41917, concat(store, s_store_id#42076) AS id#41918, MakeDecimal(sum(UnscaledValue(sales_price#41871))#42019L,17,2) AS sales#41881, MakeDecimal(sum(UnscaledValue(return_amt#41873))#42021L,17,2) AS returns#41883, (MakeDecimal(sum(UnscaledValue(profit#41872))#42020L,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#41874))#42022L,17,2)) AS profit#41919)]
[COMET: concat is not supported, Unsupported result expressions found in: List(store channel AS channel#51, concat(store, s_store_id#474) AS id#52, MakeDecimal(sum(UnscaledValue(sales_price#5))#407L,17,2) AS sales#15, MakeDecimal(sum(UnscaledValue(return_amt#7))#409L,17,2) AS returns#17, (MakeDecimal(sum(UnscaledValue(profit#6))#408L,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#8))#410L,17,2)) AS profit#53)]
[COMET: concat is not supported, Unsupported result expressions found in: List(store channel AS channel#79976, concat(store, s_store_id#80174) AS id#79977, MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#77))#80129L,17,2) AS sales#79966, sum(coalesce(cast(sr_return_amt#96 as decimal(12,2)), 0.00))#80132 AS returns#79967, sum((ss_net_profit#84 - coalesce(cast(sr_net_loss#104 as decimal(12,2)), 0.00)))#80133 AS profit#79968)]
[COMET: concat is not supported, Unsupported result expressions found in: List(web channel AS channel#38541, concat(web_site, web_site_id#38810) AS id#38542, MakeDecimal(sum(UnscaledValue(ws_ext_sales_price#39895))#38692L,17,2) AS sales#38534, sum(coalesce(cast(wr_return_amt#39921 as decimal(12,2)), 0.00))#38697 AS returns#38535, sum((ws_net_profit#39905 - coalesce(cast(wr_net_loss#39929 as decimal(12,2)), 0.00)))#38698 AS profit#38536)]
[COMET: concat is not supported, Unsupported result expressions found in: List(web channel AS channel#41923, concat(web_site, web_site_id#42105) AS id#41924, MakeDecimal(sum(UnscaledValue(sales_price#41903))#42027L,17,2) AS sales#41913, MakeDecimal(sum(UnscaledValue(return_amt#41905))#42029L,17,2) AS returns#41915, (MakeDecimal(sum(UnscaledValue(profit#41904))#42028L,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#41906))#42030L,17,2)) AS profit#41925)]
[COMET: concat is not supported, Unsupported result expressions found in: List(web channel AS channel#57, concat(web_site, web_site_id#503) AS id#58, MakeDecimal(sum(UnscaledValue(sales_price#37))#415L,17,2) AS sales#47, MakeDecimal(sum(UnscaledValue(return_amt#39))#417L,17,2) AS returns#49, (MakeDecimal(sum(UnscaledValue(profit#38))#416L,17,2) - MakeDecimal(sum(UnscaledValue(net_loss#40))#418L,17,2)) AS profit#59)]
[COMET: concat is not supported, Unsupported result expressions found in: List(web channel AS channel#79980, concat(web_site, web_site_id#80249) AS id#79981, MakeDecimal(sum(UnscaledValue(ws_ext_sales_price#81334))#80131L,17,2) AS sales#79973, sum(coalesce(cast(wr_return_amt#81360 as decimal(12,2)), 0.00))#80136 AS returns#79974, sum((ws_net_profit#81344 - coalesce(cast(wr_net_loss#81368 as decimal(12,2)), 0.00)))#80137 AS profit#79975)]
[COMET: Partitioning and sorting specifications must be the same.]
[COMET: Unsupported aggregation mode PartialMerge]
[COMET: WindowGroupLimit is not supported]

Also can see coverage:

$ find . -name extended.txt -exec grep -oP "([0-9]+)%" {} \; | sort | uniq
100%
58%
64%
65%
66%
67%
69%
70%
75%
77%
78%
81%
82%
83%
85%
86%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%

What changes are included in this PR?

  • Code changes are in the first commit
  • Other commits add golden files

How are these changes tested?

@andygrove
andygrove requested a review from comphead October 30, 2025 16:29
@codecov-commenter

codecov-commenter commented Oct 30, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.22%. Comparing base (f09f8af) to head (10364ac).
⚠️ Report is 650 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2669      +/-   ##
============================================
+ Coverage     56.12%   59.22%   +3.10%     
- Complexity      976     1448     +472     
============================================
  Files           119      147      +28     
  Lines         11743    13762    +2019     
  Branches       2251     2365     +114     
============================================
+ Hits           6591     8151    +1560     
- Misses         4012     4387     +375     
- Partials       1140     1224      +84     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@parthchandra parthchandra 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.

lgtm

@andygrove

Copy link
Copy Markdown
Member Author

Thanks @parthchandra

@andygrove
andygrove merged commit 7544d83 into apache:main Oct 31, 2025
104 checks passed
coderfender pushed a commit to coderfender/datafusion-comet that referenced this pull request Dec 13, 2025
@andygrove
andygrove deleted the extended-explain-stability branch August 5, 2026 19:57
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.

4 participants