fix(query): preserve arguments after identity cast elimination - #20357
fix(query): preserve arguments after identity cast elimination#20357forsaken628 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56761493ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| function, | ||
| args: checked_args, | ||
| .. | ||
| }) => function.signature.name == checked_func_name && checked_args.len() == args.len(), |
There was a problem hiding this comment.
Compare against the rewritten argument list
For a nonconstant positional call such as as_decimal(variant_column, 10, 2), the earlier split_off(1) moves precision and scale into params, so the checked function has one argument while args still has three. This comparison therefore marks the valid checked root as mismatched, and the fallback constructs a scalar call containing both the new parameters and all three original arguments; the as_decimal factory accepts exactly one argument, so later type checking/evaluation rejects the query. Compare with the post-rewrite arguments and add a nonconstant regression alongside the positional syntax in tests/sqllogictests/suites/query/functions/02_0056_function_semi_structureds_as.test.
AGENTS.md reference: src/query/AGENTS.md:L8-L8
Useful? React with 👍 / 👎.
🤖 CI Job Analysis
📊 Summary
❌ NO RETRY NEEDEDAll failures appear to be code/test issues requiring manual fixes. 🔍 Job Details
🤖 AboutAutomated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed). |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Tests
Type of change
AI assistance
This change is