Skip to content

SUM did not return the correct DecimalSize() #1670

Closed

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?

Activity

  1. locked and limited conversation to collaborators on Jan 29, 2025
  2. converted this issue into a discussion #1671 on Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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