- Notifications
You must be signed in to change notification settings - Fork63
feat: addbigframes.bigquery.obj ObjectRef functions#2340
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This change introduces support for BigQuery ObjectRef functions:- `OBJ.FETCH_METADATA`- `OBJ.GET_ACCESS_URL`- `OBJ.MAKE_REF`These are exposed via a new `bigframes.bigquery.obj` module.Changes:- Added `ObjMakeRefJson` and `ObjGetAccessUrlWithDuration` operations in `bigframes/operations/blob_ops.py`.- Updated `bigframes/operations/__init__.py` to export new operations.- Updated `bigframes/core/compile/ibis_compiler/scalar_op_registry.py` and `bigframes/core/compile/sqlglot/expressions/blob_ops.py` to support new operations.- Created `bigframes/bigquery/_operations/obj.py` with the implementation of `fetch_metadata`, `get_access_url`, and `make_ref`.- Created `bigframes/bigquery/obj.py` to expose the functions.- Added unit tests in `tests/unit/bigquery/test_obj.py`.
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me toReactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more atjules.google/docs. |
| return objectref._apply_binary_op( | ||
| duration, ops.ObjGetAccessUrlWithDuration(mode=mode) | ||
| ) |
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.
@google-labs-jules duration should not be a Series. Instead, accept a Union[datetime.timedelta, pandas.Timedelta, numpy.timedelta64, None] and use bigframes.core.utils.timedelta_to_micros to help create an INTERVAL literal value.
This means that ObjGetAccessUrlWithDuration can be a unary op, since it only has literal values as parameters. In fact, we can just add an optional duration argument to the existing ObjGetAccessUrl unary op and keep it a unary op.
Uh oh!
There was an error while loading.Please reload this page.
This change introduces support for BigQuery ObjectRef functions:- `OBJ.FETCH_METADATA`- `OBJ.GET_ACCESS_URL`- `OBJ.MAKE_REF`These are exposed via a new `bigframes.bigquery.obj` module.Changes:- Added `ObjMakeRefJson` and `ObjGetAccessUrlWithDuration` operations in `bigframes/operations/blob_ops.py`.- Updated `bigframes/operations/__init__.py` to export new operations.- Updated `bigframes/core/compile/ibis_compiler/scalar_op_registry.py` and `bigframes/core/compile/sqlglot/expressions/blob_ops.py` to support new operations.- Created `bigframes/bigquery/_operations/obj.py` with the implementation of `fetch_metadata`, `get_access_url`, and `make_ref`.- Created `bigframes/bigquery/obj.py` to expose the functions.- Exposed `obj` module in `bigframes/bigquery/__init__.py`.- Added unit tests in `tests/unit/bigquery/test_obj.py`.
This change introduces support for BigQuery ObjectRef functions:- `OBJ.FETCH_METADATA`- `OBJ.GET_ACCESS_URL`- `OBJ.MAKE_REF`These are exposed via a new `bigframes.bigquery.obj` module.Changes:- Added `ObjMakeRefJson` operation in `bigframes/operations/blob_ops.py`.- Updated `ObjGetAccessUrl` operation to support optional duration.- Updated `bigframes/operations/__init__.py` to export new operations.- Updated `bigframes/core/compile/ibis_compiler/scalar_op_registry.py` and `bigframes/core/compile/sqlglot/expressions/blob_ops.py` to support new operations.- Created `bigframes/bigquery/_operations/obj.py` with the implementation of `fetch_metadata`, `get_access_url`, and `make_ref`.- Created `bigframes/bigquery/obj.py` to expose the functions.- Exposed `obj` module in `bigframes/bigquery/__init__.py`.- Added unit tests in `tests/unit/bigquery/test_obj.py`.
bigframes.bigquery.obj ObjectRef functionsThis change introduces support for BigQuery ObjectRef functions:- `OBJ.FETCH_METADATA`- `OBJ.GET_ACCESS_URL`- `OBJ.MAKE_REF`These are exposed via a new `bigframes.bigquery.obj` module.Changes:- Added `ObjMakeRefJson` operation in `bigframes/operations/blob_ops.py`.- Updated `ObjGetAccessUrl` operation to support optional duration.- Updated `bigframes/operations/__init__.py` to export new operations.- Updated `bigframes/core/compile/ibis_compiler/scalar_op_registry.py` and `bigframes/core/compile/sqlglot/expressions/blob_ops.py` to support new operations.- Created `bigframes/bigquery/_operations/obj.py` with the implementation of `fetch_metadata`, `get_access_url`, and `make_ref`.- Created `bigframes/bigquery/obj.py` to expose the functions.- Exposed `obj` module in `bigframes/bigquery/__init__.py`.- Added unit tests in `tests/unit/bigquery/test_obj.py`.
This change introduces support for BigQuery ObjectRef functions:- `OBJ.FETCH_METADATA`- `OBJ.GET_ACCESS_URL`- `OBJ.MAKE_REF`These are exposed via a new `bigframes.bigquery.obj` module.Changes:- Added `ObjMakeRefJson` operation in `bigframes/operations/blob_ops.py`.- Updated `ObjGetAccessUrl` operation to support optional duration.- Updated `bigframes/operations/__init__.py` to export new operations.- Updated `bigframes/core/compile/ibis_compiler/scalar_op_registry.py` and `bigframes/core/compile/sqlglot/expressions/blob_ops.py` to support new operations.- Created `bigframes/bigquery/_operations/obj.py` with the implementation of `fetch_metadata`, `get_access_url`, and `make_ref`.- Created `bigframes/bigquery/obj.py` to expose the functions.- Exposed `obj` module in `bigframes/bigquery/__init__.py`.- Added unit tests in `tests/unit/bigquery/test_obj.py`.- Updated `tests/unit/core/compile/sqlglot/expressions/test_blob_ops.py` snapshots.- Fixed type checking and linting errors.
Implemented
bigframes.bigquery.objmodule with functionsfetch_metadata,get_access_url, andmake_refto support BigQuery ObjectRef functions. Added corresponding operations and compiler support for Ibis and SQLGlot. Verified with unit tests.PR created automatically by Jules for task4416923769784608541 started by@tswast