Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Feb 28, 2019

What changes were proposed in this pull request?

#23854 adds some help methods used for creating deserializers. This is a followup for it to add comments and do simple cleanup.

How was this patch tested?

Existing tests.

@viirya
Copy link
Member Author

viirya commented Feb 28, 2019

cc @HeartSaVioR @cloud-fan @maropu

*/
def deserializerForWithNullSafety(
expr: Expression,
dataType: DataType,
Copy link
Member Author

Choose a reason for hiding this comment

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

dataType is useless here.

nullable = nullable,
newTypePath,
(expr, typePath) => {
// For tuples, we based grab the inner fields by ordinal instead of name.
Copy link
Member Author

Choose a reason for hiding this comment

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

This location should be more proper for this comment.

* @param funcForCreatingDeserializer Given input expression and typed path, this function
* returns deserializer expression.
*/
def deserializerForWithNullSafety(
Copy link
Contributor

Choose a reason for hiding this comment

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

we can remove it, according to #23908 (comment)

Copy link
Member Author

@viirya viirya Feb 28, 2019

Choose a reason for hiding this comment

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

Remove deserializerForWithNullSafety? So we call deserializerForWithNullSafetyAndUpcast for all cases?

Copy link
Contributor

Choose a reason for hiding this comment

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

have you read the comment? It's the same as expressionWithNullSafety

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, but looks like to remove expressionWithNullSafety and incorporate it into deserializerForWithNullSafety?

Copy link
Member Author

@viirya viirya Feb 28, 2019

Choose a reason for hiding this comment

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

oh, i see. I don't see the all change around the change to deserializerForWithNullSafet there...since it is not shown if not clicking changes tab.

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 expressionWithNullSafety is more general naming so might be preferred one, but deserializerForWithNullSafety is also a good name cause we have relevant method deserializerForWithNullSafetyAndUpcast.

So that's a matter of preference and either can be removed. Which method would we prefer to keep?

Copy link
Contributor

Choose a reason for hiding this comment

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

Moving my comment to #23908 since it will keep updated.

@viirya
Copy link
Member Author

viirya commented Feb 28, 2019

#23908 continues to make a lot change to DeserializerBuildHelper. I close this to avoid expected conflicts.

@viirya viirya closed this Feb 28, 2019
@SparkQA
Copy link

SparkQA commented Feb 28, 2019

Test build #102851 has finished for PR 23916 at commit f5963a2.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya viirya deleted the SPARK-22000-followup branch December 27, 2023 18:36
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.

5 participants