Skip to content

Conversation

@xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Jun 9, 2025

#64

@xiangfu0 xiangfu0 requested a review from Copilot June 9, 2025 15:52
Copy link
Contributor

Copilot AI left a 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 support for a new BigDecimal type in the Python client by mapping the BIG_DECIMAL data type to SQLAlchemy's Numeric type and by including corresponding unit tests to validate the changes.

  • Added a new test to validate BIG_DECIMAL column conversion.
  • Extended the type mapping in the SQLAlchemy dialect to include "big_decimal".
  • Enhanced test coverage for JSON deserialization, view definition, and rollback functionality.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/unit/test_sqlalchemy.py Added tests for handling BIG_DECIMAL types and extended tests for JSON deserialization and other utility methods.
pinotdb/sqlalchemy.py Updated the type mapping to include "big_decimal" for proper Numeric conversion.
Comments suppressed due to low confidence (2)

tests/unit/test_sqlalchemy.py:315

  • [nitpick] Consider using a consistent naming convention for test methods across the file; for example, aligning 'test_get_view_definition' with the plural form used in other tests may improve clarity.
def test_get_view_definition(self):

pinotdb/sqlalchemy.py:371

  • Ensure that the dataType value from the schema (e.g., 'BIG_DECIMAL') is normalized (e.g., to lowercase) before the type mapping lookup to avoid mismatches.
"big_decimal": types.Numeric,

@xiangfu0 xiangfu0 merged commit fba02d2 into master Jun 9, 2025
10 checks passed
@xiangfu0 xiangfu0 deleted the support-big-decimal branch June 9, 2025 15:58
@xiangfu0 xiangfu0 linked an issue Jun 9, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pinot BIG_DECIMAL columns are not accessible via SQLAlchemy

2 participants