Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect min/max statistics for decimals with byte-array notation #1532

Closed
atefsawaed opened this issue Apr 10, 2022 · 0 comments · Fixed by #1621
Closed

Incorrect min/max statistics for decimals with byte-array notation #1532

atefsawaed opened this issue Apr 10, 2022 · 0 comments · Fixed by #1621
Labels

Comments

@atefsawaed
Copy link
Contributor

Describe the bug
When dealing with decimals built with byte-array notation, the min/max comparison should be based on the logical type and not on the physical type.
Integers that are provided as converted types and without specifying the logical type, unsigned comparison should be applied.

To Reproduce

  1. Decimals with byte-array notation:
    a. Create a decimal column (as logical type) with a fixed length byte array type.
    b. Write the following values to the column: [2.11, 3.22, 4.33, -5.44]
  2. Integers specified using the converted type only (No logical type provided):
    a. Create an integer column (as converted type) with an unsigned int physical type.
    b. Write the following values to the column: [1, 2, 3, -1]

Expected behavior

  1. Reading the statistics of the first row group in the column with the decimal type:
    Expected: min=-5.44, max=4.33
    Actual: min=2.11, max=-5.44
  2. Reading the statistics of the first row group in the column with the integer:
    Expected: min=-1, max=3
    Actual: min=1, max=-1

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant