Skip to content

Conversation

@mihirvala-crestdata
Copy link
Collaborator

What

  • Removed unused _create_row_batches method from data_table.py
  • Fixed row size calculation and utilization for replace_data_table_rows in data_table.py
  • Improved logging and commenting in replace_data_table_rows

@mihirvala-crestdata mihirvala-crestdata linked an issue Sep 29, 2025 that may be closed by this pull request
@mihirvala-crestdata
Copy link
Collaborator Author

/run-integration-tests 0100c80

@mihirvala-crestdata
Copy link
Collaborator Author

@gemini-cli /review

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🤖 Hi @mihirvala-crestdata, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

📋 Review Summary

This pull request refactors the replace_data_table_rows function to improve row size calculation and batching logic. The changes simplify the implementation by removing an unused method and leveraging the existing create_data_table_rows function for handling remaining rows.

🔍 General Feedback

  • The refactoring is a good improvement, but it introduces a critical bug that will cause a NameError at runtime.
  • The logging can be improved by using the logging module instead of print() statements, which is more consistent with the project's style.
  • The tests have been updated to reflect the refactoring, which is great. However, they might not be catching the introduced bug due to mocking. It's worth reviewing the tests to ensure they cover this case.

@mihirvala-crestdata
Copy link
Collaborator Author

@gemini-cli /review

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

🤖 Hi @mihirvala-crestdata, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

📋 Review Summary

This pull request refactors the replace_data_table_rows function to improve handling of large row counts by splitting the operation into a bulkReplace for the initial batch and bulkCreate for the remaining rows. The changes simplify the batching logic by leveraging the existing create_data_table_rows function.

🔍 General Feedback

  • The refactoring is a good improvement, making the code cleaner and more robust for large datasets.
  • The test cases have been updated effectively to cover the new logic, including size-based batching and chunking.

@mihirvala-crestdata
Copy link
Collaborator Author

/run-integration-tests 4672bb3

@mihirvala-crestdata mihirvala-crestdata merged commit 93fc731 into main Oct 6, 2025
6 checks passed
@mihirvala-crestdata mihirvala-crestdata deleted the fix/data-table-bulk-replace-row-size branch October 6, 2025 09:08
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.

Bug in replace_data_table_rows method

2 participants