File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed
Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1616
1717from __future__ import annotations
1818
19- from enum import Enum
2019from typing import Literal , Optional
2120import warnings
2221
2524import jellyfish
2625
2726import bigframes .constants
27+ import bigframes .enums
2828import bigframes .exceptions
2929
30-
31- class OrderingMode (Enum ):
32- STRICT = "strict"
33- PARTIAL = "partial"
34-
35-
3630SESSION_STARTED_MESSAGE = (
3731 "Cannot change '{attribute}' once a session has started. "
3832 "Call bigframes.pandas.close_session() first, if you are using the bigframes.pandas API."
@@ -64,11 +58,11 @@ def _validate_location(value: Optional[str]):
6458 )
6559
6660
67- def _validate_ordering_mode (value : str ) -> OrderingMode :
68- if value .casefold () == OrderingMode .STRICT .value .casefold ():
69- return OrderingMode .STRICT
70- if value .casefold () == OrderingMode .PARTIAL .value .casefold ():
71- return OrderingMode .PARTIAL
61+ def _validate_ordering_mode (value : str ) -> bigframes . enums . OrderingMode :
62+ if value .casefold () == bigframes . enums . OrderingMode .STRICT .value .casefold ():
63+ return bigframes . enums . OrderingMode .STRICT
64+ if value .casefold () == bigframes . enums . OrderingMode .PARTIAL .value .casefold ():
65+ return bigframes . enums . OrderingMode .PARTIAL
7266 raise ValueError ("Ordering mode must be one of 'strict' or 'partial'." )
7367
7468
Original file line number Diff line number Diff line change 2020import enum
2121
2222
23+ class OrderingMode (enum .Enum ):
24+ """[Preview] Values used to determine the ordering mode.
25+
26+ Default is 'strict'.
27+ """
28+
29+ STRICT = "strict"
30+ PARTIAL = "partial"
31+
32+
2333class DefaultIndexKind (enum .Enum ):
2434 """Sentinel values used to override default indexing behavior."""
2535
You can’t perform that action at this time.
0 commit comments