Github user maropu commented on the issue: https://github.com/apache/spark/pull/19977 I found different behaviours in a string function `elt` though, is this expected (binray output is a small surprise?); ``` hive> create table t(a binary, b binary); hive> create view v as select elt(1, a, b) from t; hive> describe v; _c0 string mysql> create table t(a binary, b binary); mysql> create view v as select elt(1, a, b) from t; mysql> SHOW COLUMNS FROM v; +--------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+-------+ | elt(1, a, b) | varbinary(1) | YES | | NULL | | +--------------+--------------+------+-----+---------+-------+ 1 row in set (0.00 sec) scala> val df = Seq(("aaa".getBytes, "bbb".getBytes)).toDF("a", "b") scala> df.selectExpr("elt(1, a, b)").printSchema root |-- elt(1, CAST(a AS STRING), CAST(b AS STRING)): string (nullable = true) ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org