lambda type coercion [Test - Do Not Review]#26192
Draft
Dilli-Babu-Godari wants to merge 1 commit intoprestodb:masterfrom
Draft
lambda type coercion [Test - Do Not Review]#26192Dilli-Babu-Godari wants to merge 1 commit intoprestodb:masterfrom
Dilli-Babu-Godari wants to merge 1 commit intoprestodb:masterfrom
Conversation
Contributor
Reviewer's GuideEnhance lambda handling to support return type coercion during SQL function analysis: introduce exception handling for invalid lambda argument counts, normalize dependent function signature arguments, apply coercion to lambda return types when actual and expected types differ but are coercible, update the signature binder to allow coercion, and add corresponding tests for array_sort lambdas. Class diagram for updated lambda handling in ExpressionAnalyzerclassDiagram
class ExpressionAnalyzer {
+analyze(expression, baseScope, context)
+process(expression, context)
+addOrReplaceExpressionCoercion(expression, fromType, toType)
+setExpressionType(expression, type)
}
class LambdaArgumentCountMismatchException {
+LambdaArgumentCountMismatchException(Node node, String message)
}
ExpressionAnalyzer --> LambdaArgumentCountMismatchException : throws
Class diagram for SignatureBinder update to allow lambda return type coercionclassDiagram
class SignatureBinder {
+update(BoundVariables.Builder bindings)
-appendTypeRelationshipConstraintSolver(..., allowCoercion)
-appendConstraintSolvers(..., allowCoercion)
}
SignatureBinder --> "TypeConstraintSolver"
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
36cc810 to
f1986fc
Compare
|
|
30df2b5 to
95387f7
Compare
95387f7 to
b20a0ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
If release note is NOT required, use: