Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test("SparkTest 0280") {
- val conf = new SparkConf().set("spark.sql.codegen.wholeStage", "false").set("spark.sql.cbo.enabled", "true")
- val spark = SparkSession.builder().config(conf).master("local").appName("SparkTest").enableHiveSupport().getOrCreate()
- import spark.implicits._
- Seq[(Int,Int)]((null, 1), (2, null), (null, 3)).toDF("a", "b").createOrReplaceTempView("t")
- spark.sql("select a,b,nvl(a,b) from t").show(truncate = false)
- Error:(565, 21) an expression of type Null is ineligible for implicit conversion
- Seq[(Int,Int)]((null, 1), (2, null), (null, 3)).toDF("a", "b").createOrReplaceTempView("t")
Add Comment
Please, Sign In to add comment