Skip to content

[BUG] decimal powers not supported on Redshift  #1457

@AlexSpannSP

Description

@AlexSpannSP

Describe the bug
Currently dbt Fusion doesn't support decimal powers of floats and will raise an error

What version of dbt Fusion is this bug in? (find out by running dbt --version)
dbt-fusion 2.0.0-preview.154

Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.

  • YES
  • NO

To Reproduce
Create a dbt model:

-- models/marts/power_operator_demo.sql
SELECT 1.2::FLOAT ^ 3.4::DECIMAL

When compiling with a redshift target you get the following compiler error:

error: dbt0411: Arithmetic binary failed: Cannot coerce arithmetic operator ^ with arguments float and decimal(38, 10)
  --> models\marts\power_operator_demo.sql:1:8 (target\compiled\models\marts\power_operator_demo.sql:1:8)

Expected behavior
The compile to succeed

Operating System and CPU Type (please complete the following information):

  • Windows
  • X86

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions