Skip to content
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

feat(go/adbc/driver/snowflake): added table constraints implementation for GetObjects API #1593

Merged

Conversation

ryan-syed
Copy link
Contributor

@ryan-syed ryan-syed commented Mar 7, 2024

Issue

Table constraints implementation was missing for GetObjects

Fix

  • Added table constraints implementation, which is returned for ObjectsDepth of Table and Columns
  • Added tests in the interop layer
  • Modified existing tests in the connection_test.go for generated SQL statements.
  • The performance has been slightly impacted by addition of the table constraints.

Design

image

Performance

After initial changes:
image

After additional changes to improve performance:
image

Before:
image

…for depth of table and columns. Also added tests.
Copy link

github-actions bot commented Mar 7, 2024

⚠️ Please follow the Conventional Commits format in CONTRIBUTING.md for PR titles.

@github-actions github-actions bot added this to the ADBC Libraries 0.11.0 milestone Mar 7, 2024
@lidavidm lidavidm changed the title feat(api): added table constraints implementation for GetObjects API feat(go/adbc/driver/snowflake): added table constraints implementation for GetObjects API Mar 7, 2024
@ryan-syed ryan-syed marked this pull request as ready for review March 7, 2024 18:58
@ryan-syed ryan-syed requested review from zeroshade and jduo March 9, 2024 00:44
@ryan-syed ryan-syed requested a review from jduo March 15, 2024 17:08
@ryan-syed ryan-syed requested a review from jduo March 18, 2024 21:15
Copy link
Member

@jduo jduo left a comment

Choose a reason for hiding this comment

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

LGTM once the license header is fixed up.

@ryan-syed
Copy link
Contributor Author

@zeroshade @lidavidm @CurtHagenlocher Could you please review the PR?

@ryan-syed
Copy link
Contributor Author

LGTM once the license header is fixed up.

Added the missing Apache License. Thanks James!

Comment on lines 20 to +28
import (
"cmp"
"context"
"database/sql"
"database/sql/driver"
"fmt"
"io"
"regexp"
"slices"
Copy link
Member

Choose a reason for hiding this comment

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

the packages cmp and slices were only added in go1.21 so either we need to bump our minimum version or we need to replace the usages of these.

@lidavidm what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I'd be fine with bumping to 1.21 as our minimum version

Copy link
Member

Choose a reason for hiding this comment

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

Looks like 1.20 is EOL. Could someone create a separate PR to bump?

Copy link
Member

Choose a reason for hiding this comment

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

I'll take care of that.

@ryan-syed after we merge the bump, I'll comment here so you can rebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zeroshade gentle reminder to check if the minimum version has been bumped up as this PR has been open for a while now.

Copy link
Member

Choose a reason for hiding this comment

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

We ran into some issues with the packaging scripts when trying to bump the version. I'm looking into it with help from @kou

Copy link
Member

Choose a reason for hiding this comment

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

I pushed a merge commit here.

Copy link
Member

Choose a reason for hiding this comment

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

you beat me to it @lidavidm! lol

@lidavidm
Copy link
Member

Are the pre-commit changes strictly necessary here...?

@lidavidm
Copy link
Member

Alright, I'll try to fix up CI and merge this

@lidavidm lidavidm merged commit 73f5aba into apache:main Mar 27, 2024
42 checks passed
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.

4 participants