Skip to content

SQLColAttribute(s)#606

Draft
sfc-gh-jszczerbinski wants to merge 1 commit intomainfrom
SNOW-3240479-sql-col-attribute/s
Draft

SQLColAttribute(s)#606
sfc-gh-jszczerbinski wants to merge 1 commit intomainfrom
SNOW-3240479-sql-col-attribute/s

Conversation

@sfc-gh-jszczerbinski
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 19, 2026 00:50
@sfc-gh-jszczerbinski sfc-gh-jszczerbinski changed the title SQLColAttribute(s) tests SQLColAttribute(s) Mar 19, 2026
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

Adds new ODBC end-to-end coverage for SQLColAttribute (ODBC 3.x) and SQLColAttributes (ODBC 2.x), including spec-driven success paths and key error cases, and wires the new tests into the existing ODBC test/feature validation workflow.

Changes:

  • Introduces new Gherkin feature definitions for SQLColAttribute and SQLColAttributes.
  • Adds Catch2 E2E implementations for both APIs, including a documented behavior difference for ODBC 2.x alias handling via SQLColAttribute.
  • Registers the new tests in odbc_tests/tests/e2e/CMakeLists.txt and documents BD#22 in BehaviorDifferences.yaml.

Reviewed changes

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

Show a summary per file
File Description
tests/definitions/odbc/query/sql_col_attributes.feature New feature spec scenarios for ODBC 2.x SQLColAttributes.
tests/definitions/odbc/query/sql_col_attribute.feature New feature spec scenarios for ODBC 3.x SQLColAttribute (incl. truncation + error cases).
odbc_tests/tests/e2e/query/sql_col_attributes.cpp New Catch2 E2E tests implementing the SQLColAttributes feature scenarios.
odbc_tests/tests/e2e/query/sql_col_attribute.cpp New Catch2 E2E tests implementing the SQLColAttribute feature scenarios (incl. BD#22 gating).
odbc_tests/tests/e2e/CMakeLists.txt Adds the two new query E2E test targets.
odbc_tests/BehaviorDifferences.yaml Adds BD#22 documenting old vs new driver behavior for ODBC 2.x field aliases via SQLColAttribute.
.cursor/rules/odbc-test-generation.mdc Updates contributor workflow guidance for handling old/new driver behavior differences.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +228 to 240
22:
name: "SQLColAttribute does not reliably support ODBC 2.x field aliases through the 3.x function"
description: |
OLD driver: When SQLColAttribute (ODBC 3.x) is called with ODBC 2.x field
identifiers (SQL_COLUMN_NAME, SQL_COLUMN_TYPE, etc.), the old driver
exhibits inconsistent behavior — returning empty strings, incorrect values,
or HY091 errors depending on the identifier.
NEW driver: Properly maps ODBC 2.x field identifiers to their SQL_DESC_*
equivalents per the ODBC specification backward compatibility rules.
Impact: Applications using ODBC 2.x field identifiers with the 3.x function
will now receive correct values.

26:
## Validation Workflow (MANDATORY)

1. **Validate against OLD driver first** using `odbc_tests/run_reference.sh -R <test_suite_name>`
- If tests doesn't pass on old driver add behavior difference in odbc_tests/BehaviorDifferences.yaml and use OLD_DRIVER_ONLY, NEW_DRIVER_ONLY
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.

2 participants