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

Create Temporary Function Issue #1383

Open
ashishkshukla opened this issue Jul 27, 2019 · 0 comments
Open

Create Temporary Function Issue #1383

ashishkshukla opened this issue Jul 27, 2019 · 0 comments

Comments

@ashishkshukla
Copy link

We are getting NullPointerException while creating temporary function -

Query-

snSession.sql("CREATE temporary FUNCTION strnglen as com.some_package.StringUDF RETURNS Integer USING JAR '<UDF_JAR_PATH>/string_udf2.jar'")

Output-

java.lang.NullPointerException
  at org.apache.spark.sql.internal.SnappySessionCatalog.loadFunctionResources(SnappySessionCatalog.scala
  at org.apache.spark.sql.execution.command.CreateFunctionCommand.run(functions.scala:59)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:74)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:135)

I found that issue is coming due to currentFunctionIdentifier initialization in case of temporary functions.

I have found its fix and will raise the pull request for review.

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

No branches or pull requests

1 participant