holosdb 0.26.0__tar.gz → 0.26.2__tar.gz
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.
- {holosdb-0.26.0 → holosdb-0.26.2}/Cargo.lock +38 -70
- {holosdb-0.26.0 → holosdb-0.26.2}/Cargo.toml +18 -11
- {holosdb-0.26.0 → holosdb-0.26.2}/PKG-INFO +1 -1
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/group.rs +20 -0
- holosdb-0.26.2/crates/holos-engine/tests/arithmetic.rs +62 -0
- holosdb-0.26.2/crates/holos-engine/tests/decimal.rs +104 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/group.rs +26 -1
- holosdb-0.26.2/crates/holos-engine/tests/nested_filter_scope.rs +81 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-python/tests/test_holosdb.py +11 -0
- holosdb-0.26.2/crates/holos-shacl/tests/decimal_message.rs +59 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/README.md +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-core/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-core/src/inline.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-core/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-core/src/term_id.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-core/src/vocab.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-core/tests/codec_properties.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/examples/algdump.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/examples/pp.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/examples/surface.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/admit.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/bindjoin.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/boundjoin.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/crs.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/distinct.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/dump.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/entailment.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/equality.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/functions.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/geo_ext.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/memory.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/options.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/range.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/reach.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/rules.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/service.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/source.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/spatial.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/spill.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/topk.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/topology.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/update.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/validate.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/src/view.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/admit.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bindjoin.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bindjoin_graph.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bindjoin_minus.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bindjoin_optional.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bindjoin_range.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bindjoin_subquery.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/boundjoin.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/bulk_load.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/closure_paths.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/distinct.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/entailment.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/equality.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/geo_crs.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/geosparql.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/gzip.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/options.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/range_policy.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/range_soundness.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/sort_spill.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/spatial.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/spill.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/spill_leak.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/transient_graph.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/update.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-engine/tests/update_atomicity.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-python/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-python/PACKAGING.md +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-python/README.md +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-python/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-security/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-security/src/audit.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-security/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-security/src/policy.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-security/src/principal.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/examples/bridge_vs_load.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/examples/incremental.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/access.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/bridge.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/engine.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/incremental.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/ir.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/report.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/validate.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/src/vocab.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/tests/engine_delta.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/tests/engine_revalidate.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/tests/fails_closed.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl/tests/incremental_is_safe.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/LICENSE-APACHE +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/LICENSE-MIT +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/PROVENANCE.md +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/datatypes.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/error.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/inference.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/model/graph.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/model/interner.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/model/loader.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/model/mod.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/model/term.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/model/vocab.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/nodeexpr.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/path.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/report.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/rules.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/shapes.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/sparql.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/validate.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-shacl-engine/src/valueset.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/examples/does_order_matter.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/examples/estimator_accuracy.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/src/baseline.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/src/characteristic.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/src/hll.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-stats/src/reorder.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/Cargo.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/dictionary.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/error.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/index.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/lib.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/memory.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/rocks/codec.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/rocks/dictsort.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/rocks/mod.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/rocks/seen.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/rocks/sort.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/src/storage.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/backend_parity.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/bulk_ingest.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/checkpoint.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/commit_scope.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/compaction.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/dict_ingest.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/generation.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/crates/holos-store/tests/range_scan.rs +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/pyproject.toml +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/python/holosdb/__init__.py +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/python/holosdb/_holosdb.pyi +0 -0
- {holosdb-0.26.0 → holosdb-0.26.2}/python/holosdb/py.typed +0 -0
|
@@ -483,20 +483,6 @@ dependencies = [
|
|
|
483
483
|
"thiserror 2.0.20",
|
|
484
484
|
]
|
|
485
485
|
|
|
486
|
-
[[package]]
|
|
487
|
-
name = "geojson"
|
|
488
|
-
version = "1.0.0"
|
|
489
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
490
|
-
checksum = "510c094bfc76ea34d02eee00833254945b70491d79a9c0b050abed6eaa799ffb"
|
|
491
|
-
dependencies = [
|
|
492
|
-
"geo-types",
|
|
493
|
-
"log",
|
|
494
|
-
"serde",
|
|
495
|
-
"serde_json",
|
|
496
|
-
"thiserror 2.0.20",
|
|
497
|
-
"tinyvec",
|
|
498
|
-
]
|
|
499
|
-
|
|
500
486
|
[[package]]
|
|
501
487
|
name = "getrandom"
|
|
502
488
|
version = "0.3.4"
|
|
@@ -615,7 +601,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
|
|
615
601
|
|
|
616
602
|
[[package]]
|
|
617
603
|
name = "holos-bench"
|
|
618
|
-
version = "0.26.
|
|
604
|
+
version = "0.26.2"
|
|
619
605
|
dependencies = [
|
|
620
606
|
"anyhow",
|
|
621
607
|
"geo",
|
|
@@ -635,11 +621,11 @@ dependencies = [
|
|
|
635
621
|
|
|
636
622
|
[[package]]
|
|
637
623
|
name = "holos-build"
|
|
638
|
-
version = "0.26.
|
|
624
|
+
version = "0.26.2"
|
|
639
625
|
|
|
640
626
|
[[package]]
|
|
641
627
|
name = "holos-cli"
|
|
642
|
-
version = "0.26.
|
|
628
|
+
version = "0.26.2"
|
|
643
629
|
dependencies = [
|
|
644
630
|
"anyhow",
|
|
645
631
|
"fs4",
|
|
@@ -659,7 +645,7 @@ dependencies = [
|
|
|
659
645
|
|
|
660
646
|
[[package]]
|
|
661
647
|
name = "holos-conformance"
|
|
662
|
-
version = "0.26.
|
|
648
|
+
version = "0.26.2"
|
|
663
649
|
dependencies = [
|
|
664
650
|
"anyhow",
|
|
665
651
|
"holos-core",
|
|
@@ -678,7 +664,7 @@ dependencies = [
|
|
|
678
664
|
|
|
679
665
|
[[package]]
|
|
680
666
|
name = "holos-core"
|
|
681
|
-
version = "0.26.
|
|
667
|
+
version = "0.26.2"
|
|
682
668
|
dependencies = [
|
|
683
669
|
"oxrdf",
|
|
684
670
|
"oxsdatatypes",
|
|
@@ -688,11 +674,11 @@ dependencies = [
|
|
|
688
674
|
|
|
689
675
|
[[package]]
|
|
690
676
|
name = "holos-engine"
|
|
691
|
-
version = "0.26.
|
|
677
|
+
version = "0.26.2"
|
|
692
678
|
dependencies = [
|
|
693
679
|
"flate2",
|
|
694
680
|
"geo",
|
|
695
|
-
"geojson
|
|
681
|
+
"geojson",
|
|
696
682
|
"getrandom 0.3.4",
|
|
697
683
|
"holos-core",
|
|
698
684
|
"holos-security",
|
|
@@ -717,7 +703,7 @@ dependencies = [
|
|
|
717
703
|
|
|
718
704
|
[[package]]
|
|
719
705
|
name = "holos-holon"
|
|
720
|
-
version = "0.26.
|
|
706
|
+
version = "0.26.2"
|
|
721
707
|
dependencies = [
|
|
722
708
|
"holos-core",
|
|
723
709
|
"holos-engine",
|
|
@@ -733,7 +719,7 @@ dependencies = [
|
|
|
733
719
|
|
|
734
720
|
[[package]]
|
|
735
721
|
name = "holos-python"
|
|
736
|
-
version = "0.26.
|
|
722
|
+
version = "0.26.2"
|
|
737
723
|
dependencies = [
|
|
738
724
|
"holos-core",
|
|
739
725
|
"holos-engine",
|
|
@@ -751,7 +737,7 @@ dependencies = [
|
|
|
751
737
|
|
|
752
738
|
[[package]]
|
|
753
739
|
name = "holos-security"
|
|
754
|
-
version = "0.26.
|
|
740
|
+
version = "0.26.2"
|
|
755
741
|
dependencies = [
|
|
756
742
|
"holos-core",
|
|
757
743
|
"holos-store",
|
|
@@ -761,7 +747,7 @@ dependencies = [
|
|
|
761
747
|
|
|
762
748
|
[[package]]
|
|
763
749
|
name = "holos-server"
|
|
764
|
-
version = "0.26.
|
|
750
|
+
version = "0.26.2"
|
|
765
751
|
dependencies = [
|
|
766
752
|
"anyhow",
|
|
767
753
|
"fs4",
|
|
@@ -781,7 +767,7 @@ dependencies = [
|
|
|
781
767
|
|
|
782
768
|
[[package]]
|
|
783
769
|
name = "holos-shacl"
|
|
784
|
-
version = "0.26.
|
|
770
|
+
version = "0.26.2"
|
|
785
771
|
dependencies = [
|
|
786
772
|
"holos-core",
|
|
787
773
|
"holos-shacl-engine",
|
|
@@ -796,7 +782,7 @@ dependencies = [
|
|
|
796
782
|
|
|
797
783
|
[[package]]
|
|
798
784
|
name = "holos-shacl-engine"
|
|
799
|
-
version = "0.26.
|
|
785
|
+
version = "0.26.2"
|
|
800
786
|
dependencies = [
|
|
801
787
|
"anyhow",
|
|
802
788
|
"flate2",
|
|
@@ -814,7 +800,7 @@ dependencies = [
|
|
|
814
800
|
|
|
815
801
|
[[package]]
|
|
816
802
|
name = "holos-stats"
|
|
817
|
-
version = "0.26.
|
|
803
|
+
version = "0.26.2"
|
|
818
804
|
dependencies = [
|
|
819
805
|
"holos-core",
|
|
820
806
|
"holos-engine",
|
|
@@ -829,7 +815,7 @@ dependencies = [
|
|
|
829
815
|
|
|
830
816
|
[[package]]
|
|
831
817
|
name = "holos-store"
|
|
832
|
-
version = "0.26.
|
|
818
|
+
version = "0.26.2"
|
|
833
819
|
dependencies = [
|
|
834
820
|
"holos-core",
|
|
835
821
|
"oxrdf",
|
|
@@ -841,7 +827,7 @@ dependencies = [
|
|
|
841
827
|
|
|
842
828
|
[[package]]
|
|
843
829
|
name = "holos-wasm"
|
|
844
|
-
version = "0.26.
|
|
830
|
+
version = "0.26.2"
|
|
845
831
|
dependencies = [
|
|
846
832
|
"console_error_panic_hook",
|
|
847
833
|
"getrandom 0.3.4",
|
|
@@ -1139,9 +1125,9 @@ checksum = "54b4ed3a7192fa19f5f48f99871f2755047fabefd7f222f12a1df1773796a102"
|
|
|
1139
1125
|
|
|
1140
1126
|
[[package]]
|
|
1141
1127
|
name = "oxjsonld"
|
|
1142
|
-
version = "0.2.
|
|
1128
|
+
version = "0.2.7"
|
|
1143
1129
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1144
|
-
checksum = "
|
|
1130
|
+
checksum = "f1554d73123a75723a4e0a4d400a3fb19ca09673563a2557090267729622fcb2"
|
|
1145
1131
|
dependencies = [
|
|
1146
1132
|
"json-event-parser",
|
|
1147
1133
|
"oxiri",
|
|
@@ -1152,9 +1138,9 @@ dependencies = [
|
|
|
1152
1138
|
|
|
1153
1139
|
[[package]]
|
|
1154
1140
|
name = "oxrdf"
|
|
1155
|
-
version = "0.3.
|
|
1141
|
+
version = "0.3.5"
|
|
1156
1142
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1157
|
-
checksum = "
|
|
1143
|
+
checksum = "08037a3c3cf580d065caec6a864cf97f51be219862d95c691a48c7543406d675"
|
|
1158
1144
|
dependencies = [
|
|
1159
1145
|
"hex",
|
|
1160
1146
|
"oxilangtag",
|
|
@@ -1167,9 +1153,9 @@ dependencies = [
|
|
|
1167
1153
|
|
|
1168
1154
|
[[package]]
|
|
1169
1155
|
name = "oxrdfio"
|
|
1170
|
-
version = "0.2.
|
|
1156
|
+
version = "0.2.7"
|
|
1171
1157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1172
|
-
checksum = "
|
|
1158
|
+
checksum = "e8e92599fc40510b01a1fa55548dffcc7160dde5cf1776e14b150a5cbcc607b4"
|
|
1173
1159
|
dependencies = [
|
|
1174
1160
|
"oxjsonld",
|
|
1175
1161
|
"oxrdf",
|
|
@@ -1180,9 +1166,9 @@ dependencies = [
|
|
|
1180
1166
|
|
|
1181
1167
|
[[package]]
|
|
1182
1168
|
name = "oxrdfxml"
|
|
1183
|
-
version = "0.2.
|
|
1169
|
+
version = "0.2.5"
|
|
1184
1170
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1185
|
-
checksum = "
|
|
1171
|
+
checksum = "b69a81d41e2ee7d0d296980e6e44d3d2282f558cd82a8b3b4988c2eb06a6e07d"
|
|
1186
1172
|
dependencies = [
|
|
1187
1173
|
"oxilangtag",
|
|
1188
1174
|
"oxiri",
|
|
@@ -1193,9 +1179,7 @@ dependencies = [
|
|
|
1193
1179
|
|
|
1194
1180
|
[[package]]
|
|
1195
1181
|
name = "oxsdatatypes"
|
|
1196
|
-
version = "0.2.
|
|
1197
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1198
|
-
checksum = "06fa874d87eae638daae9b4e3198864fe2cce68589f227c0b2cf5b62b1530516"
|
|
1182
|
+
version = "0.2.4"
|
|
1199
1183
|
dependencies = [
|
|
1200
1184
|
"js-sys",
|
|
1201
1185
|
"thiserror 2.0.20",
|
|
@@ -1203,9 +1187,9 @@ dependencies = [
|
|
|
1203
1187
|
|
|
1204
1188
|
[[package]]
|
|
1205
1189
|
name = "oxttl"
|
|
1206
|
-
version = "0.2.
|
|
1190
|
+
version = "0.2.5"
|
|
1207
1191
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1208
|
-
checksum = "
|
|
1192
|
+
checksum = "c2f5a5c0e82734bb66c9e2a82839bafca5cc129531c51b92f428a4f43405793d"
|
|
1209
1193
|
dependencies = [
|
|
1210
1194
|
"memchr",
|
|
1211
1195
|
"oxilangtag",
|
|
@@ -1764,9 +1748,9 @@ dependencies = [
|
|
|
1764
1748
|
|
|
1765
1749
|
[[package]]
|
|
1766
1750
|
name = "sparesults"
|
|
1767
|
-
version = "0.3.
|
|
1751
|
+
version = "0.3.5"
|
|
1768
1752
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1769
|
-
checksum = "
|
|
1753
|
+
checksum = "dd0fd25bd7e7eb2af56a45bc65ca768a246a50163db9215fc26da002135f6ece"
|
|
1770
1754
|
dependencies = [
|
|
1771
1755
|
"json-event-parser",
|
|
1772
1756
|
"memchr",
|
|
@@ -1777,9 +1761,9 @@ dependencies = [
|
|
|
1777
1761
|
|
|
1778
1762
|
[[package]]
|
|
1779
1763
|
name = "spareval"
|
|
1780
|
-
version = "0.2.
|
|
1764
|
+
version = "0.2.9"
|
|
1781
1765
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1782
|
-
checksum = "
|
|
1766
|
+
checksum = "072b1b44c9003e54a7b0817b65ce156d94ab46250dcefe0f24a9b3cc4020c1c6"
|
|
1783
1767
|
dependencies = [
|
|
1784
1768
|
"hex",
|
|
1785
1769
|
"json-event-parser",
|
|
@@ -1800,9 +1784,9 @@ dependencies = [
|
|
|
1800
1784
|
|
|
1801
1785
|
[[package]]
|
|
1802
1786
|
name = "spargebra"
|
|
1803
|
-
version = "0.4.
|
|
1787
|
+
version = "0.4.8"
|
|
1804
1788
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1805
|
-
checksum = "
|
|
1789
|
+
checksum = "43d5fd4ba16eea5586aa54227ca2c0a394794a0f82e39c6c98a57cc6877f0230"
|
|
1806
1790
|
dependencies = [
|
|
1807
1791
|
"oxilangtag",
|
|
1808
1792
|
"oxiri",
|
|
@@ -1814,21 +1798,21 @@ dependencies = [
|
|
|
1814
1798
|
|
|
1815
1799
|
[[package]]
|
|
1816
1800
|
name = "spargeo"
|
|
1817
|
-
version = "0.5.
|
|
1801
|
+
version = "0.5.7"
|
|
1818
1802
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1819
|
-
checksum = "
|
|
1803
|
+
checksum = "026b88556cb2409487de16fc9393b6bc071c637dcc9fc23b03a88f0415af25cd"
|
|
1820
1804
|
dependencies = [
|
|
1821
1805
|
"geo",
|
|
1822
|
-
"geojson
|
|
1806
|
+
"geojson",
|
|
1823
1807
|
"oxrdf",
|
|
1824
1808
|
"wkt",
|
|
1825
1809
|
]
|
|
1826
1810
|
|
|
1827
1811
|
[[package]]
|
|
1828
1812
|
name = "sparopt"
|
|
1829
|
-
version = "0.3.
|
|
1813
|
+
version = "0.3.9"
|
|
1830
1814
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1831
|
-
checksum = "
|
|
1815
|
+
checksum = "8c1d1327a49bef5f6f294a2ddcf01635c5449a0654e9a35d3f50d7a45e4ecc78"
|
|
1832
1816
|
dependencies = [
|
|
1833
1817
|
"oxrdf",
|
|
1834
1818
|
"rand",
|
|
@@ -1943,22 +1927,6 @@ dependencies = [
|
|
|
1943
1927
|
"log",
|
|
1944
1928
|
]
|
|
1945
1929
|
|
|
1946
|
-
[[package]]
|
|
1947
|
-
name = "tinyvec"
|
|
1948
|
-
version = "1.12.0"
|
|
1949
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1950
|
-
checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
|
|
1951
|
-
dependencies = [
|
|
1952
|
-
"serde_core",
|
|
1953
|
-
"tinyvec_macros",
|
|
1954
|
-
]
|
|
1955
|
-
|
|
1956
|
-
[[package]]
|
|
1957
|
-
name = "tinyvec_macros"
|
|
1958
|
-
version = "0.1.1"
|
|
1959
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1960
|
-
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
1961
|
-
|
|
1962
1930
|
[[package]]
|
|
1963
1931
|
name = "tokio"
|
|
1964
1932
|
version = "1.53.1"
|
|
@@ -3,7 +3,7 @@ resolver = "2"
|
|
|
3
3
|
members = ["crates/holos-core", "crates/holos-store", "crates/holos-security", "crates/holos-shacl", "crates/holos-shacl-engine", "crates/holos-stats", "crates/holos-engine", "crates/holos-python"]
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.26.
|
|
6
|
+
version = "0.26.2"
|
|
7
7
|
edition = "2021"
|
|
8
8
|
rust-version = "1.87"
|
|
9
9
|
license = "MIT OR Apache-2.0"
|
|
@@ -37,16 +37,16 @@ wkt = "0.14"
|
|
|
37
37
|
geojson = "0.24"
|
|
38
38
|
|
|
39
39
|
# --- internal
|
|
40
|
-
holos-build = { path = "crates/holos-build", version = "0.26.
|
|
41
|
-
holos-core = { path = "crates/holos-core", version = "0.26.
|
|
42
|
-
holos-store = { path = "crates/holos-store", version = "0.26.
|
|
43
|
-
holos-engine = { path = "crates/holos-engine", version = "0.26.
|
|
44
|
-
holos-security = { path = "crates/holos-security", version = "0.26.
|
|
45
|
-
holos-conformance = { path = "crates/holos-conformance", version = "0.26.
|
|
46
|
-
holos-shacl = { path = "crates/holos-shacl", version = "0.26.
|
|
47
|
-
holos-shacl-engine = { path = "crates/holos-shacl-engine", version = "0.26.
|
|
48
|
-
holos-holon = { path = "crates/holos-holon", version = "0.26.
|
|
49
|
-
holos-stats = { path = "crates/holos-stats", version = "0.26.
|
|
40
|
+
holos-build = { path = "crates/holos-build", version = "0.26.2" }
|
|
41
|
+
holos-core = { path = "crates/holos-core", version = "0.26.2" }
|
|
42
|
+
holos-store = { path = "crates/holos-store", version = "0.26.2" }
|
|
43
|
+
holos-engine = { path = "crates/holos-engine", version = "0.26.2" }
|
|
44
|
+
holos-security = { path = "crates/holos-security", version = "0.26.2" }
|
|
45
|
+
holos-conformance = { path = "crates/holos-conformance", version = "0.26.2" }
|
|
46
|
+
holos-shacl = { path = "crates/holos-shacl", version = "0.26.2" }
|
|
47
|
+
holos-shacl-engine = { path = "crates/holos-shacl-engine", version = "0.26.2" }
|
|
48
|
+
holos-holon = { path = "crates/holos-holon", version = "0.26.2" }
|
|
49
|
+
holos-stats = { path = "crates/holos-stats", version = "0.26.2" }
|
|
50
50
|
|
|
51
51
|
# --- everything else
|
|
52
52
|
anyhow = "1"
|
|
@@ -70,6 +70,13 @@ rocksdb = { version = "0.24", default-features = false, features = ["lz4", "bind
|
|
|
70
70
|
tempfile = "3"
|
|
71
71
|
proptest = "1"
|
|
72
72
|
|
|
73
|
+
# oxsdatatypes 0.2.4 with decimal multiplication and division that round to 18 fractional
|
|
74
|
+
# digits instead of failing. Upstream refuses any product it cannot hold exactly, so
|
|
75
|
+
# `1.3 * 31.583333333333333333` was an error and left its variable unbound. spareval and
|
|
76
|
+
# every crate here resolve it through this patch: see vendor/oxsdatatypes/PROVENANCE.md.
|
|
77
|
+
[patch.crates-io]
|
|
78
|
+
oxsdatatypes = { path = "vendor/oxsdatatypes" }
|
|
79
|
+
|
|
73
80
|
[profile.release]
|
|
74
81
|
lto = "thin"
|
|
75
82
|
codegen-units = 1
|
|
@@ -100,6 +100,16 @@ pub fn materialised(
|
|
|
100
100
|
let Some((inner, keyless)) = group_input(pattern) else {
|
|
101
101
|
return Ok(None);
|
|
102
102
|
};
|
|
103
|
+
// One triple pattern is one index scan whoever evaluates it, and the evaluator's
|
|
104
|
+
// `COUNT` streams that scan with a counter. Building the table first only adds the cost
|
|
105
|
+
// of turning every row into terms the evaluator then reads back: on 800k triples,
|
|
106
|
+
// counting the 50,000 that match one pattern went from 7-15 ms to 87 ms when this took
|
|
107
|
+
// it. What this buys is a better join, so with nothing to join it declines. A filter
|
|
108
|
+
// over one pattern is not declined: the bind join can use a filter's constant as an
|
|
109
|
+
// index binding, which the evaluator cannot.
|
|
110
|
+
if is_one_scan(inner) {
|
|
111
|
+
return Ok(None);
|
|
112
|
+
}
|
|
103
113
|
// An input estimated over the budget would be built only to be thrown away — and a
|
|
104
114
|
// `COUNT(*)` over it streams through the evaluator in constant memory, so building it is
|
|
105
115
|
// the one thing that could make such a query fail.
|
|
@@ -173,6 +183,16 @@ pub fn materialised(
|
|
|
173
183
|
)))
|
|
174
184
|
}
|
|
175
185
|
|
|
186
|
+
/// Whether a group's input is a single triple pattern, in a graph or not: one index scan,
|
|
187
|
+
/// with no join for the bind join to order.
|
|
188
|
+
fn is_one_scan(pattern: &GraphPattern) -> bool {
|
|
189
|
+
match pattern {
|
|
190
|
+
GraphPattern::Bgp { patterns } => patterns.len() == 1,
|
|
191
|
+
GraphPattern::Graph { inner, .. } => is_one_scan(inner),
|
|
192
|
+
_ => false,
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
176
196
|
/// The input of the query's own group — the first `Group` reached from the top through the
|
|
177
197
|
/// operators that sit above one in a query's algebra — and whether that group has no keys.
|
|
178
198
|
fn group_input(pattern: &GraphPattern) -> Option<(&GraphPattern, bool)> {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//! Arithmetic that HOLOS 0.26.1 answered wrongly, and that `spargebra` 0.4.8 and
|
|
2
|
+
//! `oxsdatatypes` 0.2.4 answer correctly.
|
|
3
|
+
//!
|
|
4
|
+
//! `spargebra` 0.4.6 grouped a chain of `-` or `/` from the right, so `10 - 2 - 3` was
|
|
5
|
+
//! `10 - (2 - 3)`, 11, and `24 / 4 / 2` was 12; and a signed literal after an operand could
|
|
6
|
+
//! take the operator before it, so `1 -2*3 -4` was -1 (oxigraph/oxigraph#1970, #1974).
|
|
7
|
+
//! `oxsdatatypes` 0.2.2 cut a decimal to one fractional digit before rounding it, so
|
|
8
|
+
//! `ROUND(-2.5001)` was -2, and rounded a double half away from zero, so `ROUND(-2.5e0)` was
|
|
9
|
+
//! -3. All of these are wrong numbers, not errors. Every value quoted here is what 0.26.1
|
|
10
|
+
//! returned; these tests pin the answers through the evaluator HOLOS runs.
|
|
11
|
+
|
|
12
|
+
use holos_engine::Engine;
|
|
13
|
+
use holos_security::Session;
|
|
14
|
+
use oxrdfio::RdfFormat;
|
|
15
|
+
use spareval::QueryResults;
|
|
16
|
+
|
|
17
|
+
const XSD: &str = "http://www.w3.org/2001/XMLSchema#";
|
|
18
|
+
|
|
19
|
+
fn value(expression: &str) -> String {
|
|
20
|
+
let mut e = Engine::new();
|
|
21
|
+
e.bulk_load(&b""[..], RdfFormat::Turtle, None)
|
|
22
|
+
.expect("load");
|
|
23
|
+
let session = Session::unrestricted(e.store()).expect("session");
|
|
24
|
+
let view = e.view(&session);
|
|
25
|
+
let query = format!("PREFIX xsd: <{XSD}> SELECT ({expression} AS ?x) WHERE {{}}");
|
|
26
|
+
let results = Engine::query(&view, &query, None).expect("query");
|
|
27
|
+
let QueryResults::Solutions(mut iter) = results else {
|
|
28
|
+
panic!("expected a solutions result");
|
|
29
|
+
};
|
|
30
|
+
let solution = iter.next().expect("one row").expect("solution");
|
|
31
|
+
solution
|
|
32
|
+
.get("x")
|
|
33
|
+
.map_or_else(String::new, ToString::to_string)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
fn typed(lexical: &str, datatype: &str) -> String {
|
|
37
|
+
format!("\"{lexical}\"^^<{XSD}{datatype}>")
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#[test]
|
|
41
|
+
fn a_chain_of_minus_or_divide_groups_from_the_left() {
|
|
42
|
+
assert_eq!(value("10 - 2 - 3"), typed("5", "integer"));
|
|
43
|
+
assert_eq!(value("10 - 2 + 3"), typed("11", "integer"));
|
|
44
|
+
assert_eq!(value("24 / 4 / 2"), typed("3", "decimal"));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#[test]
|
|
48
|
+
fn a_signed_literal_after_an_operand_does_not_take_the_operator_before_it() {
|
|
49
|
+
// `10 - 2 -3` has no space between `-` and `3`, so the lexer reads `-3` as a literal.
|
|
50
|
+
assert_eq!(value("10 - 2 -3"), typed("5", "integer"));
|
|
51
|
+
assert_eq!(value("1 -2*3 -4"), typed("-9", "integer"));
|
|
52
|
+
assert_eq!(value("10 - 2 -3*2"), typed("2", "integer"));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#[test]
|
|
56
|
+
fn round_takes_a_half_towards_positive_infinity() {
|
|
57
|
+
// fn:round: "the one that is closest to positive infinity" when two are equally near.
|
|
58
|
+
assert_eq!(value("ROUND(-2.5)"), typed("-2", "decimal"));
|
|
59
|
+
assert_eq!(value("ROUND(-2.5001)"), typed("-3", "decimal"));
|
|
60
|
+
assert_eq!(value("ROUND(-2.5e0)"), typed("-2", "double"));
|
|
61
|
+
assert_eq!(value("ROUND(-1.5e0)"), typed("-1", "double"));
|
|
62
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
//! `xsd:decimal` arithmetic rounds to 18 fractional digits instead of failing.
|
|
2
|
+
//!
|
|
3
|
+
//! A decimal is held to 18 fractional digits, so a product of two of them can need 36. The
|
|
4
|
+
//! registry `oxsdatatypes` returned an error for any product it could not hold exactly, and
|
|
5
|
+
//! an error in `BIND` or a projection leaves the variable unbound: `1.3 * 31.583333333333333333`
|
|
6
|
+
//! had no value while `2 * 31.583333333333333333` did. Division failed the same way once the
|
|
7
|
+
//! dividend was large. XPath F&O §4.2 has an over-long decimal result "truncated or rounded in
|
|
8
|
+
//! an implementation-defined manner", and keeps FOAR0002 for overflow; the patched copy in
|
|
9
|
+
//! `vendor/oxsdatatypes` rounds half to even. These tests are the end-to-end half of that:
|
|
10
|
+
//! the evaluator HOLOS actually runs, reading its values from a query and from the store.
|
|
11
|
+
|
|
12
|
+
use holos_engine::Engine;
|
|
13
|
+
use holos_security::Session;
|
|
14
|
+
use oxrdfio::RdfFormat;
|
|
15
|
+
use spareval::QueryResults;
|
|
16
|
+
|
|
17
|
+
const DATA: &str = r"
|
|
18
|
+
@prefix ex: <http://example.com/> .
|
|
19
|
+
ex:order ex:quantity 1.3 ; ex:rate 31.583333333333333333 .
|
|
20
|
+
ex:a ex:n 1 . ex:b ex:n 2 . ex:c ex:n 2 .
|
|
21
|
+
";
|
|
22
|
+
|
|
23
|
+
const XSD_DECIMAL: &str = "http://www.w3.org/2001/XMLSchema#decimal";
|
|
24
|
+
|
|
25
|
+
fn rows(query: &str) -> Vec<String> {
|
|
26
|
+
let mut e = Engine::new();
|
|
27
|
+
e.bulk_load(DATA.as_bytes(), RdfFormat::Turtle, None)
|
|
28
|
+
.expect("load");
|
|
29
|
+
let session = Session::unrestricted(e.store()).expect("session");
|
|
30
|
+
let view = e.view(&session);
|
|
31
|
+
let results = Engine::query(&view, query, None).expect("query");
|
|
32
|
+
let QueryResults::Solutions(iter) = results else {
|
|
33
|
+
panic!("expected a solutions result");
|
|
34
|
+
};
|
|
35
|
+
iter.map(|s| {
|
|
36
|
+
s.expect("solution")
|
|
37
|
+
.iter()
|
|
38
|
+
.map(|(v, t)| format!("{}={t}", v.as_str()))
|
|
39
|
+
.collect::<Vec<_>>()
|
|
40
|
+
.join(" ")
|
|
41
|
+
})
|
|
42
|
+
.collect()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
fn decimal(name: &str, lexical: &str) -> String {
|
|
46
|
+
format!("{name}=\"{lexical}\"^^<{XSD_DECIMAL}>")
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#[test]
|
|
50
|
+
fn a_product_with_more_than_18_fractional_digits_is_rounded() {
|
|
51
|
+
// The reported case: the exact product is 41.0583333333333333329.
|
|
52
|
+
assert_eq!(
|
|
53
|
+
rows("SELECT ?x WHERE { BIND(1.3 * 31.583333333333333333 AS ?x) }"),
|
|
54
|
+
[decimal("x", "41.058333333333333333")]
|
|
55
|
+
);
|
|
56
|
+
// And the one that already worked is unchanged.
|
|
57
|
+
assert_eq!(
|
|
58
|
+
rows("SELECT ?x WHERE { BIND(2 * 31.583333333333333333 AS ?x) }"),
|
|
59
|
+
[decimal("x", "63.166666666666666666")]
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#[test]
|
|
64
|
+
fn a_product_of_stored_values_is_rounded() {
|
|
65
|
+
assert_eq!(
|
|
66
|
+
rows(
|
|
67
|
+
"PREFIX ex: <http://example.com/>
|
|
68
|
+
SELECT ?x WHERE { ex:order ex:quantity ?q ; ex:rate ?r BIND(?q * ?r AS ?x) }"
|
|
69
|
+
),
|
|
70
|
+
[decimal("x", "41.058333333333333333")]
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#[test]
|
|
75
|
+
fn a_quotient_with_a_large_dividend_is_rounded() {
|
|
76
|
+
assert_eq!(
|
|
77
|
+
rows("SELECT ?x WHERE { BIND(1000 / 31.583333333333333333 AS ?x) }"),
|
|
78
|
+
[decimal("x", "31.662269129287598945")]
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#[test]
|
|
83
|
+
fn an_inexact_quotient_rounds_half_to_even() {
|
|
84
|
+
// Truncated before: 0.666666666666666666.
|
|
85
|
+
assert_eq!(
|
|
86
|
+
rows("SELECT ?x WHERE { BIND(2 / 3 AS ?x) }"),
|
|
87
|
+
[decimal("x", "0.666666666666666667")]
|
|
88
|
+
);
|
|
89
|
+
// AVG is a sum divided by a count, so it follows.
|
|
90
|
+
assert_eq!(
|
|
91
|
+
rows("PREFIX ex: <http://example.com/> SELECT (AVG(?n) AS ?x) WHERE { ?s ex:n ?n }"),
|
|
92
|
+
[decimal("x", "1.666666666666666667")]
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
#[test]
|
|
97
|
+
fn overflow_is_still_an_error() {
|
|
98
|
+
// 10^21 is past the largest decimal, about 1.7 · 10^20.
|
|
99
|
+
assert_eq!(
|
|
100
|
+
rows("SELECT ?x WHERE { BIND(100000000000.0 * 10000000000.0 AS ?x) }"),
|
|
101
|
+
[""]
|
|
102
|
+
);
|
|
103
|
+
assert_eq!(rows("SELECT ?x WHERE { BIND(1.0 / 0.0 AS ?x) }"), [""]);
|
|
104
|
+
}
|
|
@@ -190,12 +190,37 @@ fn one_group_without_group_by() {
|
|
|
190
190
|
|
|
191
191
|
#[test]
|
|
192
192
|
fn an_empty_input_still_counts_zero() {
|
|
193
|
-
|
|
193
|
+
// Two patterns, so the input goes to the bind join; one is left to the evaluator below.
|
|
194
|
+
let body = "SELECT (COUNT(*) AS ?n) WHERE { ?p ex:dept ex:nowhere ; ex:name ?name }";
|
|
194
195
|
assert!(materialised(body), "answered without the evaluator's scan");
|
|
195
196
|
let rows = agreed(body);
|
|
196
197
|
assert_eq!(rows.len(), 1, "{rows:?}");
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
#[test]
|
|
201
|
+
fn one_triple_pattern_is_left_to_the_evaluator() {
|
|
202
|
+
// One index scan either way, and the evaluator counts it as it streams; a table built
|
|
203
|
+
// first only adds the cost of every row. Empty, it still counts zero.
|
|
204
|
+
for body in [
|
|
205
|
+
"SELECT (COUNT(*) AS ?n) WHERE { ?p ex:dept ?d }",
|
|
206
|
+
"SELECT ?d (COUNT(*) AS ?n) WHERE { ?p ex:dept ?d } GROUP BY ?d",
|
|
207
|
+
"SELECT (COUNT(*) AS ?n) WHERE { GRAPH ?g { ?p ex:dept ?d } }",
|
|
208
|
+
"SELECT (COUNT(*) AS ?n) WHERE { ?p ex:dept ex:nowhere }",
|
|
209
|
+
] {
|
|
210
|
+
assert!(!materialised(body), "{body}");
|
|
211
|
+
agreed(body);
|
|
212
|
+
}
|
|
213
|
+
assert_eq!(
|
|
214
|
+
agreed("SELECT (COUNT(*) AS ?n) WHERE { ?p ex:dept ex:nowhere }").len(),
|
|
215
|
+
1
|
|
216
|
+
);
|
|
217
|
+
// A filter over the one pattern is still taken: its constant is an index binding to
|
|
218
|
+
// the bind join, and the evaluator would scan the predicate and filter every row.
|
|
219
|
+
assert!(materialised(
|
|
220
|
+
"SELECT (COUNT(*) AS ?n) WHERE { ?p ex:dept ?d FILTER(?d = ex:c) }"
|
|
221
|
+
));
|
|
222
|
+
}
|
|
223
|
+
|
|
199
224
|
#[test]
|
|
200
225
|
fn an_empty_input_with_a_key_is_no_groups() {
|
|
201
226
|
let body =
|