Skip to content

feat(connectors): BI-6992 Fix postgres ARRAY type detection#1535

Open
catsona wants to merge 4 commits into
mainfrom
catsona/BI-6992/fix_postgres_array_types
Open

feat(connectors): BI-6992 Fix postgres ARRAY type detection#1535
catsona wants to merge 4 commits into
mainfrom
catsona/BI-6992/fix_postgres_array_types

Conversation

@catsona

@catsona catsona commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes PostgreSQL connector metadata inference for ARRAY columns by correcting OID-to-type mappings and adding regression tests to validate BI type detection for common array element types.

Changes:

  • Corrected PostgreSQL pg_type.oid mappings for _text and _numeric arrays in the adapter.
  • Added API-level DashSQL tests validating BI type detection for integer, float/numeric, and string array columns (both table-based and query-based).

Reviewed changes

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

File Description
lib/dl_connector_postgresql/dl_connector_postgresql/core/postgresql_base/adapters_base_postgres.py Fixes OID mappings used to infer SQLAlchemy/native types for PostgreSQL array columns.
lib/dl_connector_postgresql/dl_connector_postgresql_tests/db/api/test_array_types.py Adds regression tests ensuring array BI types are detected correctly from metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

from dl_connector_postgresql_tests.db.api.base import PostgreSQLDashSQLConnectionTest


class TestPostgreSQLArrayTypes(PostgreSQLDashSQLConnectionTest, DefaultDashSQLTestSuite):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these tests have to do with dashsql? Don't these tests look more suitable for type recognition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implemented similar to YDB connector, where type recognition is tested using DashSQL:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original issue is related to SQL-datasource, not dashsql

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved test to type recognition

@catsona
catsona force-pushed the catsona/BI-6992/fix_postgres_array_types branch from 37acd74 to 68aefa2 Compare February 20, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/connectors Connectors type/feat New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants