-
Notifications
You must be signed in to change notification settings - Fork 8
fix: thread the table props through properly #576
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
Co-authored-by: Thomas Chow <[email protected]>
WalkthroughThe changes update how table properties are handled across multiple Spark job files. Import statements have been consolidated and reorganized for clarity. The initialization of table properties now relies on directly accessing the metadata’s Changes
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)
⏰ Context from checks skipped due to timeout of 90000ms (14)
🔇 Additional comments (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (4)
spark/src/main/scala/ai/chronon/spark/JoinBase.scala(2 hunks)spark/src/main/scala/ai/chronon/spark/JoinPartJob.scala(1 hunks)spark/src/main/scala/ai/chronon/spark/MergeJob.scala(3 hunks)spark/src/main/scala/ai/chronon/spark/SourceJob.scala(2 hunks)
🧰 Additional context used
🧬 Code Definitions (4)
spark/src/main/scala/ai/chronon/spark/JoinBase.scala (4)
api/src/main/scala/ai/chronon/api/Builders.scala (1)
JoinPart(246-259)api/src/main/scala/ai/chronon/api/DataRange.scala (2)
PartitionRange(38-128)PartitionRange(130-168)api/src/main/scala/ai/chronon/api/Extensions.scala (2)
Extensions(43-1250)tableProps(149-154)spark/src/main/scala/ai/chronon/spark/JoinUtils.scala (3)
JoinUtils(37-620)coalescedJoin(169-200)leftDf(68-95)
spark/src/main/scala/ai/chronon/spark/JoinPartJob.scala (1)
api/src/main/scala/ai/chronon/api/Extensions.scala (1)
tableProps(149-154)
spark/src/main/scala/ai/chronon/spark/MergeJob.scala (1)
api/src/main/scala/ai/chronon/api/Extensions.scala (3)
Extensions(43-1250)outputTable(121-121)tableProps(149-154)
spark/src/main/scala/ai/chronon/spark/SourceJob.scala (7)
spark/src/main/scala/ai/chronon/spark/Extensions.scala (2)
Extensions(36-298)save(141-150)api/src/main/scala/ai/chronon/api/Extensions.scala (4)
Extensions(43-1250)MetadataOps(118-165)outputTable(121-121)tableProps(149-154)spark/src/main/scala/ai/chronon/spark/JoinUtils.scala (2)
JoinUtils(37-620)parseSkewKeys(559-563)orchestration/src/main/scala/ai/chronon/orchestration/physical/JoinBackfill.scala (1)
outputTable(20-20)orchestration/src/main/scala/ai/chronon/orchestration/physical/StagingQueryNode.scala (1)
outputTable(34-34)orchestration/src/main/scala/ai/chronon/orchestration/physical/GroupByBackfill.scala (1)
outputTable(16-16)orchestration/src/main/scala/ai/chronon/orchestration/physical/LabelJoin.scala (1)
outputTable(20-20)
⏰ Context from checks skipped due to timeout of 90000ms (14)
- GitHub Check: streaming_tests
- GitHub Check: streaming_tests
- GitHub Check: groupby_tests
- GitHub Check: groupby_tests
- GitHub Check: analyzer_tests
- GitHub Check: analyzer_tests
- GitHub Check: join_tests
- GitHub Check: join_tests
- GitHub Check: fetcher_tests
- GitHub Check: spark_tests
- GitHub Check: spark_tests
- GitHub Check: scala_compile_fmt_fix
- GitHub Check: fetcher_tests
- GitHub Check: enforce_triggered_workflows
🔇 Additional comments (8)
spark/src/main/scala/ai/chronon/spark/JoinPartJob.scala (1)
63-63:❓ Verification inconclusive
Potential null check needed.
Now using metadata table properties instead of empty map. Verify
node.metaData.tablePropshandles null values properly.
🏁 Script executed:
#!/bin/bash # Check how tableProps is used in the codebase ast-grep --pattern $'def tableProps.*\n.*\n.*orNull' -lLength of output: 160
Please re-run the above command to verify how null values are handled in the definition of tableProps. Once confirmed, ensure that node.metaData.tableProps is either guaranteed non-null or properly guarded with a null check.
Action: Verify tableProps’ null safety in its definition.
🏁 Script executed:
#!/bin/bash # Re-run AST search with Scala language flag to locate the definition of tableProps ast-grep --lang scala --pattern $'def tableProps' -lLength of output: 159
Action: Verify null handling on node.metaData.tableProps.
- The automated AST search didn’t yield evidence of a null check on tableProps.
- Please ensure that tableProps in metadata is either guaranteed non-null or that a proper null check is implemented where used (e.g., in JoinPartJob.scala at line 63).
spark/src/main/scala/ai/chronon/spark/SourceJob.scala (3)
3-3: Import statements reorganized.Imports are consolidated for better organization.
Also applies to: 5-5
11-11: Import simplified.Collection imports streamlined.
61-61: Table properties now passed from metadata.Now correctly threads table properties from metadata through to save operation.
spark/src/main/scala/ai/chronon/spark/JoinBase.scala (1)
23-23: Imports consolidated.Related imports grouped together for better readability.
Also applies to: 27-27, 31-31
spark/src/main/scala/ai/chronon/spark/MergeJob.scala (3)
14-24: Imports organized.Import statements regrouped.
45-45: Constructor simplified.Removed tableProps parameter in favor of accessing properties directly from metadata.
78-78: Table properties passed from metadata.Using node.metaData.tableProps aligns with changes in other files for consistent property handling.
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
Co-authored-by: Thomas Chow <[email protected]>
## Summary
Need to propagate table props through correctly
## 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**
- Consolidated import statements for improved readability.
- Updated job configurations to directly use metadata-defined table
properties, ensuring that data saving operations incorporate the correct
settings.
- Enhanced metadata for source jobs by including specific table
properties relevant for downstream processing.
<!-- 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: Thomas Chow <[email protected]>
## Summary
Need to propagate table props through correctly
## 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**
- Consolidated import statements for improved readability.
- Updated job configurations to directly use metadata-defined table
properties, ensuring that data saving operations incorporate the correct
settings.
- Enhanced metadata for source jobs by including specific table
properties relevant for downstream processing.
<!-- 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: Thomas Chow <[email protected]>
## Summary
Need to propagate table props through correctly
## 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**
- Consolidated import statements for improved readability.
- Updated job configurations to directly use metadata-defined table
properties, ensuring that data saving operations incorporate the correct
settings.
- Enhanced metadata for source jobs by including specific table
properties relevant for downstream processing.
<!-- 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: Thomas Chow <[email protected]>
## Summary
Need to propagate table props through correctly
## 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**
- Consolidated import statements for improved readability.
- Updated job configurations to directly use metadata-defined table
properties, ensuring that data saving operations incorporate the correct
settings.
- Enhanced metadata for source jobs by including specific table
properties relevant for downstream processing.
<!-- 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: Thomas Chow <[email protected]>
## Summary
Need to propagate table props through correctly
## 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**
- Consolidated import statements for improved readability.
- Updated job configurations to directly use metadata-defined table
properties, ensuring that data saving operations incorporate the correct
settings.
- Enhanced metadata for source jobs by including specific table
properties relevant for downstream processing.
<!-- 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: Thomas Chow <[email protected]>
Summary
Need to propagate table props through correctly
Checklist
Summary by CodeRabbit