corvic-engine 0.3.0rc53__cp38-abi3-win_amd64.whl → 0.3.0rc54__cp38-abi3-win_amd64.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.
- corvic/engine/_native.pyd +0 -0
- corvic/pa_scalar/_to_value.py +11 -16
- corvic/table/table.py +0 -13
- {corvic_engine-0.3.0rc53.dist-info → corvic_engine-0.3.0rc54.dist-info}/METADATA +1 -1
- {corvic_engine-0.3.0rc53.dist-info → corvic_engine-0.3.0rc54.dist-info}/RECORD +7 -7
- {corvic_engine-0.3.0rc53.dist-info → corvic_engine-0.3.0rc54.dist-info}/WHEEL +0 -0
- {corvic_engine-0.3.0rc53.dist-info → corvic_engine-0.3.0rc54.dist-info}/licenses/LICENSE +0 -0
corvic/engine/_native.pyd
CHANGED
Binary file
|
corvic/pa_scalar/_to_value.py
CHANGED
@@ -414,28 +414,23 @@ def _visit(
|
|
414
414
|
|
415
415
|
|
416
416
|
def to_value(
|
417
|
-
scalar: Scalar |
|
417
|
+
scalar: Scalar | _PyValue | struct_pb2.Value,
|
418
418
|
) -> struct_pb2.Value:
|
419
419
|
"""Convert Scalar (or convenient Scalar equivalents) to struct_pb2.Value."""
|
420
420
|
match scalar:
|
421
|
-
# Order matters: bools are ints but ints are not bools
|
422
|
-
case bool():
|
423
|
-
return struct_pb2.Value(bool_value=scalar)
|
424
|
-
case int():
|
425
|
-
return struct_pb2.Value(string_value=str(scalar))
|
426
|
-
case float():
|
427
|
-
if _is_invalid_float(scalar):
|
428
|
-
return to_value(None)
|
429
|
-
return struct_pb2.Value(number_value=scalar)
|
430
|
-
case str():
|
431
|
-
return struct_pb2.Value(string_value=scalar)
|
432
|
-
case None:
|
433
|
-
return struct_pb2.Value(null_value=struct_pb2.NULL_VALUE)
|
434
421
|
case struct_pb2.Value():
|
435
422
|
return scalar
|
436
|
-
case
|
423
|
+
case pa.Scalar():
|
437
424
|
value = cast(_PyValue, scalar.as_py())
|
438
|
-
return _visit(value, scalar.type)
|
425
|
+
return _visit(value, cast(Scalar, scalar).type)
|
426
|
+
case _:
|
427
|
+
try:
|
428
|
+
# Attempt to convert the python value into a pyarrow scalar and
|
429
|
+
# then go through our visitor
|
430
|
+
pa_value = cast(Scalar, pa.scalar(cast(Any, scalar)))
|
431
|
+
return to_value(pa_value)
|
432
|
+
except Exception:
|
433
|
+
return struct_pb2.Value(null_value=struct_pb2.NULL_VALUE)
|
439
434
|
|
440
435
|
|
441
436
|
def _to_py(scalar: Scalar) -> Any:
|
corvic/table/table.py
CHANGED
@@ -62,9 +62,6 @@ _TM = TypeVar("_TM", bound=TypedMetadata)
|
|
62
62
|
|
63
63
|
_logger = structlog.get_logger()
|
64
64
|
|
65
|
-
CORVIC_RESERVED_PREFIX = "__corvic"
|
66
|
-
CORVIC_SURROGATE_ID = f"{CORVIC_RESERVED_PREFIX}_surrogate_id"
|
67
|
-
|
68
65
|
|
69
66
|
@dataclasses.dataclass
|
70
67
|
class DataclassAsTypedMetadataMixin:
|
@@ -366,16 +363,6 @@ class Table:
|
|
366
363
|
case Ok(op):
|
367
364
|
pass
|
368
365
|
|
369
|
-
# For internally added columns we can set custom feature types
|
370
|
-
if CORVIC_SURROGATE_ID in schema:
|
371
|
-
match op.update_feature_types(
|
372
|
-
{CORVIC_SURROGATE_ID: op_graph.feature_type.identifier()}
|
373
|
-
):
|
374
|
-
case InvalidArgumentError() as error:
|
375
|
-
return error
|
376
|
-
case Ok(op):
|
377
|
-
pass
|
378
|
-
|
379
366
|
return Ok(cls.from_ops(client, op))
|
380
367
|
|
381
368
|
def to_bytes(self):
|
@@ -1,6 +1,6 @@
|
|
1
|
-
corvic_engine-0.3.
|
2
|
-
corvic_engine-0.3.
|
3
|
-
corvic_engine-0.3.
|
1
|
+
corvic_engine-0.3.0rc54.dist-info/METADATA,sha256=dIswsV76aebo40RElZBVxIi8a_5eXaWzbfg1013YXEE,1876
|
2
|
+
corvic_engine-0.3.0rc54.dist-info/WHEEL,sha256=_g1M2QM3kt1Ssm_sHOg_3TUY7GxNE2Ueyslb9ZDtPwk,94
|
3
|
+
corvic_engine-0.3.0rc54.dist-info/licenses/LICENSE,sha256=DSS1OD0oIgssKOmAzkMRBv5jvvVuZQbrIv8lpl9DXY8,1035
|
4
4
|
corvic/context/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
corvic/context/__init__.py,sha256=zBnPiP-tStGSVMG_0-G_0ay6-yIX2aerW_oYRzAex74,1702
|
6
6
|
corvic/embed/node2vec.py,sha256=JnYb8f2g4XhF6LL2TjpMxLfKhn_Yp1AzptsWwrKQWgc,11146
|
@@ -55,7 +55,7 @@ corvic/pa_scalar/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
corvic/pa_scalar/_const.py,sha256=1nk6w3Y7crd3J5jSCq7DRVa1lcGk4H1RUr1l4NjnlzE,868
|
56
56
|
corvic/pa_scalar/_from_value.py,sha256=fS3TNPcPI3jAKGmcUIhn8rdqdQEAwgTLEneVxFUeK6M,27531
|
57
57
|
corvic/pa_scalar/_temporal.py,sha256=HPL1z5k4frIiGWM469YGj9j0hCPXNHtI_X1jk1y1c1Q,7842
|
58
|
-
corvic/pa_scalar/_to_value.py,sha256=
|
58
|
+
corvic/pa_scalar/_to_value.py,sha256=U8DoWDMSl58Yi35yd3JS5Gj773e5IOPa2UDfuZqTkjk,13307
|
59
59
|
corvic/pa_scalar/_types.py,sha256=shbytO0ji-H2rBOX_1fooVOshb22wwkVU1W99VBKz1A,1131
|
60
60
|
corvic/pa_scalar/__init__.py,sha256=1nfc0MFGpw78RQEI13VE5hpHuyw_DoE7sJbmzqx5pws,1063
|
61
61
|
corvic/proto_wrapper/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -86,7 +86,7 @@ corvic/system_sqlite/rdbms_blob_store.py,sha256=gTP_tQfTVb3wzZkzo8ys1zaz0rSrERzb
|
|
86
86
|
corvic/system_sqlite/staging.py,sha256=P6XdWhjpgcpOZkYxKEjpsTxaAdBKOeSVfARjqt4_xJA,16948
|
87
87
|
corvic/system_sqlite/__init__.py,sha256=F4UN9vFsXiDY2AKk1jYZPuWWJpSugKHS7ghXeZYlbZs,390
|
88
88
|
corvic/table/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
|
-
corvic/table/table.py,sha256=
|
89
|
+
corvic/table/table.py,sha256=wgA4d1QslrGu7rvzyiob21hLd7esyjgO_QntaSYl-4Q,25038
|
90
90
|
corvic/table/__init__.py,sha256=Gj0IR8BQF5PZK92Us7PP0ZigMsVyrfWJupzH8TgzRQk,588
|
91
91
|
corvic/version/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
92
|
corvic/version/__init__.py,sha256=JlkRLvKXsu3zIxhdynO_0Ub5NfQOvGjfwCRkNnaOu9U,1125
|
@@ -244,5 +244,5 @@ corvic_generated/status/v1/event_pb2.pyi,sha256=eU-ibrYpvEAJSIDlSa62-bC96AQU1ykF
|
|
244
244
|
corvic_generated/status/v1/event_pb2_grpc.pyi,sha256=H9-ADaiKR9iyVZvmnXutZqWwRRCDxjUIktkfJrJFIHg,417
|
245
245
|
corvic_generated/status/v1/service_pb2.pyi,sha256=iXLR2FOKQJpBgvBzpD2kVwcYOCksP2aRwK4JYaI9CBw,558
|
246
246
|
corvic_generated/status/v1/service_pb2_grpc.pyi,sha256=OoAnaZ64FD0UTzPoRhYvQU8ecoilhHj3ySjSfHbVDaU,1501
|
247
|
-
corvic/engine/_native.pyd,sha256=
|
248
|
-
corvic_engine-0.3.
|
247
|
+
corvic/engine/_native.pyd,sha256=I1MFZZQaMhCn6DLZyvp-gCPp22KegJanmob1Do2OH7Y,438272
|
248
|
+
corvic_engine-0.3.0rc54.dist-info/RECORD,,
|
File without changes
|
File without changes
|