Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented bigframes.bigquery.obj module with functions fetch_metadata, get_access_url, and make_ref to support BigQuery ObjectRef functions. Added corresponding operations and compiler support for Ibis and SQLGlot. Verified with unit tests.


PR created automatically by Jules for task 4416923769784608541 started by @tswast

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`.
@google-labs-jules
Copy link
Contributor Author

👋 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 to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Dec 17, 2025
Comment on lines 69 to 71
return objectref._apply_binary_op(
duration, ops.ObjGetAccessUrlWithDuration(mode=mode)
)
Copy link
Collaborator

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.

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`.
@tswast tswast changed the title Add BigQuery ObjectRef functions feat: add bigframes.bigquery.obj ObjectRef functions Dec 18, 2025
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`.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant