Skip to content

DateAdd / DateSub do not perform overflow checks in release builds #2539

@andygrove

Description

@andygrove

Describe the bug

If I build the native library with --release, then I see a test failure. I would not expect this to happen.

- date_add with int scalars (5 seconds, 994 milliseconds)
- date_add with scalar overflow *** FAILED *** (286 milliseconds)
  "Error while decoding: java.lang.ArithmeticException: integer overflow
  createexternalrow(staticinvoke(class org.apache.spark.sql.catalyst.util.DateTimeUtils$, ObjectType(class java.sql.Date), toJavaDate, input[0, date, true], true, false, true), StructField(date_add(_20, 2147483647),DateType,true))." did not contain "attempt to add with overflow" (CometExpressionSuite.scala:255)

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions