Subject: Re: How this unit test passed on master trunk?
From: zzh...@hortonworks.com
To: java8...@hotmail.com; gatorsm...@gmail.com
CC: user@spark.apache.org
Date: Sun, 24 Apr 2016 04:37:11 +
There are multiple records for the DF
scala> structDF.groupBy($"a").agg(min(st
There are multiple records for the DF
scala> structDF.groupBy($"a").agg(min(struct($"record.*"))).show
+---+-+
| a|min(struct(unresolvedstar()))|
+---+-+
| 1|[1,1]|
| 3|[3,1]|
| 2|
This was added by Xiao through:
[SPARK-13320][SQL] Support Star in CreateStruct/CreateArray and Error
Handling when DataFrame/DataSet Functions using Star
I tried in spark-shell and got:
scala> val first =
structDf.groupBy($"a").agg(min(struct($"record.*"))).first()
first:
Hi,
I was trying to find out why this unit test can pass in Spark code.
inhttps://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
for this unit test:
test("Star Expansion - CreateStruct and CreateArray") {
val structDf =