Skip to content

Implement Spark-compatible CAST from floating-point to decimal #371

@andygrove

Description

@andygrove

What is the problem the feature request solves?

Comet's implementation of CAST float/double to Decimal delegates to DataFusion and is not compatible with Spark.

The following test in CometCastSuite can be used to see the current failures.

  ignore("cast DoubleType to DecimalType(10,2)") {
    // Comet should have failed with [NUMERIC_VALUE_OUT_OF_RANGE]
    castTest(generateDoubles(), DataTypes.createDecimalType(10, 2))
  }

Describe the potential solution

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions