Skip to content

Conversation

@koertkuipers
Copy link
Contributor

What changes were proposed in this pull request?

TypedAggregateExpression sets nullable based on the schema of the outputEncoder

How was this patch tested?

Add test in DatasetAggregatorSuite

@rxin
Copy link
Contributor

rxin commented Jun 6, 2016

cc @cloud-fan

@SparkQA
Copy link

SparkQA commented Jun 6, 2016

Test build #60068 has finished for PR 13532 at commit 32cfcb7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

outputEncoder.deserializer.dataType,
outputType)
outputType,
outputNullable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just do: !outputEncoder.flat || outputEncoder.schema.head.nullable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@SparkQA
Copy link

SparkQA commented Jun 7, 2016

Test build #60083 has finished for PR 13532 at commit d582f30.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

can we wait for #13553? thanks!

@SparkQA
Copy link

SparkQA commented Jul 2, 2016

Test build #61667 has finished for PR 13532 at commit 46ced5c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

val ds1 = Seq(1, 3, 2, 5).toDS()
assert(ds1.select(typed.sum((i: Int) => i)).schema.head.nullable === false)
val ds2 = Seq(AggData(1, "a"), AggData(2, "a")).toDS()
assert(ds2.groupByKey(_.b).agg(SeqAgg.toColumn).schema(1).nullable === true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use ds.select for all tests? And we should also test String, which is flat but nullable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the last assert with NameAgg tests String as output of the Aggregator. is that good enough?

@SparkQA
Copy link

SparkQA commented Jul 3, 2016

Test build #61697 has finished for PR 13532 at commit 23263e4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@asfgit asfgit closed this in 8cdb81f Jul 4, 2016
@cloud-fan
Copy link
Contributor

merging to master, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants