chalkpy 2.94.0__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/_version.py +1 -1
- chalk/importer.py +103 -66
- chalk/parsed/to_proto.py +2 -2
- {chalkpy-2.94.0.dist-info → chalkpy-2.94.1.dist-info}/METADATA +1 -1
- {chalkpy-2.94.0.dist-info → chalkpy-2.94.1.dist-info}/RECORD +8 -8
- {chalkpy-2.94.0.dist-info → chalkpy-2.94.1.dist-info}/WHEEL +0 -0
- {chalkpy-2.94.0.dist-info → chalkpy-2.94.1.dist-info}/entry_points.txt +0 -0
- {chalkpy-2.94.0.dist-info → chalkpy-2.94.1.dist-info}/top_level.txt +0 -0
chalk/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.94.
|
|
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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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.94.
|
|
803
|
-
chalkpy-2.94.
|
|
804
|
-
chalkpy-2.94.
|
|
805
|
-
chalkpy-2.94.
|
|
806
|
-
chalkpy-2.94.
|
|
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
|