-
Notifications
You must be signed in to change notification settings - Fork 0
feat: support unpartitioned tables #724
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
Conversation
WalkthroughThe The Python test code adds a new Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant BigQueryNative
participant BigQuery
Caller->>BigQueryNative: table(bqTableId, partitionFilters, ...)
BigQueryNative->>BigQuery: Retrieve partition column (Option)
alt Partition column exists
BigQueryNative->>BigQuery: Query distinct partition values
loop For each partition value
BigQueryNative->>BigQuery: Load partitioned table data
end
BigQueryNative->>Caller: Return unioned results
else No partition column
BigQueryNative->>BigQuery: Load full table with filters
BigQueryNative->>Caller: Return full table data
end
Possibly related PRs
Suggested reviewers
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions and Pipeline Checks: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (17)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryNative.scala
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (17)
- GitHub Check: service_tests
- GitHub Check: service_tests
- GitHub Check: service_commons_tests
- GitHub Check: online_tests
- GitHub Check: api_tests
- GitHub Check: flink_tests
- GitHub Check: cloud_gcp_tests
- GitHub Check: cloud_aws_tests
- GitHub Check: cloud_gcp_tests
- GitHub Check: cloud_aws_tests
- GitHub Check: online_tests
- GitHub Check: flink_tests
- GitHub Check: api_tests
- GitHub Check: aggregator_tests
- GitHub Check: aggregator_tests
- GitHub Check: scala_compile_fmt_fix
- GitHub Check: enforce_triggered_workflows
🔇 Additional comments (3)
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryNative.scala (3)
37-48
: Nice refactoring to support optional partition columns.Changed from throwing exception to using Option pattern for better handling of unpartitioned tables.
49-78
: Good pattern matching implementation.Original partitioned table logic is now cleanly wrapped in the Some case.
9-9
: Exception class is now only used in partitions() method.PartitionColumnNotFoundException is still thrown in partitions() (line 164) but no longer in table().
Consider if consumers of this code might depend on this exception being thrown by table() method.
cloud_gcp/src/main/scala/ai/chronon/integrations/cloud_gcp/BigQueryNative.scala
Outdated
Show resolved
Hide resolved
## Summary ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved handling of tables without partition columns to ensure smoother data loading. - The system now gracefully loads unpartitioned tables instead of raising errors. - **New Features** - Added new data sources and group-by configurations for enhanced purchase data aggregation. - Introduced environment-specific upload and deletion of additional BigQuery tables to support new group-by views. - **Bug Fixes** - Resolved issues where missing partition columns would previously cause exceptions, enhancing reliability for various table types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- av pr metadata This information is embedded by the av CLI when creating PRs to track the status of stacks when using Aviator. Please do not delete or edit this section of the PR. ``` {"parent":"main","parentHead":"","trunk":"main"} ``` --> --------- Co-authored-by: thomaschow <[email protected]>
## Summary ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved handling of tables without partition columns to ensure smoother data loading. - The system now gracefully loads unpartitioned tables instead of raising errors. - **New Features** - Added new data sources and group-by configurations for enhanced purchase data aggregation. - Introduced environment-specific upload and deletion of additional BigQuery tables to support new group-by views. - **Bug Fixes** - Resolved issues where missing partition columns would previously cause exceptions, enhancing reliability for various table types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- av pr metadata This information is embedded by the av CLI when creating PRs to track the status of stacks when using Aviator. Please do not delete or edit this section of the PR. ``` {"parent":"main","parentHead":"","trunk":"main"} ``` --> --------- Co-authored-by: thomaschow <[email protected]>
## Summary ## Cheour clientslist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved handling of tables without partition columns to ensure smoother data loading. - The system now gracefully loads unpartitioned tables instead of raising errors. - **New Features** - Added new data sources and group-by configurations for enhanced purchase data aggregation. - Introduced environment-specific upload and deletion of additional BigQuery tables to support new group-by views. - **Bug Fixes** - Resolved issues where missing partition columns would previously cause exceptions, enhancing reliability for various table types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- av pr metadata This information is embedded by the av CLI when creating PRs to traour clients the status of staour clientss when using Aviator. Please do not delete or edit this section of the PR. ``` {"parent":"main","parentHead":"","trunk":"main"} ``` --> --------- Co-authored-by: thomaschow <[email protected]>
Summary
Checklist
Summary by CodeRabbit
Refactor
New Features
Bug Fixes