feat: Use validated local storage for data uploads#1612
Merged
TrevorBergeron merged 12 commits intomainfrom Apr 14, 2025
Merged
feat: Use validated local storage for data uploads#1612TrevorBergeron merged 12 commits intomainfrom
TrevorBergeron merged 12 commits intomainfrom
Conversation
chelsea-lin
reviewed
Apr 12, 2025
| pandas_dataframe_copy.columns = pandas.Index(new_col_ids) | ||
| pandas_dataframe_copy[ordering_col] = np.arange(pandas_dataframe_copy.shape[0]) | ||
|
|
||
| timedelta_cols = utils.replace_timedeltas_with_micros(pandas_dataframe_copy) |
Contributor
There was a problem hiding this comment.
you may wan to remove this function from utils.
Contributor
Author
There was a problem hiding this comment.
makes sense, yeah, done
bigframes/session/loader.py
Outdated
|
|
||
| # JSON support incomplete | ||
| for item in data.schema.items: | ||
| utils.validate_dtype_can_load(item.column, item.dtype) |
Contributor
There was a problem hiding this comment.
an we move valid_dtype_can_load into loader.py? It was put in utils.py for referencing by two places.
sycai
approved these changes
Apr 14, 2025
bigframes/session/loader.py
Outdated
| return configuration | ||
|
|
||
|
|
||
| def _search_for_nested_json_type(arrow_type: pa.DataType) -> bool: |
Contributor
There was a problem hiding this comment.
naming nit: _has_json_arrow_type(...) ?
| we're using a workaround: storing JSON as strings and then parsing them into JSON | ||
| objects. | ||
| TODO(b/395912450): Remove workaround solution once b/374784249 got resolved. | ||
| """ |
Contributor
There was a problem hiding this comment.
We should probably add some content in the Python doc to indicate that an error will be raised if the validation fails.
Contributor
Author
There was a problem hiding this comment.
added docstring raises
4 tasks
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.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕