Skip to content

Conversation

@priyankagargnitk
Copy link

What changes were proposed in this pull request?

This change adds a check in castToInterval method of Cast expression , such that if converted value is null , then isNull variable should be set to true.

Earlier, the expression Cast(Literal(), CalendarIntervalType) was throwing NullPointerException because of the above mentioned reason.

How was this patch tested?

Added test case in CastSuite.scala

jira entry for detail: https://issues.apache.org/jira/browse/SPARK-17884

…m empty string to interval type.

## What changes were proposed in this pull request?
This change adds a check in castToInterval method of Cast expression , such that if converted value is null , then isNull variable should be set to true.

Earlier, the expression Cast(Literal(), CalendarIntervalType) was throwing NullPointerException because of the above mentioned reason.

## How was this patch tested?
Added test case in CastSuite.scala

jira entry for detail: https://issues.apache.org/jira/browse/SPARK-17884

Author: prigarg <[email protected]>

Closes apache#15449 from priyankagargnitk/SPARK-17884.
@SparkQA
Copy link

SparkQA commented Oct 14, 2016

Test build #3341 has finished for PR 15479 at commit 6bdbe7d.

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

@rxin
Copy link
Contributor

rxin commented Oct 14, 2016

Thanks - merging. Can you close the ticket?

asfgit pushed a commit that referenced this pull request Oct 14, 2016
…m empty string to interval type

## What changes were proposed in this pull request?
This change adds a check in castToInterval method of Cast expression , such that if converted value is null , then isNull variable should be set to true.

Earlier, the expression Cast(Literal(), CalendarIntervalType) was throwing NullPointerException because of the above mentioned reason.

## How was this patch tested?
Added test case in CastSuite.scala

jira entry for detail: https://issues.apache.org/jira/browse/SPARK-17884

Author: prigarg <[email protected]>

Closes #15479 from priyankagargnitk/cast_empty_string_bug.
zzcclp pushed a commit to zzcclp/spark that referenced this pull request Oct 17, 2016
…m empty string to interval type

## What changes were proposed in this pull request?
This change adds a check in castToInterval method of Cast expression , such that if converted value is null , then isNull variable should be set to true.

Earlier, the expression Cast(Literal(), CalendarIntervalType) was throwing NullPointerException because of the above mentioned reason.

## How was this patch tested?
Added test case in CastSuite.scala

jira entry for detail: https://issues.apache.org/jira/browse/SPARK-17884

Author: prigarg <[email protected]>

Closes apache#15479 from priyankagargnitk/cast_empty_string_bug.

(cherry picked from commit 745c5e7)
@HyukjinKwon
Copy link
Member

@priyankagargnitk Could maybe we then close this?

@priyankagargnitk
Copy link
Author

Yeah.. closing this.

@priyankagargnitk priyankagargnitk deleted the cast_empty_string_bug branch October 28, 2016 05:23
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