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

[spark] Fix load function with SparkGenericCatalog #4741

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

Zouxxyy
Copy link
Contributor

@Zouxxyy Zouxxyy commented Dec 19, 2024

Purpose

loadFunction in SparkGenericCatalog should throw NoSuchFunctionException instead of RuntimeException, fix this

Function test_hive.myIntSum is not a paimon function
java.lang.RuntimeException: Function test_hive.myIntSum is not a paimon function
	at org.apache.paimon.spark.catalog.SupportFunction.loadFunction(SupportFunction.java:67)
	at org.apache.paimon.spark.SparkGenericCatalog.loadFunction(SparkGenericCatalog.java:379)
	at org.apache.spark.sql.connector.catalog.FunctionCatalog.functionExists(FunctionCatalog.java:60)
	at org.apache.spark.sql.catalyst.analysis.Analyzer$LookupFunctions$$anonfun$apply$20.applyOrElse(Analyzer.scala:2075)
	at org.apache.spark.sql.catalyst.analysis.Analyzer$LookupFunctions$$anonfun$apply$20.applyOrElse(Analyzer.scala:2066)
	at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:461)
	at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(origin.scala:76)
	at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:461)

Tests

API and Format

Documentation

@Zouxxyy Zouxxyy marked this pull request as ready for review December 19, 2024 14:25
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit 8ade15f into apache:master Dec 20, 2024
12 checks passed
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.

2 participants