Skip to content

Conversation

@iburquijo
Copy link

This pull request is related to issue #55 .
The variable commandContextClass which references the internal class com.databricks.backend.common.rpc.CommandContext, has a type mismatch in the constructor. The real constructor is com.databricks.sdk.scala.dbutils.CommandContext(scala.Option,scala.Option,scala.Option,scala.collection.immutable.Map,scala.collection.immutable.Map) but the defined one was

val commandContextClass = Class.forName("com.databricks.backend.common.rpc.CommandContext")
commandContextClass
.getConstructor(
classOf[Option[AnyRef]],
classOf[Option[AnyRef]],
classOf[String], //should be change to classOf[Option[String]]
classOf[Map[String, String]],
classOf[Map[String, String]])
.newInstance(
rootRunIdOpt,
currentRunIdOpt,
commandContext.jobGroup,
commandContext.tags,
commandContext.extraContext)
.asInstanceOf[AnyRef]

So I modified to be classOf[Option[String] instead of classOf[String]

Tests

Running unit testing in local with successful result and also compiled the jar and tested in Databricks environment.

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.

1 participant