holosdb 0.26.2__tar.gz → 0.26.4__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.
Files changed (154) hide show
  1. {holosdb-0.26.2 → holosdb-0.26.4}/Cargo.lock +24 -26
  2. {holosdb-0.26.2 → holosdb-0.26.4}/Cargo.toml +28 -14
  3. {holosdb-0.26.2 → holosdb-0.26.4}/PKG-INFO +1 -1
  4. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/examples/surface.rs +92 -2
  5. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/topk.rs +22 -6
  6. holosdb-0.26.4/crates/holos-engine/tests/calendar.rs +161 -0
  7. holosdb-0.26.4/crates/holos-engine/tests/date_arithmetic.rs +160 -0
  8. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-python/tests/test_holosdb.py +42 -0
  9. holosdb-0.26.4/crates/holos-shacl/tests/date_constraint.rs +59 -0
  10. {holosdb-0.26.2 → holosdb-0.26.4}/README.md +0 -0
  11. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-core/Cargo.toml +0 -0
  12. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-core/src/inline.rs +0 -0
  13. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-core/src/lib.rs +0 -0
  14. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-core/src/term_id.rs +0 -0
  15. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-core/src/vocab.rs +0 -0
  16. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-core/tests/codec_properties.rs +0 -0
  17. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/Cargo.toml +0 -0
  18. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/examples/algdump.rs +0 -0
  19. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/examples/pp.rs +0 -0
  20. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/admit.rs +0 -0
  21. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/bindjoin.rs +0 -0
  22. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/boundjoin.rs +0 -0
  23. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/crs.rs +0 -0
  24. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/distinct.rs +0 -0
  25. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/dump.rs +0 -0
  26. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/entailment.rs +0 -0
  27. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/equality.rs +0 -0
  28. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/functions.rs +0 -0
  29. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/geo_ext.rs +0 -0
  30. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/group.rs +0 -0
  31. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/lib.rs +0 -0
  32. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/memory.rs +0 -0
  33. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/options.rs +0 -0
  34. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/range.rs +0 -0
  35. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/reach.rs +0 -0
  36. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/rules.rs +0 -0
  37. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/service.rs +0 -0
  38. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/source.rs +0 -0
  39. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/spatial.rs +0 -0
  40. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/spill.rs +0 -0
  41. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/topology.rs +0 -0
  42. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/update.rs +0 -0
  43. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/validate.rs +0 -0
  44. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/src/view.rs +0 -0
  45. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/admit.rs +0 -0
  46. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/arithmetic.rs +0 -0
  47. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bindjoin.rs +0 -0
  48. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bindjoin_graph.rs +0 -0
  49. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bindjoin_minus.rs +0 -0
  50. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bindjoin_optional.rs +0 -0
  51. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bindjoin_range.rs +0 -0
  52. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bindjoin_subquery.rs +0 -0
  53. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/boundjoin.rs +0 -0
  54. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/bulk_load.rs +0 -0
  55. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/closure_paths.rs +0 -0
  56. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/decimal.rs +0 -0
  57. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/distinct.rs +0 -0
  58. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/entailment.rs +0 -0
  59. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/equality.rs +0 -0
  60. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/geo_crs.rs +0 -0
  61. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/geosparql.rs +0 -0
  62. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/group.rs +0 -0
  63. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/gzip.rs +0 -0
  64. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/nested_filter_scope.rs +0 -0
  65. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/options.rs +0 -0
  66. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/range_policy.rs +0 -0
  67. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/range_soundness.rs +0 -0
  68. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/sort_spill.rs +0 -0
  69. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/spatial.rs +0 -0
  70. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/spill.rs +0 -0
  71. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/spill_leak.rs +0 -0
  72. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/transient_graph.rs +0 -0
  73. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/update.rs +0 -0
  74. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-engine/tests/update_atomicity.rs +0 -0
  75. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-python/Cargo.toml +0 -0
  76. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-python/PACKAGING.md +0 -0
  77. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-python/README.md +0 -0
  78. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-python/src/lib.rs +0 -0
  79. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-security/Cargo.toml +0 -0
  80. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-security/src/audit.rs +0 -0
  81. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-security/src/lib.rs +0 -0
  82. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-security/src/policy.rs +0 -0
  83. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-security/src/principal.rs +0 -0
  84. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/Cargo.toml +0 -0
  85. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/examples/bridge_vs_load.rs +0 -0
  86. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/examples/incremental.rs +0 -0
  87. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/access.rs +0 -0
  88. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/bridge.rs +0 -0
  89. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/engine.rs +0 -0
  90. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/incremental.rs +0 -0
  91. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/ir.rs +0 -0
  92. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/lib.rs +0 -0
  93. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/report.rs +0 -0
  94. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/validate.rs +0 -0
  95. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/src/vocab.rs +0 -0
  96. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/tests/decimal_message.rs +0 -0
  97. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/tests/engine_delta.rs +0 -0
  98. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/tests/engine_revalidate.rs +0 -0
  99. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/tests/fails_closed.rs +0 -0
  100. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl/tests/incremental_is_safe.rs +0 -0
  101. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/Cargo.toml +0 -0
  102. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/LICENSE-APACHE +0 -0
  103. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/LICENSE-MIT +0 -0
  104. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/PROVENANCE.md +0 -0
  105. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/datatypes.rs +0 -0
  106. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/error.rs +0 -0
  107. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/inference.rs +0 -0
  108. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/lib.rs +0 -0
  109. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/model/graph.rs +0 -0
  110. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/model/interner.rs +0 -0
  111. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/model/loader.rs +0 -0
  112. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/model/mod.rs +0 -0
  113. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/model/term.rs +0 -0
  114. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/model/vocab.rs +0 -0
  115. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/nodeexpr.rs +0 -0
  116. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/path.rs +0 -0
  117. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/report.rs +0 -0
  118. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/rules.rs +0 -0
  119. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/shapes.rs +0 -0
  120. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/sparql.rs +0 -0
  121. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/validate.rs +0 -0
  122. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-shacl-engine/src/valueset.rs +0 -0
  123. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/Cargo.toml +0 -0
  124. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/examples/does_order_matter.rs +0 -0
  125. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/examples/estimator_accuracy.rs +0 -0
  126. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/src/baseline.rs +0 -0
  127. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/src/characteristic.rs +0 -0
  128. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/src/hll.rs +0 -0
  129. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/src/lib.rs +0 -0
  130. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-stats/src/reorder.rs +0 -0
  131. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/Cargo.toml +0 -0
  132. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/dictionary.rs +0 -0
  133. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/error.rs +0 -0
  134. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/index.rs +0 -0
  135. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/lib.rs +0 -0
  136. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/memory.rs +0 -0
  137. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/rocks/codec.rs +0 -0
  138. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/rocks/dictsort.rs +0 -0
  139. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/rocks/mod.rs +0 -0
  140. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/rocks/seen.rs +0 -0
  141. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/rocks/sort.rs +0 -0
  142. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/src/storage.rs +0 -0
  143. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/backend_parity.rs +0 -0
  144. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/bulk_ingest.rs +0 -0
  145. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/checkpoint.rs +0 -0
  146. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/commit_scope.rs +0 -0
  147. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/compaction.rs +0 -0
  148. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/dict_ingest.rs +0 -0
  149. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/generation.rs +0 -0
  150. {holosdb-0.26.2 → holosdb-0.26.4}/crates/holos-store/tests/range_scan.rs +0 -0
  151. {holosdb-0.26.2 → holosdb-0.26.4}/pyproject.toml +0 -0
  152. {holosdb-0.26.2 → holosdb-0.26.4}/python/holosdb/__init__.py +0 -0
  153. {holosdb-0.26.2 → holosdb-0.26.4}/python/holosdb/_holosdb.pyi +0 -0
  154. {holosdb-0.26.2 → holosdb-0.26.4}/python/holosdb/py.typed +0 -0
@@ -601,7 +601,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
601
601
 
602
602
  [[package]]
603
603
  name = "holos-bench"
604
- version = "0.26.2"
604
+ version = "0.26.4"
605
605
  dependencies = [
606
606
  "anyhow",
607
607
  "geo",
@@ -621,11 +621,11 @@ dependencies = [
621
621
 
622
622
  [[package]]
623
623
  name = "holos-build"
624
- version = "0.26.2"
624
+ version = "0.26.4"
625
625
 
626
626
  [[package]]
627
627
  name = "holos-cli"
628
- version = "0.26.2"
628
+ version = "0.26.4"
629
629
  dependencies = [
630
630
  "anyhow",
631
631
  "fs4",
@@ -645,7 +645,7 @@ dependencies = [
645
645
 
646
646
  [[package]]
647
647
  name = "holos-conformance"
648
- version = "0.26.2"
648
+ version = "0.26.4"
649
649
  dependencies = [
650
650
  "anyhow",
651
651
  "holos-core",
@@ -664,7 +664,7 @@ dependencies = [
664
664
 
665
665
  [[package]]
666
666
  name = "holos-core"
667
- version = "0.26.2"
667
+ version = "0.26.4"
668
668
  dependencies = [
669
669
  "oxrdf",
670
670
  "oxsdatatypes",
@@ -674,7 +674,7 @@ dependencies = [
674
674
 
675
675
  [[package]]
676
676
  name = "holos-engine"
677
- version = "0.26.2"
677
+ version = "0.26.4"
678
678
  dependencies = [
679
679
  "flate2",
680
680
  "geo",
@@ -703,7 +703,7 @@ dependencies = [
703
703
 
704
704
  [[package]]
705
705
  name = "holos-holon"
706
- version = "0.26.2"
706
+ version = "0.26.4"
707
707
  dependencies = [
708
708
  "holos-core",
709
709
  "holos-engine",
@@ -719,7 +719,7 @@ dependencies = [
719
719
 
720
720
  [[package]]
721
721
  name = "holos-python"
722
- version = "0.26.2"
722
+ version = "0.26.4"
723
723
  dependencies = [
724
724
  "holos-core",
725
725
  "holos-engine",
@@ -737,7 +737,7 @@ dependencies = [
737
737
 
738
738
  [[package]]
739
739
  name = "holos-security"
740
- version = "0.26.2"
740
+ version = "0.26.4"
741
741
  dependencies = [
742
742
  "holos-core",
743
743
  "holos-store",
@@ -747,7 +747,7 @@ dependencies = [
747
747
 
748
748
  [[package]]
749
749
  name = "holos-server"
750
- version = "0.26.2"
750
+ version = "0.26.4"
751
751
  dependencies = [
752
752
  "anyhow",
753
753
  "fs4",
@@ -767,7 +767,7 @@ dependencies = [
767
767
 
768
768
  [[package]]
769
769
  name = "holos-shacl"
770
- version = "0.26.2"
770
+ version = "0.26.4"
771
771
  dependencies = [
772
772
  "holos-core",
773
773
  "holos-shacl-engine",
@@ -782,7 +782,7 @@ dependencies = [
782
782
 
783
783
  [[package]]
784
784
  name = "holos-shacl-engine"
785
- version = "0.26.2"
785
+ version = "0.26.4"
786
786
  dependencies = [
787
787
  "anyhow",
788
788
  "flate2",
@@ -800,7 +800,7 @@ dependencies = [
800
800
 
801
801
  [[package]]
802
802
  name = "holos-stats"
803
- version = "0.26.2"
803
+ version = "0.26.4"
804
804
  dependencies = [
805
805
  "holos-core",
806
806
  "holos-engine",
@@ -815,7 +815,7 @@ dependencies = [
815
815
 
816
816
  [[package]]
817
817
  name = "holos-store"
818
- version = "0.26.2"
818
+ version = "0.26.4"
819
819
  dependencies = [
820
820
  "holos-core",
821
821
  "oxrdf",
@@ -827,7 +827,7 @@ dependencies = [
827
827
 
828
828
  [[package]]
829
829
  name = "holos-wasm"
830
- version = "0.26.2"
830
+ version = "0.26.4"
831
831
  dependencies = [
832
832
  "console_error_panic_hook",
833
833
  "getrandom 0.3.4",
@@ -1133,7 +1133,7 @@ dependencies = [
1133
1133
  "oxiri",
1134
1134
  "oxrdf",
1135
1135
  "ryu-js",
1136
- "thiserror 2.0.20",
1136
+ "thiserror 1.0.69",
1137
1137
  ]
1138
1138
 
1139
1139
  [[package]]
@@ -1148,7 +1148,7 @@ dependencies = [
1148
1148
  "oxsdatatypes",
1149
1149
  "rand",
1150
1150
  "sha2",
1151
- "thiserror 2.0.20",
1151
+ "thiserror 1.0.69",
1152
1152
  ]
1153
1153
 
1154
1154
  [[package]]
@@ -1161,7 +1161,7 @@ dependencies = [
1161
1161
  "oxrdf",
1162
1162
  "oxrdfxml",
1163
1163
  "oxttl",
1164
- "thiserror 2.0.20",
1164
+ "thiserror 1.0.69",
1165
1165
  ]
1166
1166
 
1167
1167
  [[package]]
@@ -1174,7 +1174,7 @@ dependencies = [
1174
1174
  "oxiri",
1175
1175
  "oxrdf",
1176
1176
  "quick-xml",
1177
- "thiserror 2.0.20",
1177
+ "thiserror 1.0.69",
1178
1178
  ]
1179
1179
 
1180
1180
  [[package]]
@@ -1182,7 +1182,7 @@ name = "oxsdatatypes"
1182
1182
  version = "0.2.4"
1183
1183
  dependencies = [
1184
1184
  "js-sys",
1185
- "thiserror 2.0.20",
1185
+ "thiserror 1.0.69",
1186
1186
  ]
1187
1187
 
1188
1188
  [[package]]
@@ -1195,7 +1195,7 @@ dependencies = [
1195
1195
  "oxilangtag",
1196
1196
  "oxiri",
1197
1197
  "oxrdf",
1198
- "thiserror 2.0.20",
1198
+ "thiserror 1.0.69",
1199
1199
  ]
1200
1200
 
1201
1201
  [[package]]
@@ -1756,14 +1756,12 @@ dependencies = [
1756
1756
  "memchr",
1757
1757
  "oxrdf",
1758
1758
  "quick-xml",
1759
- "thiserror 2.0.20",
1759
+ "thiserror 1.0.69",
1760
1760
  ]
1761
1761
 
1762
1762
  [[package]]
1763
1763
  name = "spareval"
1764
1764
  version = "0.2.9"
1765
- source = "registry+https://github.com/rust-lang/crates.io-index"
1766
- checksum = "072b1b44c9003e54a7b0817b65ce156d94ab46250dcefe0f24a9b3cc4020c1c6"
1767
1765
  dependencies = [
1768
1766
  "hex",
1769
1767
  "json-event-parser",
@@ -1779,7 +1777,7 @@ dependencies = [
1779
1777
  "sparesults",
1780
1778
  "spargebra",
1781
1779
  "sparopt",
1782
- "thiserror 2.0.20",
1780
+ "thiserror 1.0.69",
1783
1781
  ]
1784
1782
 
1785
1783
  [[package]]
@@ -1793,7 +1791,7 @@ dependencies = [
1793
1791
  "oxrdf",
1794
1792
  "peg",
1795
1793
  "rand",
1796
- "thiserror 2.0.20",
1794
+ "thiserror 1.0.69",
1797
1795
  ]
1798
1796
 
1799
1797
  [[package]]
@@ -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.2"
6
+ version = "0.26.4"
7
7
  edition = "2021"
8
8
  rust-version = "1.87"
9
9
  license = "MIT OR Apache-2.0"
@@ -19,11 +19,20 @@ oxrdf = { version = "0.3", features = ["rdf-12", "oxsdatatypes", "rdfc-10"] }
19
19
  oxrdfio = { version = "0.2", features = ["rdf-12"] }
20
20
  oxsdatatypes = "0.2"
21
21
  sparesults = { version = "0.3", features = ["sparql-12"] }
22
- spargebra = { version = "0.4", features = ["sparql-12"] }
23
- spareval = { version = "0.2", features = ["sparql-12"] }
22
+ # `sep-0002` gives xsd:date, xsd:time and the three duration types values, so that they
23
+ # compare (`?d < "2024-11-04"^^xsd:date`), sort by value and take part in date and duration
24
+ # arithmetic, and adds ADJUST. Without it the evaluator treats them as opaque typed literals:
25
+ # `<` between two dates is an error, a FILTER using it drops every row, and only dateTime
26
+ # compares. SEP-0002 is the SPARQL 1.2 community proposal for exactly these operators,
27
+ # following XPath's; Oxigraph keeps it behind a feature. Oxigraph's further `calendar-ext`
28
+ # (an order on gYear and the other Gregorian types, which XPath defines equality for but no
29
+ # order) is deliberately not enabled. All three crates take the feature so the parser, the
30
+ # optimiser and the evaluator agree.
31
+ spargebra = { version = "0.4", features = ["sparql-12", "sep-0002"] }
32
+ spareval = { version = "0.2", features = ["sparql-12", "sep-0002"] }
24
33
  # Only for `sparopt::algebra::Expression`, which is what `spareval`'s public expression
25
34
  # evaluator takes. Same version `spareval` itself resolves, so the types match.
26
- sparopt = "0.3"
35
+ sparopt = { version = "0.3", features = ["sep-0002"] }
27
36
  # GeoSPARQL function library, from the Oxigraph family. Same reuse argument as the
28
37
  # rest of L0: 43 conformance-heavy geometry functions nobody should rewrite.
29
38
  spargeo = "0.5"
@@ -37,16 +46,16 @@ wkt = "0.14"
37
46
  geojson = "0.24"
38
47
 
39
48
  # --- internal
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" }
49
+ holos-build = { path = "crates/holos-build", version = "0.26.4" }
50
+ holos-core = { path = "crates/holos-core", version = "0.26.4" }
51
+ holos-store = { path = "crates/holos-store", version = "0.26.4" }
52
+ holos-engine = { path = "crates/holos-engine", version = "0.26.4" }
53
+ holos-security = { path = "crates/holos-security", version = "0.26.4" }
54
+ holos-conformance = { path = "crates/holos-conformance", version = "0.26.4" }
55
+ holos-shacl = { path = "crates/holos-shacl", version = "0.26.4" }
56
+ holos-shacl-engine = { path = "crates/holos-shacl-engine", version = "0.26.4" }
57
+ holos-holon = { path = "crates/holos-holon", version = "0.26.4" }
58
+ holos-stats = { path = "crates/holos-stats", version = "0.26.4" }
50
59
 
51
60
  # --- everything else
52
61
  anyhow = "1"
@@ -76,6 +85,11 @@ proptest = "1"
76
85
  # every crate here resolve it through this patch: see vendor/oxsdatatypes/PROVENANCE.md.
77
86
  [patch.crates-io]
78
87
  oxsdatatypes = { path = "vendor/oxsdatatypes" }
88
+ # spareval 0.2.9 with `+` accepting a duration on either side of a date, time or dateTime,
89
+ # as XPath's operator mapping does. Upstream takes only the temporal value first, and
90
+ # sparopt reorders the operands of every `+` by hash, so `?dateTime + "P2Y"^^xsd:yearMonthDuration`
91
+ # came out unbound for some values: see vendor/spareval/PROVENANCE.md.
92
+ spareval = { path = "vendor/spareval" }
79
93
 
80
94
  [profile.release]
81
95
  lto = "thin"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: holosdb
3
- Version: 0.26.2
3
+ Version: 0.26.4
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Programming Language :: Rust
@@ -180,6 +180,13 @@ fn expr(e: &str) -> String {
180
180
  format!("{} SELECT ({e} AS ?v) WHERE {{}}", prefixes())
181
181
  }
182
182
 
183
+ /// `SELECT * WHERE { FILTER(cond) }` — one row if `cond` is true, none if it is false or an
184
+ /// error. For operators, whose failure is an error inside the expression rather than a
185
+ /// query that will not run.
186
+ fn holds(cond: &str) -> String {
187
+ format!("{} SELECT * WHERE {{ FILTER({cond}) }}", prefixes())
188
+ }
189
+
183
190
  /// A probe that needs data under it.
184
191
  fn over_data(body: &str) -> String {
185
192
  format!("{} SELECT * WHERE {{ {body} }}", prefixes())
@@ -319,6 +326,67 @@ fn datetime_functions() -> Vec<Probe> {
319
326
  p("seconds", "17.4.5.7", expr("seconds(now())"), ""),
320
327
  p("timezone", "17.4.5.8", expr("STR(timezone(now()))"), ""),
321
328
  p("tz", "17.4.5.9", expr("tz(now())"), ""),
329
+ // An expression that errors leaves `?v` unbound and the row still there, so these
330
+ // are FILTERs: unsupported means no row, which `section` reports as a failure.
331
+ p(
332
+ "year on xsd:date",
333
+ "SEP-0002",
334
+ holds(r#"YEAR("2025-03-08"^^xsd:date) = 2025"#),
335
+ "also month and day; before 0.26.3, dateTime only",
336
+ ),
337
+ p(
338
+ "< on xsd:date",
339
+ "SEP-0002",
340
+ holds(r#""2024-11-04"^^xsd:date < "2025-06-12"^^xsd:date"#),
341
+ "also <=, >, >=",
342
+ ),
343
+ p(
344
+ "< on xsd:time",
345
+ "SEP-0002",
346
+ holds(r#""08:30:00"^^xsd:time < "09:00:00"^^xsd:time"#),
347
+ "",
348
+ ),
349
+ p(
350
+ "< on durations",
351
+ "SEP-0002",
352
+ holds(r#""PT32M"^^xsd:dayTimeDuration < "PT45M"^^xsd:dayTimeDuration"#),
353
+ "xsd:duration, xsd:yearMonthDuration, xsd:dayTimeDuration",
354
+ ),
355
+ p(
356
+ "xsd:date - xsd:date",
357
+ "SEP-0002",
358
+ holds(r#"("2026-11-04"^^xsd:date - "2024-11-04"^^xsd:date) = "P730D"^^xsd:dayTimeDuration"#),
359
+ "a duration",
360
+ ),
361
+ p(
362
+ "xsd:dateTime - xsd:dateTime",
363
+ "SEP-0002",
364
+ holds(r#"("2026-11-20T14:00:00Z"^^xsd:dateTime - "2026-11-20T13:28:00Z"^^xsd:dateTime) = "PT32M"^^xsd:dayTimeDuration"#),
365
+ "a duration",
366
+ ),
367
+ // Several values and both orders, not one: sparopt orders the operands of `+` by hash,
368
+ // and before 0.26.4 a sum came out unbound whenever the duration hashed lower. The
369
+ // single-value probe that stood here passed by luck of the hash while `P2Y` and `P1M`
370
+ // on a dateTime failed.
371
+ p(
372
+ "date + duration",
373
+ "SEP-0002",
374
+ holds(concat!(
375
+ r#"("2026-11-04"^^xsd:date + "P1D"^^xsd:dayTimeDuration) = "2026-11-05"^^xsd:date"#,
376
+ r#" && ("P1D"^^xsd:dayTimeDuration + "2026-11-04"^^xsd:date) = "2026-11-05"^^xsd:date"#,
377
+ r#" && ("2025-03-08T00:00:00Z"^^xsd:dateTime + "P2Y"^^xsd:yearMonthDuration) = "2027-03-08T00:00:00Z"^^xsd:dateTime"#,
378
+ r#" && ("P2Y"^^xsd:yearMonthDuration + "2025-03-08T00:00:00Z"^^xsd:dateTime) = "2027-03-08T00:00:00Z"^^xsd:dateTime"#,
379
+ r#" && ("2025-03-08T00:00:00Z"^^xsd:dateTime + "P1M"^^xsd:yearMonthDuration) = "2025-04-08T00:00:00Z"^^xsd:dateTime"#,
380
+ r#" && ("10:00:00"^^xsd:time + "PT1H"^^xsd:dayTimeDuration) = "11:00:00"^^xsd:time"#,
381
+ )),
382
+ "also dateTime and time, with the duration on either side",
383
+ ),
384
+ p(
385
+ "ADJUST",
386
+ "SEP-0002",
387
+ holds(r#"ADJUST("2026-01-01T12:00:00Z"^^xsd:dateTime, "PT1H"^^xsd:dayTimeDuration) = "2026-01-01T13:00:00+01:00"^^xsd:dateTime"#),
388
+ "",
389
+ ),
322
390
  ]
323
391
  }
324
392
 
@@ -370,6 +438,16 @@ fn casts() -> Vec<Probe> {
370
438
  expr(r#"STR(xsd:dateTime("2026-01-01T00:00:00Z"))"#),
371
439
  "",
372
440
  ),
441
+ // A cast that fails leaves the variable unbound in a row that is still there, so these
442
+ // compare the cast's result in a FILTER, and fail as no row.
443
+ p("xsd:date", "SEP-0002", holds(r#"xsd:date("2026-01-01") = "2026-01-01"^^xsd:date"#), ""),
444
+ p("xsd:time", "SEP-0002", holds(r#"xsd:time("12:00:00") = "12:00:00"^^xsd:time"#), ""),
445
+ p(
446
+ "xsd:dayTimeDuration",
447
+ "SEP-0002",
448
+ holds(r#"xsd:dayTimeDuration("P1D") = "P1D"^^xsd:dayTimeDuration"#),
449
+ "also xsd:duration, xsd:yearMonthDuration",
450
+ ),
373
451
  ]
374
452
  }
375
453
 
@@ -408,7 +486,12 @@ fn sparql12() -> Vec<Probe> {
408
486
  p(
409
487
  "triple term pattern",
410
488
  "1.2",
411
- over_data("?r rdf:reifies <<( ex:alice ex:name \"Alice\" )>>"),
489
+ // ASK, because no reifier is in the probe data, so a SELECT would correctly
490
+ // return no rows and `section` would count that as a failure.
491
+ format!(
492
+ "{} ASK {{ ?r rdf:reifies <<( ex:alice ex:name \"Alice\" )>> }}",
493
+ prefixes()
494
+ ),
412
495
  "matches a triple term in object position; zero rows here is correct",
413
496
  ),
414
497
  p(
@@ -779,7 +862,14 @@ fn section(title: &str, spec: &str, probes: Vec<Probe>, engine: &Engine, session
779
862
  println!("| {spec} | Spec | Status | Notes |");
780
863
  println!("|---|---|---|---|");
781
864
  for entry in probes {
782
- let (status, note) = match probe(engine, session, &entry) {
865
+ // A query that runs and returns nothing is not "supported": an operator that errors
866
+ // inside a FILTER fails exactly that way, silently, which is how xsd:date comparison
867
+ // went unreported until 0.26.3. Every probe is written to return a row when it works.
868
+ let outcome = match probe(engine, session, &entry) {
869
+ Ok(0) => Err("evaluated, but returned no rows".to_owned()),
870
+ other => other,
871
+ };
872
+ let (status, note) = match outcome {
783
873
  Ok(_) => ("✅ yes".to_owned(), entry.note.to_owned()),
784
874
  Err(reason) => {
785
875
  let combined = if entry.note.is_empty() {
@@ -748,9 +748,12 @@ fn cmp_triples(a: &ExpressionTriple, b: &ExpressionTriple) -> Ordering {
748
748
  /// SPARQL's `<` between two literals, where it is defined.
749
749
  ///
750
750
  /// Numbers of any of the four numeric types compare with each other; strings with strings,
751
- /// language-tagged strings with the same tag, `xsd:dateTime` with `xsd:dateTime`. A
752
- /// datatype the evaluator does not give a value to — `xsd:date` in this build, and every
753
- /// user-defined type — is not comparable by value, and falls to the lexical order.
751
+ /// language-tagged strings with the same tag; `xsd:dateTime`, `xsd:date` and `xsd:time`
752
+ /// each with their own kind; and the three duration types with each other. This is
753
+ /// `spareval`'s own `partial_cmp_literals` with the workspace's features (`sep-0002`, not
754
+ /// `calendar-ext`), which that crate does not export. A datatype the evaluator does not
755
+ /// give a value to — `xsd:gYear` and its kin, and every user-defined type — is not
756
+ /// comparable by value, and falls to the lexical order.
754
757
  fn partial_cmp_literals(a: &ExpressionTerm, b: &ExpressionTerm) -> Option<Ordering> {
755
758
  use ExpressionTerm as T;
756
759
  use oxsdatatypes::{Decimal, Double, Float};
@@ -795,6 +798,17 @@ fn partial_cmp_literals(a: &ExpressionTerm, b: &ExpressionTerm) -> Option<Orderi
795
798
  (T::DecimalLiteral(a), T::IntegerLiteral(b)) => a.partial_cmp(&Decimal::from(*b)),
796
799
  (T::DecimalLiteral(a), T::DecimalLiteral(b)) => a.partial_cmp(b),
797
800
  (T::DateTimeLiteral(a), T::DateTimeLiteral(b)) => a.partial_cmp(b),
801
+ (T::DateLiteral(a), T::DateLiteral(b)) => a.partial_cmp(b),
802
+ (T::TimeLiteral(a), T::TimeLiteral(b)) => a.partial_cmp(b),
803
+ (T::DurationLiteral(a), T::DurationLiteral(b)) => a.partial_cmp(b),
804
+ (T::DurationLiteral(a), T::YearMonthDurationLiteral(b)) => a.partial_cmp(b),
805
+ (T::DurationLiteral(a), T::DayTimeDurationLiteral(b)) => a.partial_cmp(b),
806
+ (T::YearMonthDurationLiteral(a), T::DurationLiteral(b)) => a.partial_cmp(b),
807
+ (T::YearMonthDurationLiteral(a), T::YearMonthDurationLiteral(b)) => a.partial_cmp(b),
808
+ (T::YearMonthDurationLiteral(a), T::DayTimeDurationLiteral(b)) => a.partial_cmp(b),
809
+ (T::DayTimeDurationLiteral(a), T::DurationLiteral(b)) => a.partial_cmp(b),
810
+ (T::DayTimeDurationLiteral(a), T::YearMonthDurationLiteral(b)) => a.partial_cmp(b),
811
+ (T::DayTimeDurationLiteral(a), T::DayTimeDurationLiteral(b)) => a.partial_cmp(b),
798
812
  _ => None,
799
813
  }
800
814
  }
@@ -802,9 +816,11 @@ fn partial_cmp_literals(a: &ExpressionTerm, b: &ExpressionTerm) -> Option<Orderi
802
816
  /// The order two literals fall back to when `<` is not defined between them: lexical form,
803
817
  /// then datatype, then language tag — what `spareval` does, and what makes the order total.
804
818
  ///
805
- /// Two literals of a datatype the evaluator does not value — which is every `xsd:date` in
806
- /// this build, and so every key of the query this module was written for — are compared
807
- /// in place. The general case goes back through `Term`, which canonicalises a valued
819
+ /// Two literals of a datatype the evaluator does not value — `xsd:gYear` and its kin, or a
820
+ /// user-defined type — are compared in place. (Until 0.26.3 that was every `xsd:date`, and
821
+ /// so every key of the query this module was written for; dates now compare by value in
822
+ /// [`partial_cmp_literals`] and reach this only against a term of another kind.) The
823
+ /// general case goes back through `Term`, which canonicalises a valued
808
824
  /// literal's lexical form the way the evaluator does; it is reached only for a pair of
809
825
  /// different kinds, which a well-typed sort key seldom produces.
810
826
  fn lexical_cmp(a: &ExpressionTerm, b: &ExpressionTerm) -> Ordering {
@@ -0,0 +1,161 @@
1
+ //! `xsd:date`, `xsd:time` and the duration types compare, sort and subtract by value.
2
+ //!
3
+ //! Until 0.26.3 the workspace built `spareval` without its `sep-0002` feature, which is what
4
+ //! gives these datatypes values. Without it they were opaque typed literals: `<` between two
5
+ //! dates was a type error, and a FILTER whose expression errors removes the row, so
6
+ //! `FILTER(?d >= "2024-11-04"^^xsd:date)` returned nothing at all, silently. Only
7
+ //! `xsd:dateTime` compared. The case that found it was a "what is open on this day?" query
8
+ //! over seasons with xsd:date bounds, which answered "closed" for every place on every day:
9
+ //! right in November, wrong in July. These tests are that query and its parts, against the
10
+ //! evaluator HOLOS actually runs, reading the dates 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
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
20
+
21
+ ex:meeting1 ex:on "2025-06-12"^^xsd:date .
22
+ ex:meeting2 ex:on "2023-05-10"^^xsd:date .
23
+ ex:meeting3 ex:on "2026-02-03"^^xsd:date .
24
+
25
+ ex:centre ex:from "2026-03-06"^^xsd:date ; ex:to "2026-11-08"^^xsd:date .
26
+ ex:skellig ex:from "2026-05-12"^^xsd:date ; ex:to "2026-09-21"^^xsd:date .
27
+ ex:museum ex:name "no season published" .
28
+
29
+ ex:early ex:opens "08:30:00"^^xsd:time .
30
+ ex:late ex:opens "10:00:00"^^xsd:time .
31
+ "#;
32
+
33
+ fn rows(query: &str) -> Vec<String> {
34
+ let mut e = Engine::new();
35
+ e.bulk_load(DATA.as_bytes(), RdfFormat::Turtle, None)
36
+ .expect("load");
37
+ let session = Session::unrestricted(e.store()).expect("session");
38
+ let view = e.view(&session);
39
+ let results = Engine::query(&view, query, None).expect("query");
40
+ let QueryResults::Solutions(iter) = results else {
41
+ panic!("expected a solutions result");
42
+ };
43
+ iter.map(|s| {
44
+ s.expect("solution")
45
+ .iter()
46
+ .map(|(v, t)| format!("{}={t}", v.as_str()))
47
+ .collect::<Vec<_>>()
48
+ .join(" ")
49
+ })
50
+ .collect()
51
+ }
52
+
53
+ const PREFIXES: &str =
54
+ "PREFIX ex: <http://example.com/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> ";
55
+
56
+ fn q(body: &str) -> Vec<String> {
57
+ rows(&format!("{PREFIXES}{body}"))
58
+ }
59
+
60
+ #[test]
61
+ fn a_filter_compares_stored_dates_with_a_constant() {
62
+ assert_eq!(
63
+ q(r#"SELECT ?m WHERE { ?m ex:on ?d FILTER(?d >= "2024-11-04"^^xsd:date) } ORDER BY ?m"#),
64
+ [
65
+ "m=<http://example.com/meeting1>",
66
+ "m=<http://example.com/meeting3>"
67
+ ]
68
+ );
69
+ assert_eq!(
70
+ q(r#"SELECT ?m WHERE { ?m ex:on ?d FILTER(?d < "2024-11-04"^^xsd:date) }"#),
71
+ ["m=<http://example.com/meeting2>"]
72
+ );
73
+ // Equality worked before and still does.
74
+ assert_eq!(
75
+ q(r#"SELECT ?m WHERE { ?m ex:on ?d FILTER(?d = "2023-05-10"^^xsd:date) }"#),
76
+ ["m=<http://example.com/meeting2>"]
77
+ );
78
+ }
79
+
80
+ #[test]
81
+ fn a_date_bound_by_values_compares_with_a_stored_one() {
82
+ // The shape of the reported query: the day comes from VALUES, the season from the data.
83
+ let open = |day: &str| {
84
+ q(&format!(
85
+ r#"SELECT ?place WHERE {{
86
+ VALUES ?day {{ "{day}"^^xsd:date }}
87
+ ?place ex:from ?from ; ex:to ?to .
88
+ FILTER (?from <= ?day && ?day <= ?to)
89
+ }} ORDER BY ?place"#
90
+ ))
91
+ };
92
+ assert_eq!(
93
+ open("2026-07-15"),
94
+ [
95
+ "place=<http://example.com/centre>",
96
+ "place=<http://example.com/skellig>"
97
+ ]
98
+ );
99
+ assert_eq!(open("2026-10-01"), ["place=<http://example.com/centre>"]);
100
+ assert!(open("2026-11-21").is_empty());
101
+ }
102
+
103
+ #[test]
104
+ fn exists_over_a_date_range_is_true_in_season() {
105
+ // Inside EXISTS, an erroring comparison made EXISTS false rather than failing loudly,
106
+ // so the place was reported closed.
107
+ let status = q(r#"SELECT ?place ?status WHERE {
108
+ VALUES ?day { "2026-07-15"^^xsd:date }
109
+ VALUES ?place { ex:centre ex:skellig ex:museum }
110
+ BIND (IF(EXISTS { ?place ex:from ?f ; ex:to ?t . FILTER(?f <= ?day && ?day <= ?t) }, "open",
111
+ IF(EXISTS { ?place ex:from ?f }, "closed", "not known")) AS ?status)
112
+ } ORDER BY ?place"#);
113
+ assert_eq!(
114
+ status,
115
+ [
116
+ "place=<http://example.com/centre> status=\"open\"",
117
+ "place=<http://example.com/museum> status=\"not known\"",
118
+ "place=<http://example.com/skellig> status=\"open\"",
119
+ ]
120
+ );
121
+ }
122
+
123
+ #[test]
124
+ fn dates_sort_by_value() {
125
+ assert_eq!(
126
+ q("SELECT ?d WHERE { ?m ex:on ?d } ORDER BY DESC(?d) LIMIT 1"),
127
+ ["d=\"2026-02-03\"^^<http://www.w3.org/2001/XMLSchema#date>"]
128
+ );
129
+ }
130
+
131
+ #[test]
132
+ fn times_compare() {
133
+ assert_eq!(
134
+ q(r#"SELECT ?s WHERE { ?s ex:opens ?t FILTER(?t < "09:00:00"^^xsd:time) }"#),
135
+ ["s=<http://example.com/early>"]
136
+ );
137
+ }
138
+
139
+ #[test]
140
+ fn subtracting_dates_gives_a_duration() {
141
+ assert_eq!(
142
+ q(r#"SELECT ?gap WHERE { BIND("2026-11-04"^^xsd:date - "2024-11-04"^^xsd:date AS ?gap) }"#),
143
+ ["gap=\"P730D\"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration>"]
144
+ );
145
+ assert_eq!(
146
+ q(
147
+ r#"SELECT ?gap WHERE { BIND("2026-11-20T14:00:00"^^xsd:dateTime - "2026-11-20T13:28:00"^^xsd:dateTime AS ?gap) }"#
148
+ ),
149
+ ["gap=\"PT32M\"^^<http://www.w3.org/2001/XMLSchema#dayTimeDuration>"]
150
+ );
151
+ }
152
+
153
+ #[test]
154
+ fn durations_compare() {
155
+ assert_eq!(
156
+ q(
157
+ r#"SELECT ?ok WHERE { BIND("PT32M"^^xsd:dayTimeDuration < "PT45M"^^xsd:dayTimeDuration AS ?ok) }"#
158
+ ),
159
+ ["ok=\"true\"^^<http://www.w3.org/2001/XMLSchema#boolean>"]
160
+ );
161
+ }