Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

This is a followup of #26933

Fraction string like "1.23" is definitely not a valid integral format and we should fail to do the cast under the ANSI mode.

Why are the changes needed?

correct the ANSI cast behavior from string to integral

Does this PR introduce any user-facing change?

Yes under ANSI mode, but ANSI mode is off by default.

How was this patch tested?

new test

@cloud-fan
Copy link
Contributor Author

cc @iRakson @maropu

@maropu
Copy link
Member

maropu commented Mar 19, 2020

Pending, Jenkins.

@maropu maropu changed the title [SPARK-30292][SQL][followup] ansi cast from string to int should fail with fraction [SPARK-30292][SQL][FOLLOWUP] ansi cast from strings to integral numbers (byte/short/int/long) should fail with fraction Mar 19, 2020
@SparkQA
Copy link

SparkQA commented Mar 19, 2020

Test build #120051 has finished for PR 27957 at commit 63cd5b4.

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

@maropu maropu closed this in ac262cb Mar 19, 2020
maropu pushed a commit that referenced this pull request Mar 19, 2020
…rs (byte/short/int/long) should fail with fraction

### What changes were proposed in this pull request?

This is a followup of #26933

Fraction string like "1.23" is definitely not a valid integral format and we should fail to do the cast under the ANSI mode.

### Why are the changes needed?

correct the ANSI cast behavior from string to integral

### Does this PR introduce any user-facing change?

Yes under ANSI mode, but ANSI mode is off by default.

### How was this patch tested?

new test

Closes #27957 from cloud-fan/ansi.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
(cherry picked from commit ac262cb)
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
@maropu
Copy link
Member

maropu commented Mar 19, 2020

Merged to master/3.0.

sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
…rs (byte/short/int/long) should fail with fraction

### What changes were proposed in this pull request?

This is a followup of apache#26933

Fraction string like "1.23" is definitely not a valid integral format and we should fail to do the cast under the ANSI mode.

### Why are the changes needed?

correct the ANSI cast behavior from string to integral

### Does this PR introduce any user-facing change?

Yes under ANSI mode, but ANSI mode is off by default.

### How was this patch tested?

new test

Closes apache#27957 from cloud-fan/ansi.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
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