chalkpy 2.98.2__py3-none-any.whl → 2.98.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chalk/_version.py +1 -1
- chalk/operators/_utils.py +11 -2
- chalk/parsed/to_proto.py +7 -5
- {chalkpy-2.98.2.dist-info → chalkpy-2.98.3.dist-info}/METADATA +1 -1
- {chalkpy-2.98.2.dist-info → chalkpy-2.98.3.dist-info}/RECORD +8 -8
- {chalkpy-2.98.2.dist-info → chalkpy-2.98.3.dist-info}/WHEEL +0 -0
- {chalkpy-2.98.2.dist-info → chalkpy-2.98.3.dist-info}/entry_points.txt +0 -0
- {chalkpy-2.98.2.dist-info → chalkpy-2.98.3.dist-info}/top_level.txt +0 -0
chalk/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.98.
|
|
1
|
+
__version__ = "2.98.3"
|
chalk/operators/_utils.py
CHANGED
|
@@ -2,11 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import dataclasses
|
|
4
4
|
import traceback
|
|
5
|
-
from typing import Callable, Optional, Sequence, Union
|
|
5
|
+
from typing import Callable, Optional, Protocol, Sequence, TypeVar, Union
|
|
6
6
|
|
|
7
7
|
import pyarrow
|
|
8
8
|
|
|
9
9
|
from chalk import DataFrame, Features, StaticOperator
|
|
10
|
+
from chalk._gen.chalk.dataframe.v1 import dataframe_pb2
|
|
10
11
|
from chalk._gen.chalk.expression.v1 import expression_pb2 as expr_pb
|
|
11
12
|
from chalk.client import ChalkError, ChalkException, ErrorCode, ErrorCodeCategory
|
|
12
13
|
from chalk.df.LazyFramePlaceholder import LazyFramePlaceholder
|
|
@@ -40,6 +41,14 @@ class _GetStaticOperatorError(Exception):
|
|
|
40
41
|
)
|
|
41
42
|
|
|
42
43
|
|
|
44
|
+
ProtoT = TypeVar("ProtoT", covariant=True)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class _ToProto(Protocol[ProtoT]):
|
|
48
|
+
def _to_proto(self) -> ProtoT:
|
|
49
|
+
...
|
|
50
|
+
|
|
51
|
+
|
|
43
52
|
@dataclasses.dataclass
|
|
44
53
|
class DfPlaceholder:
|
|
45
54
|
schema_dict: dict[str, pyarrow.DataType]
|
|
@@ -80,7 +89,7 @@ def static_resolver_to_operator(
|
|
|
80
89
|
fn: Callable,
|
|
81
90
|
inputs: Sequence[Union[Feature, type[DataFrame]]],
|
|
82
91
|
output: Optional[type[Features]],
|
|
83
|
-
) -> StaticOperator | DfPlaceholder | ChalkDataFrame |
|
|
92
|
+
) -> StaticOperator | DfPlaceholder | ChalkDataFrame | _ToProto[dataframe_pb2.DataFramePlan]:
|
|
84
93
|
if output is None:
|
|
85
94
|
raise _GetStaticOperatorError(
|
|
86
95
|
resolver_fqn=fqn,
|
chalk/parsed/to_proto.py
CHANGED
|
@@ -16,12 +16,13 @@ from typing_extensions import assert_never
|
|
|
16
16
|
|
|
17
17
|
from chalk import DataFrame
|
|
18
18
|
from chalk._gen.chalk.arrow.v1 import arrow_pb2 as arrow_pb
|
|
19
|
+
from chalk._gen.chalk.dataframe.v1.dataframe_pb2 import DataFramePlan
|
|
19
20
|
from chalk._gen.chalk.expression.v1 import expression_pb2 as expr_pb
|
|
21
|
+
from chalk._gen.chalk.expression.v1.expression_pb2 import LogicalExprNode
|
|
20
22
|
from chalk._gen.chalk.graph.v1 import graph_pb2 as pb
|
|
21
23
|
from chalk._gen.chalk.graph.v2 import sources_pb2 as sources_pb
|
|
22
24
|
from chalk._gen.chalk.lsp.v1.lsp_pb2 import Location, Position, Range
|
|
23
25
|
from chalk._validation.feature_validation import FeatureValidation
|
|
24
|
-
from chalk.df.LazyFramePlaceholder import LazyFramePlaceholder
|
|
25
26
|
from chalk.features import (
|
|
26
27
|
CacheStrategy,
|
|
27
28
|
Feature,
|
|
@@ -1154,10 +1155,11 @@ class ToProtoConverter:
|
|
|
1154
1155
|
static_operation_dataframe = None
|
|
1155
1156
|
if r.static:
|
|
1156
1157
|
static_operator = static_resolver_to_operator(fqn=r.fqn, fn=r.fn, inputs=r.inputs, output=r.output)
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1158
|
+
to_proto = static_operator._to_proto() # pyright: ignore[reportPrivateUsage]
|
|
1159
|
+
if isinstance(to_proto, DataFramePlan):
|
|
1160
|
+
static_operation_dataframe = to_proto
|
|
1161
|
+
elif isinstance(to_proto, LogicalExprNode): # pyright: ignore[reportUnnecessaryIsInstance]
|
|
1162
|
+
static_operation = to_proto
|
|
1161
1163
|
|
|
1162
1164
|
function_reference_proto = ToProtoConverter.create_function_reference(
|
|
1163
1165
|
r.fn,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
chalk/__init__.py,sha256=vKsx9-cl5kImlVWGHVRYO6bweBm79NAzGs3l36u71wM,2657
|
|
2
|
-
chalk/_version.py,sha256=
|
|
2
|
+
chalk/_version.py,sha256=Bz_5zhHPwDjTPM5Kpa6MCRtG34E0bkBIbT_od0j6sq8,23
|
|
3
3
|
chalk/cli.py,sha256=ckqqfOI-A2mT23-rnZzDMmblYj-2x1VBX8ebHlIEn9A,5873
|
|
4
4
|
chalk/importer.py,sha256=m4lMn1lSYj_euDq8CS7LYTBnek9JOcjGJf9-82dJHbA,64441
|
|
5
5
|
chalk/prompts.py,sha256=2H9UomLAamdfRTNUdKs9i3VTpiossuyRhntqsAXUhhg,16117
|
|
@@ -718,7 +718,7 @@ chalk/operators/_literal.py,sha256=T8Euf2HRUVlFuct3svX4Z8EVf80r0cWDBZGr0MUgS9Q,5
|
|
|
718
718
|
chalk/operators/_parquet_scan.py,sha256=3pSd1U-9My145GO1Nr1P_T2SfdhPZW2PLeMvKg6l4Uo,545
|
|
719
719
|
chalk/operators/_rename.py,sha256=YgpMnfYsln88gfp4AwhiI8JX58hadDvEcFYrMCcVl1o,741
|
|
720
720
|
chalk/operators/_select.py,sha256=0vXxnlSlp5DVnO7WcjJJuDb8jnwRtyVyVbdP_U4gtYs,1029
|
|
721
|
-
chalk/operators/_utils.py,sha256=
|
|
721
|
+
chalk/operators/_utils.py,sha256=WZRYAlK3M_w5k_4tyqg0AzR1cntqfaR7upNmia-g6z4,5270
|
|
722
722
|
chalk/parsed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
723
723
|
chalk/parsed/_graph_validation.py,sha256=XHVPw4cf-nkPdHrqGXevsFuOrMtWtibUTRkTuizEc4g,23771
|
|
724
724
|
chalk/parsed/_metadata.py,sha256=TCjKr20Fs4Yguo97yKjATurwOdV-DoFQeiGxbX_s1hs,6749
|
|
@@ -727,7 +727,7 @@ chalk/parsed/branch_state_rich.py,sha256=X9st1vRMRMOfnEy3hwitsAyNcTzZlubXJt9jI1M
|
|
|
727
727
|
chalk/parsed/duplicate_input_gql.py,sha256=IbVRKDCS-M7f9k127LpeVjRlXvzp1tuIek-bOqTULC4,20196
|
|
728
728
|
chalk/parsed/expressions.py,sha256=A8U54v9jacLX4UVtLqSUYUjL-lOnI-kWvG2hHZvfYE0,554
|
|
729
729
|
chalk/parsed/json_conversions.py,sha256=GRBg2KvwahP1tXwr7n--s7ueULN6prEDPO2I9B9MWzk,30459
|
|
730
|
-
chalk/parsed/to_proto.py,sha256=
|
|
730
|
+
chalk/parsed/to_proto.py,sha256=JsMnLlkXL1KH4LxZJStkwBHOB2geG9hnO3ku4LTl3vU,75657
|
|
731
731
|
chalk/parsed/user_types_to_json.py,sha256=ZJWdYFqyhr5InvItQybtHadXQjW3vjHrv8hjMGtL3Bc,13318
|
|
732
732
|
chalk/parsed/validation_from_registries.py,sha256=nfiAj1tvWRu0RrkhkGtElhAsL8V7ayEKUisrKQF-wYc,7900
|
|
733
733
|
chalk/parsed/_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -827,8 +827,8 @@ chalk/utils/tracing.py,sha256=NiiM-9dbuJhSCv6R1npR1uYNKWlkqTR6Ygm0Voi2NrY,13078
|
|
|
827
827
|
chalk/utils/weak_set_by_identity.py,sha256=VmikA_laYwFeOphCwXJIuyOIkrdlQe0bSzaXq7onoQw,953
|
|
828
828
|
chalk/utils/pydanticutil/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
829
829
|
chalk/utils/pydanticutil/pydantic_compat.py,sha256=O575lLYJ5GvZC4HMzR9yATxf9XwjC6NrDUXbNwZidlE,3031
|
|
830
|
-
chalkpy-2.98.
|
|
831
|
-
chalkpy-2.98.
|
|
832
|
-
chalkpy-2.98.
|
|
833
|
-
chalkpy-2.98.
|
|
834
|
-
chalkpy-2.98.
|
|
830
|
+
chalkpy-2.98.3.dist-info/METADATA,sha256=rhMVAP_p_UvatDRbPlTqI6QNHtIg3fNOioqUZ3HCwJ0,27754
|
|
831
|
+
chalkpy-2.98.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
832
|
+
chalkpy-2.98.3.dist-info/entry_points.txt,sha256=Vg23sd8icwq-morJrljVFr-kQnMbm95rZfZj5wsZGis,42
|
|
833
|
+
chalkpy-2.98.3.dist-info/top_level.txt,sha256=1Q6_19IGYfNxSw50W8tYKEJ2t5HKQ3W9Wiw4ia5yg2c,6
|
|
834
|
+
chalkpy-2.98.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|