Deng Ziming created SPARK-45236:
-----------------------------------
Summary: ToPrettyString will treat java encoder or kryo encoder as
BinaryType
Key: SPARK-45236
URL: https://issues.apache.org/jira/browse/SPARK-45236
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 3.5.0
Reporter: Deng Ziming
{code:java}
// spark sql
// java encoder or kryo encoder
implicit val im = Encoders.kryo[java.util.Map[Int,
Int]].asInstanceOf[ExpressionEncoder[util.Map[Int, Int]]]
val ds = spark.createDataset(Seq(Collections.singletonMap(1,1)))
ds.show()
// +--------------------+
// | value|
// +--------------------+
// |[01 00 6A 61 76 6...|
// +--------------------+
ds.collect().foreach(println(_))
// {1=1}
{code}
ds.collect().foreach(println) is more readable than ds.show(), not sure is the
designed intentionally.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]