-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Spark 3.5: Backport: Refactor Spark procedures to consistently use ProcedureInput for parameter handling. #14179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spark 3.5: Backport: Refactor Spark procedures to consistently use ProcedureInput for parameter handling. #14179
Conversation
…ocedureInput for parameter handling.
| return ProcedureParameter.required(name, dataType); | ||
| } | ||
|
|
||
| protected static ProcedureParameter optionalInParameter(String name, DataType dataType) { | ||
| return ProcedureParameter.optional(name, dataType); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason why we didn't have this in 4.0 ? are we missing backport of some commit to 3.5
seems like not - 30ee7e8
can you please double confirm ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for reviewing the code! This is not a clean backport, since there is a PR (#13106) in the Spark 4.0 branch that cannot be directly backported to Spark 3.4/3.5. Because Spark 3.5 lacks some features compared to Spark 4.0, I made certain adjustments based on the current Spark 3.5 code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Spark 3.5, we use org.apache.spark.sql.connector.iceberg.catalog.ProcedureParameter for parameter parsing, whereas in the Spark 4 branch, org.apache.spark.sql.connector.catalog.procedures.ProcedureParameter is used to achieve the same functionality. Personally, I believe the difference in functionality between the two is not significant.
|
@singhpk234 @nastra @huaxingao Thank you very much for helping to review the code! |
…ut for parameter handling. (apache#14179)
…ut for parameter handling. (apache#14179)
…ut for parameter handling. (apache#14179)
Backport #13913
Compared to Spark 4.0, Spark 3.5 is missing PR #13106, which cannot be directly backported. Therefore, some code modifications are required.