Repository navigation
refactor: Refactor spark make_interval signature away from user defined - #19027
Merged
Merged
Conversation
martin-g
approved these changes
Dec 1, 2025
Jefffrey
reviewed
Dec 2, 2025
Jefffrey
left a comment
Contributor
There was a problem hiding this comment.
Thanks for picking this up, have some suggestions around organization of the code
| let mut variants = Vec::with_capacity(8); | ||
| variants.push(TypeSignature::Nullary); | ||
|
|
||
| for len in 1..=7 { |
Contributor
There was a problem hiding this comment.
I think I would prefer inlining the signature instead of generating it via this for loop logic; for example:
Signature::one_of(
vec![
TypeSignature::Nullary,
// year
TypeSignature::Coercible(vec![float64.clone()]),
// year, month
TypeSignature::Coercible(vec![float64.clone(), float64.clone()]),
// etc.
],
Volatility::Immutable,
)Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
Contributor
|
Could we have the comments as suggested in my previous review comment, to indicate the args of year, month, etc.? |
Contributor
Author
|
Sure, i thought you only put the comments to explain it to me. I will make the changes. |
Contributor
Author
|
Added the comments as suggested. |
Jefffrey
approved these changes
Dec 3, 2025
Contributor
|
Thanks @kumarUjjawal & @martin-g |
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.
Which issue does this PR close?
Signature::user_definedfor normal functions #12725Rationale for this change
As per the goal stated that we should avoid using the
user_definedin useful placesWhat changes are included in this PR?
Refactored the
spark/mark_intervalAre these changes tested?
Are there any user-facing changes?