Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 40 additions & 30 deletions bigframes/bigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
such as array functions:
https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions. """

import sys

from bigframes.bigquery._operations.approx_agg import approx_top_count
from bigframes.bigquery._operations.array import (
array_agg,
Expand Down Expand Up @@ -52,43 +54,51 @@
from bigframes.bigquery._operations.search import create_vector_index, vector_search
from bigframes.bigquery._operations.sql import sql_scalar
from bigframes.bigquery._operations.struct import struct
from bigframes.core import log_adapter

__all__ = [
_functions = [
# approximate aggregate ops
"approx_top_count",
approx_top_count,
# array ops
"array_agg",
"array_length",
"array_to_string",
array_agg,
array_length,
array_to_string,
# datetime ops
"unix_micros",
"unix_millis",
"unix_seconds",
unix_micros,
unix_millis,
unix_seconds,
# geo ops
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe keep the comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing. Done

"st_area",
"st_buffer",
"st_centroid",
"st_convexhull",
"st_difference",
"st_distance",
"st_intersection",
"st_isclosed",
"st_length",
st_area,
st_buffer,
st_centroid,
st_convexhull,
st_difference,
st_distance,
st_intersection,
st_isclosed,
st_length,
# json ops
"json_extract",
"json_extract_array",
"json_extract_string_array",
"json_query",
"json_query_array",
"json_set",
"json_value",
"json_value_array",
"parse_json",
json_extract,
json_extract_array,
json_extract_string_array,
json_query,
json_query_array,
json_set,
json_value,
json_value_array,
parse_json,
# search ops
"create_vector_index",
"vector_search",
create_vector_index,
vector_search,
# sql ops
"sql_scalar",
sql_scalar,
# struct ops
"struct",
struct,
]

__all__ = [f.__name__ for f in _functions]

_module = sys.modules[__name__]
for f in _functions:
_decorated_object = log_adapter.method_logger(f, custom_base_name="bigquery")
setattr(_module, f.__name__, _decorated_object)
1 change: 0 additions & 1 deletion bigframes/bigquery/_operations/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import google.cloud.bigquery as bigquery

import bigframes.core.sql
import bigframes.ml.utils as utils

if typing.TYPE_CHECKING:
Expand Down
2 changes: 0 additions & 2 deletions bigframes/bigquery/_operations/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import google.cloud.bigquery

import bigframes.core.compile.sqlglot.sqlglot_ir as sqlglot_ir
import bigframes.core.sql
import bigframes.dataframe
import bigframes.dtypes
import bigframes.operations
import bigframes.series
Expand Down