Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Spark-4.0: Tests failures in CastOpSuite #12019

Open
Tracked by #12001
nartal1 opened this issue Jan 23, 2025 · 0 comments
Open
Tracked by #12001

[BUG] Spark-4.0: Tests failures in CastOpSuite #12019

nartal1 opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working Spark 4.0+ Spark 4.0+ issues test Only impacts tests

Comments

@nartal1
Copy link
Collaborator

nartal1 commented Jan 23, 2025

Describe the bug
Below unit tests(scala tests) are failing in CastOpSuite
Total failures: 12

Pasting the error message which have different reasons for the failure.

1. - Cast from string to timestamp *** FAILED ***
  Mismatch casting string [\t\n\tT21:34:56.333666Z\r\n] to TimestampType. CPU: null; GPU: 2025-01-23 21:34:56.333666 (CastOpSuite.scala:244)

2. - Test all supported casts with in-range values *** FAILED ***
  Cast from StringType to TimestampType failed; ansi=false org.scalatest.exceptions.TestFailedException: 
  Running on the GPU and on the CPU did not match (relaxed float comparison)

3. - Test cast from long *** FAILED ***
  org.apache.spark.sql.catalyst.ExtendedAnalysisException: [DATATYPE_MISMATCH.CAST_WITH_CONF_SUGGESTION] Cannot resolve "CAST(longs AS BINARY)" due to data type mismatch: cannot cast "BIGINT" to "BINARY" with ANSI mode on.

4. - Test cast from float *** FAILED ***
  org.apache.spark.SparkArithmeticException: [CAST_OVERFLOW] The value Infinity of the type "FLOAT" cannot be cast to "INT" due to an overflow. Use `try_cast` to tolerate overflow and return NULL instead. SQLSTATE: 22003

5.  - Test cast from string to bool *** FAILED ***
  org.apache.spark.SparkRuntimeException: [CAST_INVALID_INPUT] The value 'maybe' of the type "STRING" cannot be cast to "BOOLEAN" because it is malformed. Correct the value as per the syntax, or change its target type. Use `try_cast` to tolerate malformed input and return NULL instead. SQLSTATE: 22018
== DataFrame ==
"cast" was called from

6. - Detect overflow from numeric types to decimal *** FAILED ***
  Expected exception org.apache.spark.SparkException to be thrown, but org.apache.spark.SparkArithmeticException was thrown (CastOpSuite.scala:871)

Steps/Code to reproduce bug

mvn package -f scala2.13/pom.xml -pl tests -am -Dbuildver=400 -Dsuffixes=".*CastOpSuite"

Expected behavior
Tests must either pass or skip with valid reason in the test suite.

@nartal1 nartal1 added ? - Needs Triage Need team to review and classify bug Something isn't working Spark 4.0+ Spark 4.0+ issues test Only impacts tests labels Jan 23, 2025
@mattahrens mattahrens removed the ? - Needs Triage Need team to review and classify label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Spark 4.0+ Spark 4.0+ issues test Only impacts tests
Projects
None yet
Development

No branches or pull requests

2 participants