Add Athena data-diff table summaries - #2335
Open
terzioglub wants to merge 1 commit into
Open
Conversation
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
pkg/athena/db.go:523-525
**Catalog Names Are Rejected**
When `bruin data-diff` receives an Athena table as `catalog.schema.table`, the CLI passes that identifier through unchanged, but this branch rejects it before any Athena query runs. Fully qualified Athena tables therefore fail with the format error instead of being compared.
Reviews (1): Last reviewed commit: "Add Athena table summaries for data diff" | Re-trigger Greptile |
Comment on lines
+523
to
+525
| tableNameOnly = tableComponents[1] | ||
| default: | ||
| return "", "", "", fmt.Errorf("table name must be in table or schema.table format, '%s' given", tableName) |
Contributor
There was a problem hiding this comment.
When bruin data-diff receives an Athena table as catalog.schema.table, the CLI passes that identifier through unchanged, but this branch rejects it before any Athena query runs. Fully qualified Athena tables therefore fail with the format error instead of being compared.
Rule Used: What: Comments should be concise and targeted to s... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: pkg/athena/db.go
Line: 523-525
Comment:
**Catalog Names Are Rejected**
When `bruin data-diff` receives an Athena table as `catalog.schema.table`, the CLI passes that identifier through unchanged, but this branch rejects it before any Athena query runs. Fully qualified Athena tables therefore fail with the format error instead of being compared.
**Rule Used:** What: Comments should be concise and targeted to s... ([source](https://app.greptile.com/bruin/-/custom-context?memory=6adfbd2b-1b23-4560-9e00-6254e7cb7c70))
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GetTableSummaryfor Athena sobruin data-diffcan compare Athena tables.Fixes #1224.
Tests
CGO_ENABLED=0 go test ./pkg/athena ./pkg/diffNote:
go test -tags=no_duckdb_arrow ./cmd -run 'TestDataDiff|TestCompare|Test.*Diff'could not complete in this runner because the container ran out of disk while compiling unrelated cloud provider dependencies.