sodadata / soda-sql

Soda SQL and Soda Spark have been deprecated and replaced by Soda Core. docs.soda.io/soda-core/overview.html
https://docs.soda.io/
Apache License 2.0
61 stars 16 forks source link

Arithmetic Overflow Error in SQL Server #351

Open lucas-lm opened 2 years ago

lucas-lm commented 2 years ago

Describe the bug

Getting Overflow error for count validation.

image

I guess it is related to the query that it is being running to perform the calculations. In SQL Server, regular counts and sum leads to Overflow error when not being applied to bigint, for example (count_big in case of the count).

To Reproduce Steps to reproduce the behavior:

  1. Create a new test in tables/something.yml for a big table
  2. Run soda scan tables/something.yml

Context

table_name: big_table
metrics:
  - row_count
  - missing_count
  - values_count
  - sum
tests:
  - row_count > 0

OS: Python Version: Latest Soda SQL Version: Latest Warehouse Type: SQL Server