-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-15094][SPARK-14803][SQL] Remove extra Project added in EliminateSerialization #12926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
cf53a43
48e6b6d
737c518
3d0554d
4b0773a
29a0c70
85fba17
ea55398
c3748ba
882fc66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -659,6 +659,16 @@ class DatasetSuite extends QueryTest with SharedSQLContext { | |
| checkDataset(DatasetTransform.addOne(dataset), 2, 3, 4) | ||
| } | ||
|
|
||
| test("dataset.rdd with generic case class") { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this test for?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The failed codes in jira SPARK-15094. |
||
| val ds = Seq(Generic(1, 1.0), Generic(2, 2.0)).toDS | ||
| val ds2 = ds.map(g => Generic(g.id, g.value)) | ||
| ds.rdd.map(r => r.id).count | ||
|
||
| ds2.rdd.map(r => r.id).count | ||
|
|
||
| val ds3 = ds.map(g => new java.lang.Long(g.id)) | ||
| ds3.rdd.map(r => r).count | ||
| } | ||
|
|
||
| test("runtime null check for RowEncoder") { | ||
| val schema = new StructType().add("i", IntegerType, nullable = false) | ||
| val df = sqlContext.range(10).map(l => { | ||
|
|
@@ -676,6 +686,8 @@ class DatasetSuite extends QueryTest with SharedSQLContext { | |
| } | ||
| } | ||
|
|
||
| case class Generic[T](id: T, value: Double) | ||
|
|
||
| case class OtherTuple(_1: String, _2: Int) | ||
|
|
||
| case class TupleClass(data: (Int, String)) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use
Alias(s.child.output.head, s.child.output.head.name)(exprId = d.output.head.exprId)to make sure the alias name is same with the attribute nameThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. update later.