Skip to content

SUM did not return the correct DecimalSize() #1670

@didip

Description

@didip

Example SQL:

select sum(1 + 2) as col

Called this function to get precision and scale:

precision, scale, ok := columnType.DecimalSize()

The returned precision is 42. I don't understand where did 42 come from. It's supposed to be 1, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions