Repository navigation
feat: Support ANSI mode avg expr (int inputs) - #2817
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2817 +/- ##
============================================
+ Coverage 56.12% 59.55% +3.42%
- Complexity 976 1376 +400
============================================
Files 119 167 +48
Lines 11743 15486 +3743
Branches 2251 2564 +313
============================================
+ Hits 6591 9223 +2632
- Misses 4012 4969 +957
- Partials 1140 1294 +154 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@coderfender You can merge latest from main to fix the current CI failures |
5192933 to
33b0b2f
Compare
|
@andygrove , Thank you . I rebased my feature branch with main. Please kick off CI whenever you get a chance . Thank you |
|
@andygrove , fixed issues with formatting and an unused import. Please kickoff the CI whenever you get a chance . Thank you |
|
@andygrove , @comphead . Please take a look whenever you get a chance . ANSI support for average is rather more relaxing compared to say 'Sum' because of the intermediate sum accumulation uses a float |
|
Thank you for the approval @andygrove |
|
Fixing merge conflicts and test failures |
|
@comphead , I made changes per review and it gives me great pleasure to remove Spark's |
|
@comphead cpuld you please rerun the failed teats (due to OOM) ? Thank you |
|
@comphead , thank you for rerunning the failed runs . Please review / merge whenever you get a chance |
| // without GROUP BY | ||
| withSQLConf(SQLConf.ANSI_ENABLED.key -> ansiMode.toString) { | ||
| val res = sql("SELECT avg(_1) FROM tbl") | ||
| checkSparkAnswerAndOperator(res) |
There was a problem hiding this comment.
The last nit: can we remove res* variables here and refer to the sql text
comphead
left a comment
There was a problem hiding this comment.
Thanks @coderfender for the PR
|
Thank you for the approval @comphead |
|
@andygrove , @comphead please merge this whenever you get a chance |
Which issue does this PR close?
Closes #531
Rationale for this change
Support ANSI eval mode (for integer types) for average expression
What changes are included in this PR ?
Infas a valid output and doesnt necessarily throw an exception, we follow the same approach in comet as well (essentially making eval mode's redundant for numeric inputs)How are these changes tested?
TODO : Support ANSI mode for
avgexpression but for decimal inputs (which throw exception in ANSI mode unlike their integer counterparts)