Skip to content
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

Register Spark UDFs #513

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Register Spark UDFs #513

merged 2 commits into from
Jun 27, 2024

Conversation

ljfgem
Copy link
Collaborator

@ljfgem ljfgem commented Jun 27, 2024

What changes are proposed in this pull request, and why are they necessary?

Register several Spark UDFs.

How was this patch tested?

Tested on target views

Copy link

@dihu-linkedin dihu-linkedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -673,6 +673,13 @@ public boolean isOptional(int i) {
createAddUserDefinedFunction("com.linkedin.policy.decoration.udfs.RedactSecondarySchemaFieldIf", ARG1, family(
SqlTypeFamily.BOOLEAN, SqlTypeFamily.ANY, SqlTypeFamily.ARRAY, SqlTypeFamily.CHARACTER, SqlTypeFamily.ANY));

createAddUserDefinedFunction("com.linkedin.groot.runtime.udf.spark.HasMemberConsentUDF", ReturnTypes.BOOLEAN,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a quick comment explaining why we're adding spark UDFs in a class called StaticHiveFunctionRegistry? Could be confusing for open source contributors with no context.

Copy link
Collaborator Author

@ljfgem ljfgem Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StaticHiveFunctionRegistry doesn't contain Hive UDFs only (check the java doc of this class), it contains all the UDFs (i.e. Hive UDF, Transport UDF, etc)
I don't think it's necessary to add comments for OSS contributors since they don't care about LinkedIn internal UDFs.

Copy link
Contributor

@KevinGe00 KevinGe00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ljfgem ljfgem merged commit bbf5f15 into linkedin:master Jun 27, 2024
1 check passed
KevinGe00 pushed a commit to KevinGe00/coral that referenced this pull request Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants