-
Notifications
You must be signed in to change notification settings - Fork 97
py: add tests for unsigned integer type #5518
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive test coverage for unsigned integer types (TINYINT UNSIGNED, SMALLINT UNSIGNED, INTEGER UNSIGNED, BIGINT UNSIGNED) in the Python test suite. The tests verify that various SQL operations, functions, and expressions work correctly with unsigned integer types.
Changes:
- Added test tables and views for generating unsigned integer test data using the datagen connector
- Implemented tests for comparison operators, conditional expressions, and SQL predicates with unsigned integers
- Added tests for arithmetic functions, trigonometric functions, and string operations applied to unsigned integers
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_tbl.py | Defines test tables and views with unsigned integer columns using datagen connector for data generation |
| python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_supported_functions.py | Tests comparison operators, conditional logic, NULL handling, and string functions with unsigned integers |
| python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py | Tests arithmetic and mathematical functions (trigonometric, logarithmic, rounding) with unsigned integers |
| python/tests/runtime_aggtest/unsigned_int_tests/main.py | Entry point that imports all test modules and executes the unsigned integer test suite |
|
|
||
|
|
||
| class un_int_datagen_tbl(TstTable): | ||
| """Define the table used by unsigned integer tests the uses datagen connector to generate data""" |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected grammar from 'the uses' to 'that uses'.
| """Define the table used by unsigned integer tests the uses datagen connector to generate data""" | |
| """Define the table used by unsigned integer tests that use the datagen connector to generate data""" |
936a184 to
5b750c5
Compare
| { | ||
| "id": 0, | ||
| "tiny_un_int": Decimal("8103.083927575384"), | ||
| "small_un_int": None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these None?
| # LEN | ||
| class un_int_len(TstView): | ||
| def __init__(self): | ||
| self.data = [{"tiny_int": 1, "small_int": 5, "intt": 10, "big_int": 19}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't know that len works on numbers
Signed-off-by: rivudhk <[email protected]>
Fixes: #4331