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

chore: respect catalog restriction in ListColumns #16

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

atzoum
Copy link
Collaborator

@atzoum atzoum commented Mar 14, 2024

Description

If a catalog is passed as an argument in ListColumns, it should be included as a condition it in the sql statement.

Bonus: introducing CurrentCatalog method to get the current catalog.

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@atzoum atzoum changed the title chore: respect catalog parameter in DB.ListColumns chore: respect catalog parameter in ListColumns Mar 14, 2024
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 94.69027% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 88.33%. Comparing base (b00a62e) to head (57c416a).
Report is 1 commits behind head on main.

Files Patch % Lines
sqlconnect/internal/databricks/db.go 90.90% 1 Missing and 1 partial ⚠️
sqlconnect/internal/databricks/tableadmin.go 75.00% 1 Missing and 1 partial ⚠️
sqlconnect/internal/mysql/db.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
+ Coverage   87.81%   88.33%   +0.52%     
==========================================
  Files          55       59       +4     
  Lines        2002     2143     +141     
==========================================
+ Hits         1758     1893     +135     
- Misses        170      173       +3     
- Partials       74       77       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@atzoum atzoum marked this pull request as ready for review March 14, 2024 11:56
@atzoum atzoum changed the title chore: respect catalog parameter in ListColumns chore: respect catalog restriction in ListColumns Mar 14, 2024
@atzoum atzoum force-pushed the chore.catalogInListColumns branch 2 times, most recently from 4a64f32 to 8f00f56 Compare March 20, 2024 08:45
@atzoum atzoum force-pushed the chore.catalogInListColumns branch from 8f00f56 to 57c416a Compare March 20, 2024 16:18
@@ -25,8 +25,5 @@ func (c *Config) Parse(configJson json.RawMessage) error {
if err != nil {
return err
}
if c.Catalog == "" {
c.Catalog = "hive_metastore" // default catalog
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: rudder-sources now sets this as a default value, the library assumes no default value

@atzoum atzoum merged commit 11bf6b2 into main Mar 21, 2024
18 checks passed
@atzoum atzoum deleted the chore.catalogInListColumns branch March 21, 2024 10:27
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.

1 participant