Skip to content

Conversation

@cloud-fan
Copy link
Contributor

After some experiment, I found it's not convenient to have separate encoder builders: FlatEncoder and ProductEncoder. For example, when create encoders for ScalaUDF, we have no idea if the type T is flat or not. So I revert the splitting change in #9693, while still keeping the bug fixes and tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method is only used in tests, so I think we should remove it and its related tests.

@cloud-fan
Copy link
Contributor Author

cc @marmbrus

@SparkQA
Copy link

SparkQA commented Nov 16, 2015

Test build #45980 has finished for PR 9726 at commit 6dbc124.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This level of indirection is on purpose. It lets us use the same reflection code both at runtime and in macros. Even if we aren't using that right now, we shouldn't undo the work that was done to make this possible.

@SparkQA
Copy link

SparkQA commented Nov 17, 2015

Test build #46070 has finished for PR 9726 at commit 37fa83f.

  • This patch fails from timeout after a configured wait of 250m.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please.

@SparkQA
Copy link

SparkQA commented Nov 17, 2015

Test build #46083 has finished for PR 9726 at commit 37fa83f.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method is only used in tests, so I think we should remove it and its related tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably fine in this case, but this isn't related to the undoing of the refactoring and mixing concerns makes the PR much harder to review.

@SparkQA
Copy link

SparkQA commented Nov 19, 2015

Test build #46314 has finished for PR 9726 at commit d0a294e.

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't going to work for java. We should just leave this as it was.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But we need a way to detect flatness automatically, sometimes we only have the type T and nothing else, like when we wanna use encoders for ScalaUDF. How about flat = !ScalaReflection.schemaFor[T].isInstanceOf[StructType])?

asfgit pushed a commit that referenced this pull request Nov 19, 2015
After some experiment, I found it's not convenient to have separate encoder builders: `FlatEncoder` and `ProductEncoder`. For example, when create encoders for `ScalaUDF`, we have no idea if the type `T` is flat or not. So I revert the splitting change in #9693, while still keeping the bug fixes and tests.

Author: Wenchen Fan <[email protected]>

Closes #9726 from cloud-fan/follow.

(cherry picked from commit 47d1c23)
Signed-off-by: Michael Armbrust <[email protected]>
@asfgit asfgit closed this in 47d1c23 Nov 19, 2015
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.

3 participants