Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/9673#discussion_r44746323
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -360,7 +364,15 @@ class Dataset[T] private[sql](
* @since 1.6.0
*/
def select[U1: Encoder](c1: TypedColumn[T, U1]): Dataset[U1] = {
- new Dataset[U1](sqlContext, Project(Alias(withEncoder(c1).expr,
"_1")() :: Nil, logicalPlan))
+ // We use an unbound encoder since the expression will make up its own
schema.
+ // TODO: This probably doesn't work if we are relying on reordering of
the input class fields.
--- End diff --
Yeah, it is. Actually, this comment is stale and there is a [test
now](https://github.com/apache/spark/pull/9673/files#diff-bf07c7708b6eceda37d9c5c8b5be0d54R157)
to show that it works.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]