Repository navigation
cherrypick:SQRT(-1), ASIN(2) - #24563
Conversation
…ressions (matrixorigin#24519) - Return NULL for math domain errors in ACOS/ASIN/COT/LN/LOG/LOG2/LOG10/SQRT, including array SQRT. - Widen mixed string/numeric CASE / COALESCE / IFF / UNION expressions to varchar. - Update distributed baselines for the affected math, array, function, and union cases. Approved by: @heni02, @aunjgr
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Blocking issue: this cherry-pick is incomplete on 3.0-dev for ASIN.
The diff adds the implementation (builtInASin in pkg/sql/plan/function/func_builtin.go) and tests, but ASIN is still not wired into the builtin function registry on this branch:
pkg/sql/plan/function/function_id.goalready definesASIN = 53pkg/sql/plan/function/list_builtIn.gohas entries for nearby math functions likeSQRT,ACOS,ATAN,LN, but noASINentry at all- the new distributed baseline
test/distributed/cases/function/func_math_asin.resultstill expectsnot supported: function or operator 'asin'
So the PR title/body says ASIN(2), but after this cherry-pick SQL still cannot call ASIN(...) on 3.0-dev. Please add the missing registry wiring (and update the baseline to actual function results) before approving.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-checked the current head from multiple angles. The earlier ASIN wiring problem is fixed now (list_builtIn.go, function resolution tests, and the new distributed ASIN baseline all line up), so that blocker is gone.
However, there is still a blocking regression in this PR: it now blesses a planner/runtime downgrade for an existing IF + subquery + GROUP BY case that is unrelated to the advertised fix set.
In test/distributed/cases/function/func_if.test the existing issue #3265 query is unchanged:
SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c;
On the base branch, func_if.result expects this query to succeed and return grouped rows. In this PR, test/distributed/cases/function/func_if.result is changed to expect:
subquery in GROUP BY clause is not yet implemented
That is a user-visible capability regression, and it is not explained by the function changes in this cherry-pick. The IF/CASE/COALESCE type-change logic added here only special-cases mixed string/numeric expressions, while this query is numeric/subquery-only.
Please either fix the regression or remove the unrelated baseline change before approval.
已经明确问题. 代码本身没问题, 是本地生成结果文件时, 将bvt tag的case, 也跑了,导致了错误的结果文件. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed the current head from multiple angles. The earlier two blockers are now resolved: ASIN is wired into the builtin registry on 3.0-dev with matching tests/baselines, and the unrelated IF + subquery + GROUP BY regression in func_if.result has been corrected back to the successful result.
I also re-checked the remaining semantic changes around NULL-on-error math behavior and mixed string/numeric CASE/IF/UNION coercion. I don't see a remaining correctness blocker in the current head. LGTM.
Merge Queue Status
This pull request spent 14 minutes 55 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks HintYou may have to fix your CI before adding the pull request to the queue again. |
|
@mergify refresh |
✅ Pull request refreshed |
|
@mergify refresh |
✅ Pull request refreshed |
Merge Queue Status
This pull request spent 1 hour 10 minutes 53 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
@mergify refresh |
✅ Pull request refreshed |
|
@mergify refresh |
✅ Pull request refreshed |
Merge Queue Status
This pull request spent 27 seconds in the queue, including 4 seconds running CI. Required conditions to merge
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed the current head from multiple angles. I don't see a remaining correctness blocker in the current diff; LGTM.
What type of PR is this?
Which issue(s) this PR fixes:
issue #24481
What this PR does / why we need it:
SQRT(-1), ASIN(2), 混合字符串/数字表达式