Skip to content

Fix HANA get_columns on HANA Cloud (#153)#182

Merged
Maxteabag merged 1 commit intomainfrom
worktree-fix-hana-get-columns-153
Apr 18, 2026
Merged

Fix HANA get_columns on HANA Cloud (#153)#182
Maxteabag merged 1 commit intomainfrom
worktree-fix-hana-get-columns-153

Conversation

@Maxteabag
Copy link
Copy Markdown
Owner

Fixes #153.

HANA Cloud's SYS.CONSTRAINT_COLUMNS doesn't exist, and SYS.COLUMNS has been deprecated since HANA 2 SP03. SYS.CONSTRAINTS already has COLUMN_NAME and IS_PRIMARY_KEY per column, so we can drop the join and read columns from SYS.TABLE_COLUMNS instead.

Added mocked unit tests for get_columns so we'd catch a regression — there are no HANA integration tests yet (SAP doesn't ship a Docker image, so the usual compose setup doesn't cover it).

SYS.CONSTRAINT_COLUMNS does not exist in current HANA Cloud schemas,
and SYS.COLUMNS has been deprecated since HANA 2 SP03. SYS.CONSTRAINTS
already exposes COLUMN_NAME and IS_PRIMARY_KEY per column, so the
join can be dropped entirely.

Fixes #153
@Maxteabag Maxteabag merged commit 49da2d0 into main Apr 18, 2026
21 checks passed
@Maxteabag Maxteabag deleted the worktree-fix-hana-get-columns-153 branch April 18, 2026 19:40
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.

HANA table fails with Could not find table/view CONSTRAINT_COLUMNS when trying to read column names

1 participant