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 16
16
17
17
from __future__ import annotations
18
18
19
- from enum import Enum
20
19
from typing import Literal , Optional
21
20
import warnings
22
21
25
24
import jellyfish
26
25
27
26
import bigframes .constants
27
+ import bigframes .enums
28
28
import bigframes .exceptions
29
29
30
-
31
- class OrderingMode (Enum ):
32
- STRICT = "strict"
33
- PARTIAL = "partial"
34
-
35
-
36
30
SESSION_STARTED_MESSAGE = (
37
31
"Cannot change '{attribute}' once a session has started. "
38
32
"Call bigframes.pandas.close_session() first, if you are using the bigframes.pandas API."
@@ -64,11 +58,11 @@ def _validate_location(value: Optional[str]):
64
58
)
65
59
66
60
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
72
66
raise ValueError ("Ordering mode must be one of 'strict' or 'partial'." )
73
67
74
68
Original file line number Diff line number Diff line change 20
20
import enum
21
21
22
22
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
+
23
33
class DefaultIndexKind (enum .Enum ):
24
34
"""Sentinel values used to override default indexing behavior."""
25
35
You can’t perform that action at this time.
0 commit comments