Skip to content

[BUG] Support years with up to 7 digits when casting from String to Date in Spark 3.2 #3382

@andygrove

Description

@andygrove

Describe the bug

We have test failures in CastOpSuite now that Spark 3.2 supports years with up to 7 digits when casting from string to date.

- Cast from string to date using random inputs *** FAILED ***
  Mismatch casting string [\n90713] to DateType. CPU: 713-01-01; GPU: null (CastOpSuite.scala:234)
- Cast from string to date using random inputs with valid year prefix *** FAILED ***
  Mismatch casting string [2021838] to DateType. CPU: 838-01-01; GPU: null (CastOpSuite.scala:234)

Steps/Code to reproduce bug
Run CastOpSuite with Spark 3.2

Expected behavior
Tests should pass.

Environment details (please complete the following information)
N/A

Additional context
Spark commit: apache/spark@c9813f7

See issue #3406 for supporting other changes in SPARK-35780.

Metadata

Metadata

Assignees

Labels

P0Must have for releaseSpark 3.2+bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions