getChan opened a new pull request, #24201:
URL: https://github.com/apache/datafusion/pull/24201

   ## Which issue does this PR close?
   
   - Closes #24133.
   
   ## Rationale for this change
   
   Some functions require particular arguments to be literal values. This 
requirement is currently enforced separately by each function, rather than 
being declared as part of the function signature.
   
   ## What changes are included in this PR?
   
   - Adds `ArgumentConstraint` and `TypeSignature::Constrained`.
   - Validates literal constraints while logical expressions are analyzed and 
typed.
   - Declares the required literal arguments for `arrow_cast`, 
`arrow_try_cast`, and `date_part`.
   - Keeps expression constraints separate from `Coercion`.
   
   ## Are these changes tested?
   
   Yes.
   
   - Added a unit test covering accepted and rejected literal constraints.
   - Ran `./dev/rust_lint.sh`.
   - Ran the existing DataFrame `arrow_cast` integration test.
   
   ## Are there any user-facing changes?
   
   Calls to constrained functions with non-literal arguments are rejected 
consistently during planning. This PR also adds public signature API types and 
therefore may require the `api change` label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to