我开始研究 delta Lake 并在尝试更新表时遇到了这个异常。
我在用着:
aws 电子病历 5.29
火花 2.4.4
Scala 版本 2.11.12 并使用 io.delta:delta-core_2.11:0.5.0。
import io.delta.tables._
import org.apache.spark.sql.functions._
import spark.implicits._
val deltaTable = DeltaTable.forPath(spark, "s3://path/")
deltaTable.update(col("col1") === "val1", Map("col2" -> lit("val2")));
java.lang.NoSuchMethodError: org.apache.spark.sql.catalyst.analysis.Analyzer.execute(Lorg/apache/spark/sql/catalyst/plans/logical/LogicalPlan;)Lorg/apache/spark/sql/catalyst/plans/logical/LogicalPlan;
at org.apache.spark.sql.delta.util.AnalysisHelper$class.tryResolveReferences(AnalysisHelper.scala:33)
at io.delta.tables.DeltaTable.tryResolveReferences(DeltaTable.scala:42)
at io.delta.tables.execution.DeltaTableOperations$$anonfun$5.apply(DeltaTableOperations.scala:93)
at io.delta.tables.execution.DeltaTableOperations$$anonfun$5.apply(DeltaTableOperations.scala:93)
at org.apache.spark.sql.catalyst.plans.logical.UpdateTable$$anonfun$1.apply(UpdateTable.scala:57)
at org.apache.spark.sql.catalyst.plans.logical.UpdateTable$$anonfun$1.apply(UpdateTable.scala:52)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at org.apache.spark.sql.catalyst.plans.logical.UpdateTable$.resolveReferences(UpdateTable.scala:52)
at io.delta.tables.execution.DeltaTableOperations$class.executeUpdate(DeltaTableOperations.scala:93)
at io.delta.tables.DeltaTable.executeUpdate(DeltaTable.scala:42)
at io.delta.tables.DeltaTable.updateExpr(DeltaTable.scala:361)
... 51 elided
知道为什么吗?
谢谢!