Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
update annotation
  • Loading branch information
Genesis929 committed Nov 12, 2024
commit 2e27dff6834435acccd2733d215aab5049cb3e18
5 changes: 4 additions & 1 deletion bigframes/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,10 @@ def _apply_binop(
)

def _apply_scalar_binop(
self, other: float | int | bool | str, op: ops.BinaryOp, reverse: bool = False
self,
other: bigframes.dtypes.LOCAL_SCALAR_TYPE,
op: ops.BinaryOp,
reverse: bool = False,
) -> DataFrame:
if reverse:
expr = op.as_expr(
Expand Down
5 changes: 3 additions & 2 deletions bigframes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# Used when storing Null expressions
DEFAULT_DTYPE = FLOAT_DTYPE

LOCAL_SCALAR_TYPES = (
LOCAL_SCALAR_TYPE = Union[
bool,
np.bool_,
int,
Expand All @@ -75,7 +75,8 @@
pd.Timestamp,
datetime.date,
datetime.time,
)
]
LOCAL_SCALAR_TYPES = typing.get_args(LOCAL_SCALAR_TYPE)
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a feeling we will just give up at a certain point as we add more types



# Will have a few dtype variants: simple(eg. int, string, bool), complex (eg. list, struct), and virtual (eg. micro intervals, categorical)
Expand Down