chalkpy 2.93.9__py3-none-any.whl → 2.94.1__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/_gen/chalk/protosql/v1/sql_service_pb2.py +37 -27
- chalk/_gen/chalk/protosql/v1/sql_service_pb2.pyi +58 -3
- chalk/_version.py +1 -1
- chalk/importer.py +103 -66
- chalk/parsed/to_proto.py +2 -2
- chalk/streams/_windows.py +7 -2
- {chalkpy-2.93.9.dist-info → chalkpy-2.94.1.dist-info}/METADATA +1 -1
- {chalkpy-2.93.9.dist-info → chalkpy-2.94.1.dist-info}/RECORD +11 -11
- {chalkpy-2.93.9.dist-info → chalkpy-2.94.1.dist-info}/WHEEL +0 -0
- {chalkpy-2.93.9.dist-info → chalkpy-2.94.1.dist-info}/entry_points.txt +0 -0
- {chalkpy-2.93.9.dist-info → chalkpy-2.94.1.dist-info}/top_level.txt +0 -0
|
@@ -18,7 +18,7 @@ from chalk._gen.chalk.common.v1 import chalk_error_pb2 as chalk_dot_common_dot_v
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
21
|
-
b'\n#chalk/protosql/v1/sql_service.proto\x12\x11\x63halk.protosql.v1\x1a\x1f\x63halk/auth/v1/permissions.proto\x1a!chalk/common/v1/chalk_error.proto"
|
|
21
|
+
b'\n#chalk/protosql/v1/sql_service.proto\x12\x11\x63halk.protosql.v1\x1a\x1f\x63halk/auth/v1/permissions.proto\x1a!chalk/common/v1/chalk_error.proto"#\n!ExecuteSqlSyncQueryRequestOptions"$\n"ExecuteSqlAsyncQueryRequestOptions"\xb1\x02\n\x16\x45xecuteSqlQueryRequest\x12\x14\n\x05query\x18\x01 \x01(\tR\x05query\x12*\n\x0e\x63orrelation_id\x18\x02 \x01(\tH\x01R\rcorrelationId\x88\x01\x01\x12Y\n\x0csync_options\x18\n \x01(\x0b\x32\x34.chalk.protosql.v1.ExecuteSqlSyncQueryRequestOptionsH\x00R\x0bsyncOptions\x12\\\n\rasync_options\x18\x0b \x01(\x0b\x32\x35.chalk.protosql.v1.ExecuteSqlAsyncQueryRequestOptionsH\x00R\x0c\x61syncOptionsB\t\n\x07optionsB\x11\n\x0f_correlation_id"O\n"ExecuteSqlSyncQueryResponsePayload\x12)\n\x10parquet_response\x18\x01 \x01(\x0cR\x0fparquetResponse"\xa0\x01\n#ExecuteSqlAsyncQueryResponsePayload\x12!\n\x0coperation_id\x18\x01 \x01(\tR\x0boperationId\x12V\n\x0e\x65xecution_mode\x18\x02 \x01(\x0e\x32/.chalk.protosql.v1.ExecuteSqlAsyncExecutionModeR\rexecutionMode"\xcb\x02\n\x17\x45xecuteSqlQueryResponse\x12\x19\n\x08query_id\x18\x01 \x01(\tR\x07queryId\x12\x1a\n\x07parquet\x18\x02 \x01(\x0cH\x00R\x07parquet\x12Z\n\x0csync_payload\x18\n \x01(\x0b\x32\x35.chalk.protosql.v1.ExecuteSqlSyncQueryResponsePayloadH\x00R\x0bsyncPayload\x12]\n\rasync_payload\x18\x0b \x01(\x0b\x32\x36.chalk.protosql.v1.ExecuteSqlAsyncQueryResponsePayloadH\x00R\x0c\x61syncPayload\x12\x33\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x1b.chalk.common.v1.ChalkErrorR\x06\x65rrorsB\t\n\x07payload"+\n\x13PlanSqlQueryRequest\x12\x14\n\x05query\x18\x01 \x01(\tR\x05query"n\n\x14PlanSqlQueryResponse\x12!\n\x0clogical_plan\x18\x01 \x01(\tR\x0blogicalPlan\x12\x33\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\x1b.chalk.common.v1.ChalkErrorR\x06\x65rrors"\x16\n\x14GetDbCatalogsRequest"q\n\x15GetDbCatalogsResponse\x12#\n\rcatalog_names\x18\x01 \x03(\tR\x0c\x63\x61talogNames\x12\x33\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\x1b.chalk.common.v1.ChalkErrorR\x06\x65rrors"\xd0\x01\n\x13GetDbSchemasRequest\x12\x1d\n\x07\x63\x61talog\x18\x01 \x01(\tH\x00R\x07\x63\x61talog\x88\x01\x01\x12<\n\x18\x64\x62_schema_filter_pattern\x18\x02 \x01(\tH\x01R\x15\x64\x62SchemaFilterPattern\x88\x01\x01\x12\x33\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\x1b.chalk.common.v1.ChalkErrorR\x06\x65rrorsB\n\n\x08_catalogB\x1b\n\x19_db_schema_filter_pattern"W\n\x0c\x44\x62SchemaInfo\x12!\n\x0c\x63\x61talog_name\x18\x01 \x01(\tR\x0b\x63\x61talogName\x12$\n\x0e\x64\x62_schema_name\x18\x02 \x01(\tR\x0c\x64\x62SchemaName"\x86\x01\n\x14GetDbSchemasResponse\x12\x39\n\x07schemas\x18\x01 \x03(\x0b\x32\x1f.chalk.protosql.v1.DbSchemaInfoR\x07schemas\x12\x33\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\x1b.chalk.common.v1.ChalkErrorR\x06\x65rrors"\x9f\x02\n\x10GetTablesRequest\x12\x1d\n\x07\x63\x61talog\x18\x01 \x01(\tH\x00R\x07\x63\x61talog\x88\x01\x01\x12<\n\x18\x64\x62_schema_filter_pattern\x18\x02 \x01(\tH\x01R\x15\x64\x62SchemaFilterPattern\x88\x01\x01\x12>\n\x19table_name_filter_pattern\x18\x03 \x01(\tH\x02R\x16tableNameFilterPattern\x88\x01\x01\x12\'\n\x0finclude_schemas\x18\n \x01(\x08R\x0eincludeSchemasB\n\n\x08_catalogB\x1b\n\x19_db_schema_filter_patternB\x1c\n\x1a_table_name_filter_pattern"\xbd\x01\n\tTableInfo\x12!\n\x0c\x63\x61talog_name\x18\x01 \x01(\tR\x0b\x63\x61talogName\x12$\n\x0e\x64\x62_schema_name\x18\x02 \x01(\tR\x0c\x64\x62SchemaName\x12\x1d\n\ntable_name\x18\x03 \x01(\tR\ttableName\x12\x31\n\x12table_arrow_schema\x18\x04 \x01(\x0cH\x00R\x10tableArrowSchema\x88\x01\x01\x42\x15\n\x13_table_arrow_schema"~\n\x11GetTablesResponse\x12\x34\n\x06tables\x18\x01 \x03(\x0b\x32\x1c.chalk.protosql.v1.TableInfoR\x06tables\x12\x33\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\x1b.chalk.common.v1.ChalkErrorR\x06\x65rrors*\xad\x01\n\x1c\x45xecuteSqlAsyncExecutionMode\x12\x30\n,EXECUTE_SQL_ASYNC_EXECUTION_MODE_UNSPECIFIED\x10\x00\x12/\n+EXECUTE_SQL_ASYNC_EXECUTION_MODE_IN_PROCESS\x10\x01\x12*\n&EXECUTE_SQL_ASYNC_EXECUTION_MODE_ASYNC\x10\x02\x32\x8d\x04\n\nSqlService\x12m\n\x0f\x45xecuteSqlQuery\x12).chalk.protosql.v1.ExecuteSqlQueryRequest\x1a*.chalk.protosql.v1.ExecuteSqlQueryResponse"\x03\x80}\x03\x12\x64\n\x0cPlanSqlQuery\x12&.chalk.protosql.v1.PlanSqlQueryRequest\x1a\'.chalk.protosql.v1.PlanSqlQueryResponse"\x03\x80}\x03\x12g\n\rGetDbCatalogs\x12\'.chalk.protosql.v1.GetDbCatalogsRequest\x1a(.chalk.protosql.v1.GetDbCatalogsResponse"\x03\x80}\x0b\x12\x64\n\x0cGetDbSchemas\x12&.chalk.protosql.v1.GetDbSchemasRequest\x1a\'.chalk.protosql.v1.GetDbSchemasResponse"\x03\x80}\x0b\x12[\n\tGetTables\x12#.chalk.protosql.v1.GetTablesRequest\x1a$.chalk.protosql.v1.GetTablesResponse"\x03\x80}\x0b\x42\x8e\x01\n\x15\x63om.chalk.protosql.v1B\x0fSqlServiceProtoP\x01\xa2\x02\x03\x43PX\xaa\x02\x11\x43halk.Protosql.V1\xca\x02\x11\x43halk\\Protosql\\V1\xe2\x02\x1d\x43halk\\Protosql\\V1\\GPBMetadata\xea\x02\x13\x43halk::Protosql::V1b\x06proto3'
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
_globals = globals()
|
|
@@ -39,30 +39,40 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
39
39
|
_globals["_SQLSERVICE"].methods_by_name["GetDbSchemas"]._serialized_options = b"\200}\013"
|
|
40
40
|
_globals["_SQLSERVICE"].methods_by_name["GetTables"]._options = None
|
|
41
41
|
_globals["_SQLSERVICE"].methods_by_name["GetTables"]._serialized_options = b"\200}\013"
|
|
42
|
-
_globals["
|
|
43
|
-
_globals["
|
|
44
|
-
_globals["
|
|
45
|
-
_globals["
|
|
46
|
-
_globals["
|
|
47
|
-
_globals["
|
|
48
|
-
_globals["
|
|
49
|
-
_globals["
|
|
50
|
-
_globals["
|
|
51
|
-
_globals["
|
|
52
|
-
_globals["
|
|
53
|
-
_globals["
|
|
54
|
-
_globals["
|
|
55
|
-
_globals["
|
|
56
|
-
_globals["
|
|
57
|
-
_globals["
|
|
58
|
-
_globals["
|
|
59
|
-
_globals["
|
|
60
|
-
_globals["
|
|
61
|
-
_globals["
|
|
62
|
-
_globals["
|
|
63
|
-
_globals["
|
|
64
|
-
_globals["
|
|
65
|
-
_globals["
|
|
66
|
-
_globals["
|
|
67
|
-
_globals["
|
|
42
|
+
_globals["_EXECUTESQLASYNCEXECUTIONMODE"]._serialized_start = 2431
|
|
43
|
+
_globals["_EXECUTESQLASYNCEXECUTIONMODE"]._serialized_end = 2604
|
|
44
|
+
_globals["_EXECUTESQLSYNCQUERYREQUESTOPTIONS"]._serialized_start = 126
|
|
45
|
+
_globals["_EXECUTESQLSYNCQUERYREQUESTOPTIONS"]._serialized_end = 161
|
|
46
|
+
_globals["_EXECUTESQLASYNCQUERYREQUESTOPTIONS"]._serialized_start = 163
|
|
47
|
+
_globals["_EXECUTESQLASYNCQUERYREQUESTOPTIONS"]._serialized_end = 199
|
|
48
|
+
_globals["_EXECUTESQLQUERYREQUEST"]._serialized_start = 202
|
|
49
|
+
_globals["_EXECUTESQLQUERYREQUEST"]._serialized_end = 507
|
|
50
|
+
_globals["_EXECUTESQLSYNCQUERYRESPONSEPAYLOAD"]._serialized_start = 509
|
|
51
|
+
_globals["_EXECUTESQLSYNCQUERYRESPONSEPAYLOAD"]._serialized_end = 588
|
|
52
|
+
_globals["_EXECUTESQLASYNCQUERYRESPONSEPAYLOAD"]._serialized_start = 591
|
|
53
|
+
_globals["_EXECUTESQLASYNCQUERYRESPONSEPAYLOAD"]._serialized_end = 751
|
|
54
|
+
_globals["_EXECUTESQLQUERYRESPONSE"]._serialized_start = 754
|
|
55
|
+
_globals["_EXECUTESQLQUERYRESPONSE"]._serialized_end = 1085
|
|
56
|
+
_globals["_PLANSQLQUERYREQUEST"]._serialized_start = 1087
|
|
57
|
+
_globals["_PLANSQLQUERYREQUEST"]._serialized_end = 1130
|
|
58
|
+
_globals["_PLANSQLQUERYRESPONSE"]._serialized_start = 1132
|
|
59
|
+
_globals["_PLANSQLQUERYRESPONSE"]._serialized_end = 1242
|
|
60
|
+
_globals["_GETDBCATALOGSREQUEST"]._serialized_start = 1244
|
|
61
|
+
_globals["_GETDBCATALOGSREQUEST"]._serialized_end = 1266
|
|
62
|
+
_globals["_GETDBCATALOGSRESPONSE"]._serialized_start = 1268
|
|
63
|
+
_globals["_GETDBCATALOGSRESPONSE"]._serialized_end = 1381
|
|
64
|
+
_globals["_GETDBSCHEMASREQUEST"]._serialized_start = 1384
|
|
65
|
+
_globals["_GETDBSCHEMASREQUEST"]._serialized_end = 1592
|
|
66
|
+
_globals["_DBSCHEMAINFO"]._serialized_start = 1594
|
|
67
|
+
_globals["_DBSCHEMAINFO"]._serialized_end = 1681
|
|
68
|
+
_globals["_GETDBSCHEMASRESPONSE"]._serialized_start = 1684
|
|
69
|
+
_globals["_GETDBSCHEMASRESPONSE"]._serialized_end = 1818
|
|
70
|
+
_globals["_GETTABLESREQUEST"]._serialized_start = 1821
|
|
71
|
+
_globals["_GETTABLESREQUEST"]._serialized_end = 2108
|
|
72
|
+
_globals["_TABLEINFO"]._serialized_start = 2111
|
|
73
|
+
_globals["_TABLEINFO"]._serialized_end = 2300
|
|
74
|
+
_globals["_GETTABLESRESPONSE"]._serialized_start = 2302
|
|
75
|
+
_globals["_GETTABLESRESPONSE"]._serialized_end = 2428
|
|
76
|
+
_globals["_SQLSERVICE"]._serialized_start = 2607
|
|
77
|
+
_globals["_SQLSERVICE"]._serialized_end = 3132
|
|
68
78
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from chalk._gen.chalk.auth.v1 import permissions_pb2 as _permissions_pb2
|
|
2
2
|
from chalk._gen.chalk.common.v1 import chalk_error_pb2 as _chalk_error_pb2
|
|
3
3
|
from google.protobuf.internal import containers as _containers
|
|
4
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
4
5
|
from google.protobuf import descriptor as _descriptor
|
|
5
6
|
from google.protobuf import message as _message
|
|
6
7
|
from typing import (
|
|
@@ -13,24 +14,78 @@ from typing import (
|
|
|
13
14
|
|
|
14
15
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
15
16
|
|
|
17
|
+
class ExecuteSqlAsyncExecutionMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
18
|
+
__slots__ = ()
|
|
19
|
+
EXECUTE_SQL_ASYNC_EXECUTION_MODE_UNSPECIFIED: _ClassVar[ExecuteSqlAsyncExecutionMode]
|
|
20
|
+
EXECUTE_SQL_ASYNC_EXECUTION_MODE_IN_PROCESS: _ClassVar[ExecuteSqlAsyncExecutionMode]
|
|
21
|
+
EXECUTE_SQL_ASYNC_EXECUTION_MODE_ASYNC: _ClassVar[ExecuteSqlAsyncExecutionMode]
|
|
22
|
+
|
|
23
|
+
EXECUTE_SQL_ASYNC_EXECUTION_MODE_UNSPECIFIED: ExecuteSqlAsyncExecutionMode
|
|
24
|
+
EXECUTE_SQL_ASYNC_EXECUTION_MODE_IN_PROCESS: ExecuteSqlAsyncExecutionMode
|
|
25
|
+
EXECUTE_SQL_ASYNC_EXECUTION_MODE_ASYNC: ExecuteSqlAsyncExecutionMode
|
|
26
|
+
|
|
27
|
+
class ExecuteSqlSyncQueryRequestOptions(_message.Message):
|
|
28
|
+
__slots__ = ()
|
|
29
|
+
def __init__(self) -> None: ...
|
|
30
|
+
|
|
31
|
+
class ExecuteSqlAsyncQueryRequestOptions(_message.Message):
|
|
32
|
+
__slots__ = ()
|
|
33
|
+
def __init__(self) -> None: ...
|
|
34
|
+
|
|
16
35
|
class ExecuteSqlQueryRequest(_message.Message):
|
|
17
|
-
__slots__ = ("query",)
|
|
36
|
+
__slots__ = ("query", "correlation_id", "sync_options", "async_options")
|
|
18
37
|
QUERY_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
CORRELATION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
SYNC_OPTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
40
|
+
ASYNC_OPTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
19
41
|
query: str
|
|
20
|
-
|
|
42
|
+
correlation_id: str
|
|
43
|
+
sync_options: ExecuteSqlSyncQueryRequestOptions
|
|
44
|
+
async_options: ExecuteSqlAsyncQueryRequestOptions
|
|
45
|
+
def __init__(
|
|
46
|
+
self,
|
|
47
|
+
query: _Optional[str] = ...,
|
|
48
|
+
correlation_id: _Optional[str] = ...,
|
|
49
|
+
sync_options: _Optional[_Union[ExecuteSqlSyncQueryRequestOptions, _Mapping]] = ...,
|
|
50
|
+
async_options: _Optional[_Union[ExecuteSqlAsyncQueryRequestOptions, _Mapping]] = ...,
|
|
51
|
+
) -> None: ...
|
|
52
|
+
|
|
53
|
+
class ExecuteSqlSyncQueryResponsePayload(_message.Message):
|
|
54
|
+
__slots__ = ("parquet_response",)
|
|
55
|
+
PARQUET_RESPONSE_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
parquet_response: bytes
|
|
57
|
+
def __init__(self, parquet_response: _Optional[bytes] = ...) -> None: ...
|
|
58
|
+
|
|
59
|
+
class ExecuteSqlAsyncQueryResponsePayload(_message.Message):
|
|
60
|
+
__slots__ = ("operation_id", "execution_mode")
|
|
61
|
+
OPERATION_ID_FIELD_NUMBER: _ClassVar[int]
|
|
62
|
+
EXECUTION_MODE_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
operation_id: str
|
|
64
|
+
execution_mode: ExecuteSqlAsyncExecutionMode
|
|
65
|
+
def __init__(
|
|
66
|
+
self,
|
|
67
|
+
operation_id: _Optional[str] = ...,
|
|
68
|
+
execution_mode: _Optional[_Union[ExecuteSqlAsyncExecutionMode, str]] = ...,
|
|
69
|
+
) -> None: ...
|
|
21
70
|
|
|
22
71
|
class ExecuteSqlQueryResponse(_message.Message):
|
|
23
|
-
__slots__ = ("query_id", "parquet", "errors")
|
|
72
|
+
__slots__ = ("query_id", "parquet", "sync_payload", "async_payload", "errors")
|
|
24
73
|
QUERY_ID_FIELD_NUMBER: _ClassVar[int]
|
|
25
74
|
PARQUET_FIELD_NUMBER: _ClassVar[int]
|
|
75
|
+
SYNC_PAYLOAD_FIELD_NUMBER: _ClassVar[int]
|
|
76
|
+
ASYNC_PAYLOAD_FIELD_NUMBER: _ClassVar[int]
|
|
26
77
|
ERRORS_FIELD_NUMBER: _ClassVar[int]
|
|
27
78
|
query_id: str
|
|
28
79
|
parquet: bytes
|
|
80
|
+
sync_payload: ExecuteSqlSyncQueryResponsePayload
|
|
81
|
+
async_payload: ExecuteSqlAsyncQueryResponsePayload
|
|
29
82
|
errors: _containers.RepeatedCompositeFieldContainer[_chalk_error_pb2.ChalkError]
|
|
30
83
|
def __init__(
|
|
31
84
|
self,
|
|
32
85
|
query_id: _Optional[str] = ...,
|
|
33
86
|
parquet: _Optional[bytes] = ...,
|
|
87
|
+
sync_payload: _Optional[_Union[ExecuteSqlSyncQueryResponsePayload, _Mapping]] = ...,
|
|
88
|
+
async_payload: _Optional[_Union[ExecuteSqlAsyncQueryResponsePayload, _Mapping]] = ...,
|
|
34
89
|
errors: _Optional[_Iterable[_Union[_chalk_error_pb2.ChalkError, _Mapping]]] = ...,
|
|
35
90
|
) -> None: ...
|
|
36
91
|
|
chalk/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.
|
|
1
|
+
__version__ = "2.94.1"
|
chalk/importer.py
CHANGED
|
@@ -304,6 +304,19 @@ def _parse_agg_function_call(expr: Underscore | None) -> Tuple[str, Underscore,
|
|
|
304
304
|
f"expecting 'int' type argument for 'k', but received arg of type '{type(call_expr._chalk__kwargs.get('k'))}'"
|
|
305
305
|
)
|
|
306
306
|
opts = FrozenOrderedSet(call_expr._chalk__kwargs.items())
|
|
307
|
+
elif aggregation == "approx_percentile":
|
|
308
|
+
if len(call_expr._chalk__args) > 0:
|
|
309
|
+
raise ChalkParseError("should not have any positional arguments")
|
|
310
|
+
elif {"quantile"} != call_expr._chalk__kwargs.keys():
|
|
311
|
+
raise ChalkParseError("expecting exactly one required keyword argument 'quantile'")
|
|
312
|
+
elif not isinstance(call_expr._chalk__kwargs.get("quantile"), float):
|
|
313
|
+
raise ChalkParseError(
|
|
314
|
+
f"expecting 'float' type argument for 'quantile', but received arg of type '{type(call_expr._chalk__kwargs.get('quantile'))}'"
|
|
315
|
+
)
|
|
316
|
+
# TODO: expand proto definition to accept kwargs that are not necessarily `k`
|
|
317
|
+
quantile = call_expr._chalk__kwargs["quantile"]
|
|
318
|
+
nano_quantile = int(round(quantile * 1_000_000_000))
|
|
319
|
+
opts = FrozenOrderedSet([("k", nano_quantile)])
|
|
307
320
|
elif aggregation in ("min_by_n", "max_by_n"):
|
|
308
321
|
if len(call_expr._chalk__kwargs) > 0:
|
|
309
322
|
raise ChalkParseError("should not have any keyword arguments")
|
|
@@ -570,39 +583,51 @@ def parse_grouped_window(f: Feature) -> WindowConfigResolved:
|
|
|
570
583
|
aggregation_kwargs=aggregation_kwargs,
|
|
571
584
|
pyarrow_dtype=pyarrow_dtype,
|
|
572
585
|
filters=parsed_filters,
|
|
573
|
-
backfill_resolver=
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
)
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
586
|
+
backfill_resolver=(
|
|
587
|
+
_try_parse_resolver_fqn(
|
|
588
|
+
"backfill_resolver",
|
|
589
|
+
f.window_materialization.get("backfill_resolver", None),
|
|
590
|
+
)
|
|
591
|
+
if isinstance(f.window_materialization, dict)
|
|
592
|
+
else None
|
|
593
|
+
),
|
|
594
|
+
backfill_schedule=(
|
|
595
|
+
f.window_materialization.get("backfill_schedule", None)
|
|
596
|
+
if isinstance(f.window_materialization, dict)
|
|
597
|
+
else None
|
|
598
|
+
),
|
|
599
|
+
backfill_lookback_duration_seconds=(
|
|
600
|
+
_try_parse_duration(
|
|
601
|
+
"backfill_lookback_duration",
|
|
602
|
+
f.window_materialization.get("backfill_lookback_duration", None),
|
|
603
|
+
)
|
|
604
|
+
if isinstance(f.window_materialization, dict)
|
|
605
|
+
else None
|
|
606
|
+
),
|
|
607
|
+
backfill_start_time=(
|
|
608
|
+
_try_parse_datetime(
|
|
609
|
+
"backfill_start_time",
|
|
610
|
+
f.window_materialization.get("backfill_start_time", None),
|
|
611
|
+
)
|
|
612
|
+
if isinstance(f.window_materialization, dict)
|
|
613
|
+
else None
|
|
614
|
+
),
|
|
615
|
+
continuous_resolver=(
|
|
616
|
+
_try_parse_resolver_fqn(
|
|
617
|
+
"continuous_resolver",
|
|
618
|
+
f.window_materialization.get("continuous_resolver", None),
|
|
619
|
+
)
|
|
620
|
+
if isinstance(f.window_materialization, dict)
|
|
621
|
+
else None
|
|
622
|
+
),
|
|
623
|
+
continuous_buffer_duration_seconds=(
|
|
624
|
+
_try_parse_duration(
|
|
625
|
+
"continuous_buffer_duration",
|
|
626
|
+
f.window_materialization.get("continuous_buffer_duration", None),
|
|
627
|
+
)
|
|
628
|
+
if isinstance(f.window_materialization, dict)
|
|
629
|
+
else None
|
|
630
|
+
),
|
|
606
631
|
)
|
|
607
632
|
|
|
608
633
|
return cfg
|
|
@@ -798,39 +823,51 @@ def parse_windowed_materialization(f: Feature) -> WindowConfigResolved | None:
|
|
|
798
823
|
aggregation_kwargs=aggregation_kwargs,
|
|
799
824
|
pyarrow_dtype=f.converter.pyarrow_dtype,
|
|
800
825
|
filters=parsed_filters,
|
|
801
|
-
backfill_resolver=
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
)
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
826
|
+
backfill_resolver=(
|
|
827
|
+
_try_parse_resolver_fqn(
|
|
828
|
+
"backfill_resolver",
|
|
829
|
+
f.window_materialization.get("backfill_resolver", None),
|
|
830
|
+
)
|
|
831
|
+
if isinstance(f.window_materialization, dict)
|
|
832
|
+
else None
|
|
833
|
+
),
|
|
834
|
+
backfill_schedule=(
|
|
835
|
+
f.window_materialization.get("backfill_schedule", None)
|
|
836
|
+
if isinstance(f.window_materialization, dict)
|
|
837
|
+
else None
|
|
838
|
+
),
|
|
839
|
+
backfill_lookback_duration_seconds=(
|
|
840
|
+
_try_parse_duration(
|
|
841
|
+
"backfill_lookback_duration",
|
|
842
|
+
f.window_materialization.get("backfill_lookback_duration", None),
|
|
843
|
+
)
|
|
844
|
+
if isinstance(f.window_materialization, dict)
|
|
845
|
+
else None
|
|
846
|
+
),
|
|
847
|
+
backfill_start_time=(
|
|
848
|
+
_try_parse_datetime(
|
|
849
|
+
"backfill_start_time",
|
|
850
|
+
f.window_materialization.get("backfill_start_time", None),
|
|
851
|
+
)
|
|
852
|
+
if isinstance(f.window_materialization, dict)
|
|
853
|
+
else None
|
|
854
|
+
),
|
|
855
|
+
continuous_resolver=(
|
|
856
|
+
_try_parse_resolver_fqn(
|
|
857
|
+
"continuous_resolver",
|
|
858
|
+
f.window_materialization.get("continuous_resolver", None),
|
|
859
|
+
)
|
|
860
|
+
if isinstance(f.window_materialization, dict)
|
|
861
|
+
else None
|
|
862
|
+
),
|
|
863
|
+
continuous_buffer_duration_seconds=(
|
|
864
|
+
_try_parse_duration(
|
|
865
|
+
"continuous_buffer_duration",
|
|
866
|
+
f.window_materialization.get("continuous_buffer_duration", None),
|
|
867
|
+
)
|
|
868
|
+
if isinstance(f.window_materialization, dict)
|
|
869
|
+
else None
|
|
870
|
+
),
|
|
834
871
|
)
|
|
835
872
|
|
|
836
873
|
|
chalk/parsed/to_proto.py
CHANGED
|
@@ -900,7 +900,7 @@ class ToProtoConverter:
|
|
|
900
900
|
else None,
|
|
901
901
|
backfill_schedule=mat.backfill_schedule,
|
|
902
902
|
approx_top_k_arg_k=aggregation_kwargs.get("k")
|
|
903
|
-
if mat.aggregation in ("approx_top_k", "min_by_n", "max_by_n")
|
|
903
|
+
if mat.aggregation in ("approx_top_k", "approx_percentile", "min_by_n", "max_by_n")
|
|
904
904
|
else None,
|
|
905
905
|
),
|
|
906
906
|
tags=f.tags,
|
|
@@ -996,7 +996,7 @@ class ToProtoConverter:
|
|
|
996
996
|
else None,
|
|
997
997
|
continuous_resolver=wmp.continuous_resolver,
|
|
998
998
|
approx_top_k_arg_k=aggregation_kwargs.get("k")
|
|
999
|
-
if wmp.aggregation in ("approx_top_k", "min_by_n", "max_by_n")
|
|
999
|
+
if wmp.aggregation in ("approx_top_k", "approx_percentile", "min_by_n", "max_by_n")
|
|
1000
1000
|
else None,
|
|
1001
1001
|
)
|
|
1002
1002
|
if wmp is not None
|
chalk/streams/_windows.py
CHANGED
|
@@ -80,9 +80,14 @@ JsonValue = Any
|
|
|
80
80
|
|
|
81
81
|
def get_name_with_duration(name_or_fqn: str, duration: Union[str, int, timedelta]) -> str:
|
|
82
82
|
duration_secs = parse_chalk_duration_s(duration)
|
|
83
|
+
name_or_fqn_components = name_or_fqn.split("@")
|
|
84
|
+
assert len(name_or_fqn_components) <= 2, f"Received invalid fqn format.\nfqn={name_or_fqn}"
|
|
85
|
+
unversioned_fqn = name_or_fqn_components[0]
|
|
86
|
+
version = None if len(name_or_fqn_components) != 2 else name_or_fqn_components[1]
|
|
87
|
+
|
|
83
88
|
if duration_secs >= CHALK_MAX_TIMEDELTA.total_seconds():
|
|
84
|
-
return f"{
|
|
85
|
-
return f"{
|
|
89
|
+
return f"{unversioned_fqn}__all__" + ("" if version is None else f"@{version}")
|
|
90
|
+
return f"{unversioned_fqn}__{duration_secs}__" + ("" if version is None else f"@{version}")
|
|
86
91
|
|
|
87
92
|
|
|
88
93
|
if TYPE_CHECKING:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
chalk/__init__.py,sha256=9YxwkAt3Im0OCMfpmnIB_4PKjZfBCcRmwATLXdHNRm4,2609
|
|
2
|
-
chalk/_version.py,sha256
|
|
2
|
+
chalk/_version.py,sha256=qZK5zpTwvJFAFEHgDYBgGFNnP2LVBn-tflwghckSoMU,23
|
|
3
3
|
chalk/cli.py,sha256=ckqqfOI-A2mT23-rnZzDMmblYj-2x1VBX8ebHlIEn9A,5873
|
|
4
|
-
chalk/importer.py,sha256=
|
|
4
|
+
chalk/importer.py,sha256=m4lMn1lSYj_euDq8CS7LYTBnek9JOcjGJf9-82dJHbA,64441
|
|
5
5
|
chalk/prompts.py,sha256=2H9UomLAamdfRTNUdKs9i3VTpiossuyRhntqsAXUhhg,16117
|
|
6
6
|
chalk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
chalk/state.py,sha256=YG-YCA7bf-gs7zeRk5XQJlrFn2bhRwbKdaXTf-7khGs,657
|
|
@@ -292,8 +292,8 @@ chalk/_gen/chalk/nodepools/v1/karpenter_pb2_grpc.py,sha256=VCyAf0skoHSgQPkD4n8rK
|
|
|
292
292
|
chalk/_gen/chalk/nodepools/v1/karpenter_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
|
293
293
|
chalk/_gen/chalk/protosql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
294
294
|
chalk/_gen/chalk/protosql/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
295
|
-
chalk/_gen/chalk/protosql/v1/sql_service_pb2.py,sha256=
|
|
296
|
-
chalk/_gen/chalk/protosql/v1/sql_service_pb2.pyi,sha256=
|
|
295
|
+
chalk/_gen/chalk/protosql/v1/sql_service_pb2.py,sha256=wHzKG8hOTTQcHe2rw0_VLSJ8QxOsIXLssvFQWp7gMaI,9318
|
|
296
|
+
chalk/_gen/chalk/protosql/v1/sql_service_pb2.pyi,sha256=8q4G-KwU8CxeLYHdASWL6_LyzhOjyPg_LJqnAIMMEho,8546
|
|
297
297
|
chalk/_gen/chalk/protosql/v1/sql_service_pb2_grpc.py,sha256=qjbEKwu149zLWzojg8YfmpiItjTfnaBBtsaOwBA5bFo,10100
|
|
298
298
|
chalk/_gen/chalk/protosql/v1/sql_service_pb2_grpc.pyi,sha256=g7cHRvZrfKwpQcDfywXqaZLtYKZRvx1dGOh3GY63O7g,2125
|
|
299
299
|
chalk/_gen/chalk/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -699,7 +699,7 @@ chalk/parsed/branch_state_rich.py,sha256=X9st1vRMRMOfnEy3hwitsAyNcTzZlubXJt9jI1M
|
|
|
699
699
|
chalk/parsed/duplicate_input_gql.py,sha256=IbVRKDCS-M7f9k127LpeVjRlXvzp1tuIek-bOqTULC4,20196
|
|
700
700
|
chalk/parsed/expressions.py,sha256=A8U54v9jacLX4UVtLqSUYUjL-lOnI-kWvG2hHZvfYE0,554
|
|
701
701
|
chalk/parsed/json_conversions.py,sha256=GRBg2KvwahP1tXwr7n--s7ueULN6prEDPO2I9B9MWzk,30459
|
|
702
|
-
chalk/parsed/to_proto.py,sha256=
|
|
702
|
+
chalk/parsed/to_proto.py,sha256=MoX4dQ_vERXTqql125vmVRP2Bm1_5E2gPDyad9XsNVg,75439
|
|
703
703
|
chalk/parsed/user_types_to_json.py,sha256=ZJWdYFqyhr5InvItQybtHadXQjW3vjHrv8hjMGtL3Bc,13318
|
|
704
704
|
chalk/parsed/validation_from_registries.py,sha256=nfiAj1tvWRu0RrkhkGtElhAsL8V7ayEKUisrKQF-wYc,7900
|
|
705
705
|
chalk/parsed/_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -758,7 +758,7 @@ chalk/streams/__init__.py,sha256=VXPDBGaECNfJ5iSyIqYHBNYX-O2EcBntMpmwx6SVZ8M,566
|
|
|
758
758
|
chalk/streams/_kafka_source.py,sha256=bHsOdZfHJv-S4F7iF7z1nIj4ji7UM_17h91oPtiWQRc,9313
|
|
759
759
|
chalk/streams/_kinesis_source.py,sha256=Qw7kBKvDhy-SjwP095YwyXILSJQHUd7HSnY_air-nCE,9034
|
|
760
760
|
chalk/streams/_pubsub_source.py,sha256=5QMnu7KhPN1F8dfzkH2_-sAfRr1TGIvY_VfjVLlrdWk,4312
|
|
761
|
-
chalk/streams/_windows.py,sha256=
|
|
761
|
+
chalk/streams/_windows.py,sha256=mfleJx5wOEJAKJ7ynLMWfHSo79Kuoa0DWXm_LiEhs2U,28167
|
|
762
762
|
chalk/streams/base.py,sha256=xhkhDfu6WsgcsC-uHVTzf2_OFa3aVviDiSAUUWK3LSM,1311
|
|
763
763
|
chalk/streams/types.py,sha256=B0jTn4aw5gJWCiR97rU7z6IB6VttTOxV4Ic5QwUr3MQ,1273
|
|
764
764
|
chalk/testing/__init__.py,sha256=RqHfN9BGZ-zvMyI5o2fHcimpg_xHaRXDRBu5LivByu4,1468
|
|
@@ -799,8 +799,8 @@ chalk/utils/tracing.py,sha256=Glx8YrtjWy0zE5YbpgfgcsLDshAKnnYm9poiWNeCxXs,11075
|
|
|
799
799
|
chalk/utils/weak_set_by_identity.py,sha256=VmikA_laYwFeOphCwXJIuyOIkrdlQe0bSzaXq7onoQw,953
|
|
800
800
|
chalk/utils/pydanticutil/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
801
801
|
chalk/utils/pydanticutil/pydantic_compat.py,sha256=O575lLYJ5GvZC4HMzR9yATxf9XwjC6NrDUXbNwZidlE,3031
|
|
802
|
-
chalkpy-2.
|
|
803
|
-
chalkpy-2.
|
|
804
|
-
chalkpy-2.
|
|
805
|
-
chalkpy-2.
|
|
806
|
-
chalkpy-2.
|
|
802
|
+
chalkpy-2.94.1.dist-info/METADATA,sha256=8dIOxHpczvNIshVjjvO_AQ0GXOf3FrjQ70QBkAY5h28,27494
|
|
803
|
+
chalkpy-2.94.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
804
|
+
chalkpy-2.94.1.dist-info/entry_points.txt,sha256=Vg23sd8icwq-morJrljVFr-kQnMbm95rZfZj5wsZGis,42
|
|
805
|
+
chalkpy-2.94.1.dist-info/top_level.txt,sha256=1Q6_19IGYfNxSw50W8tYKEJ2t5HKQ3W9Wiw4ia5yg2c,6
|
|
806
|
+
chalkpy-2.94.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|