maplib 0.19.5__tar.gz → 0.19.9__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 (244) hide show
  1. {maplib-0.19.5 → maplib-0.19.9}/Cargo.lock +5 -4
  2. {maplib-0.19.5 → maplib-0.19.9}/Cargo.toml +1 -0
  3. {maplib-0.19.5 → maplib-0.19.9}/PKG-INFO +1 -1
  4. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/Cargo.toml +1 -0
  5. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/model/expansion.rs +19 -6
  6. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/model.rs +6 -1
  7. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/src/to_python.rs +1 -1
  8. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/expressions.rs +47 -21
  9. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/base_rdf_type.rs +2 -3
  10. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/decode.rs +11 -2
  11. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/encode.rs +5 -5
  12. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/globalize.rs +2 -1
  13. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/image.rs +38 -16
  14. maplib-0.19.9/lib/representation/src/cats/maps/in_memory.rs +619 -0
  15. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/maps/on_disk.rs +3 -2
  16. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/maps.rs +8 -6
  17. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats/re_encode.rs +15 -10
  18. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/cats.rs +11 -6
  19. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/constants.rs +3 -0
  20. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/prefixes.rs +2 -5
  21. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/parser.rs +0 -1
  22. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/Cargo.toml +1 -1
  23. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/errors.rs +6 -0
  24. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/lib.rs +4 -0
  25. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/insert.rs +14 -0
  26. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/graph.rs +1 -1
  27. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/storage/deduplication.rs +1 -1
  28. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/storage.rs +73 -47
  29. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/triples_read.rs +3 -1
  30. maplib-0.19.9/lib/triplestore/src/triples_write/pretty_turtle.rs +753 -0
  31. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/triples_write/serializers.rs +1 -1
  32. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/triples_write.rs +5 -1
  33. maplib-0.19.9/maplib/__init__.py +90 -0
  34. {maplib-0.19.5 → maplib-0.19.9}/maplib/__init__.pyi +195 -169
  35. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/Cargo.toml +1 -1
  36. maplib-0.19.9/py_maplib/maplib/__init__.py +90 -0
  37. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/__init__.pyi +195 -169
  38. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/src/lib.rs +118 -47
  39. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_basics.py +22 -1
  40. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_integration.py +20 -3
  41. maplib-0.19.9/py_maplib/tests/test_pretty_turtle.py +78 -0
  42. maplib-0.19.9/py_maplib/tests/testdata/read_lists.ttl +8 -0
  43. maplib-0.19.9/py_maplib/tests/testdata/write_turtle_newlines_bug.nt +8 -0
  44. maplib-0.19.5/lib/representation/src/cats/maps/in_memory.rs +0 -185
  45. maplib-0.19.5/lib/triplestore/src/triples_write/pretty_turtle.rs +0 -161
  46. maplib-0.19.5/maplib/__init__.py +0 -75
  47. maplib-0.19.5/py_maplib/maplib/__init__.py +0 -75
  48. {maplib-0.19.5 → maplib-0.19.9}/LICENSE +0 -0
  49. {maplib-0.19.5 → maplib-0.19.9}/README.md +0 -0
  50. {maplib-0.19.5 → maplib-0.19.9}/lib/cimxml/Cargo.toml +0 -0
  51. {maplib-0.19.5 → maplib-0.19.9}/lib/cimxml/src/export.rs +0 -0
  52. {maplib-0.19.5 → maplib-0.19.9}/lib/cimxml/src/lib.rs +0 -0
  53. {maplib-0.19.5 → maplib-0.19.9}/lib/datalog/Cargo.toml +0 -0
  54. {maplib-0.19.5 → maplib-0.19.9}/lib/datalog/src/ast.rs +0 -0
  55. {maplib-0.19.5 → maplib-0.19.9}/lib/datalog/src/inference.rs +0 -0
  56. {maplib-0.19.5 → maplib-0.19.9}/lib/datalog/src/lib.rs +0 -0
  57. {maplib-0.19.5 → maplib-0.19.9}/lib/datalog/src/parser.rs +0 -0
  58. {maplib-0.19.5 → maplib-0.19.9}/lib/datalog/src/python.rs +0 -0
  59. {maplib-0.19.5 → maplib-0.19.9}/lib/file_io/Cargo.toml +0 -0
  60. {maplib-0.19.5 → maplib-0.19.9}/lib/file_io/src/lib.rs +0 -0
  61. {maplib-0.19.5 → maplib-0.19.9}/lib/fts/Cargo.toml +0 -0
  62. {maplib-0.19.5 → maplib-0.19.9}/lib/fts/src/lib.rs +0 -0
  63. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/errors.rs +0 -0
  64. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/lib.rs +0 -0
  65. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/model/constant_terms.rs +0 -0
  66. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/model/default.rs +0 -0
  67. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/model/errors.rs +0 -0
  68. {maplib-0.19.5 → maplib-0.19.9}/lib/maplib/src/model/expansion/validation.rs +0 -0
  69. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/Cargo.toml +0 -0
  70. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/LICENSE +0 -0
  71. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/README.md +0 -0
  72. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/licensing/POLARS_LICENSE +0 -0
  73. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/src/lib.rs +0 -0
  74. {maplib-0.19.5 → maplib-0.19.9}/lib/pydf_io/src/to_rust.rs +0 -0
  75. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/Cargo.toml +0 -0
  76. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/LICENSE +0 -0
  77. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/README.md +0 -0
  78. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/aggregates.rs +0 -0
  79. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/cats.rs +0 -0
  80. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/constants.rs +0 -0
  81. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/errors.rs +0 -0
  82. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/exists_helper.rs +0 -0
  83. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/expressions/comparisons.rs +0 -0
  84. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/expressions/functions.rs +0 -0
  85. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/expressions/operations.rs +0 -0
  86. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/find_query_variables.rs +0 -0
  87. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns/cats.rs +0 -0
  88. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns/group.rs +0 -0
  89. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns/join.rs +0 -0
  90. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns/order.rs +0 -0
  91. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns/union.rs +0 -0
  92. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns/values.rs +0 -0
  93. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/graph_patterns.rs +0 -0
  94. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/lib.rs +0 -0
  95. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/pushdowns.rs +0 -0
  96. {maplib-0.19.5 → maplib-0.19.9}/lib/query_processing/src/type_constraints.rs +0 -0
  97. {maplib-0.19.5 → maplib-0.19.9}/lib/report_mapping/Cargo.toml +0 -0
  98. {maplib-0.19.5 → maplib-0.19.9}/lib/report_mapping/src/lib.rs +0 -0
  99. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/Cargo.toml +0 -0
  100. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/LICENSE +0 -0
  101. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/README.md +0 -0
  102. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/dataset.rs +0 -0
  103. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/debug.rs +0 -0
  104. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/errors.rs +0 -0
  105. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/formatting.rs +0 -0
  106. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/lib.rs +0 -0
  107. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/literals.rs +0 -0
  108. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/multitype.rs +0 -0
  109. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/polars_to_rdf.rs +0 -0
  110. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/python.rs +0 -0
  111. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/query_context.rs +0 -0
  112. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/rdf_state.rs +0 -0
  113. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/rdf_to_polars.rs +0 -0
  114. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/rdf_type.rs +0 -0
  115. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/solution_mapping.rs +0 -0
  116. {maplib-0.19.5 → maplib-0.19.9}/lib/representation/src/subtypes.rs +0 -0
  117. {maplib-0.19.5 → maplib-0.19.9}/lib/shacl/Cargo.toml +0 -0
  118. {maplib-0.19.5 → maplib-0.19.9}/lib/shacl/src/errors.rs +0 -0
  119. {maplib-0.19.5 → maplib-0.19.9}/lib/shacl/src/lib.rs +0 -0
  120. {maplib-0.19.5 → maplib-0.19.9}/lib/shacl/src/storage.rs +0 -0
  121. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/Cargo.toml +0 -0
  122. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/LICENSE +0 -0
  123. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/README.md +0 -0
  124. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/algebra.rs +0 -0
  125. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/lib.rs +0 -0
  126. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/query.rs +0 -0
  127. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/query_context.rs +0 -0
  128. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/remove_sugar.rs +0 -0
  129. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/term.rs +0 -0
  130. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/treehouse.rs +0 -0
  131. {maplib-0.19.5 → maplib-0.19.9}/lib/spargebra/src/update.rs +0 -0
  132. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/Cargo.toml +0 -0
  133. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/ast.rs +0 -0
  134. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/compatible.rs +0 -0
  135. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/dataset/errors.rs +0 -0
  136. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/dataset.rs +0 -0
  137. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/document.rs +0 -0
  138. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/lib.rs +0 -0
  139. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/parsing.rs +0 -0
  140. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/python/owl.rs +0 -0
  141. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/python/rdf.rs +0 -0
  142. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/python/rdfs.rs +0 -0
  143. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/python/xsd.rs +0 -0
  144. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/python.rs +0 -0
  145. {maplib-0.19.5 → maplib-0.19.9}/lib/templates/src/subtypes_ext.rs +0 -0
  146. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/cats.rs +0 -0
  147. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/dblf.rs +0 -0
  148. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/io_funcs.rs +0 -0
  149. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/native_parquet_write.rs +0 -0
  150. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/query_solutions.rs +0 -0
  151. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/rdfs_inferencing.rs +0 -0
  152. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/debug.rs +0 -0
  153. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/delete.rs +0 -0
  154. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/errors.rs +0 -0
  155. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_aggregate.rs +0 -0
  156. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_expressions.rs +0 -0
  157. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/distinct.rs +0 -0
  158. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/extend.rs +0 -0
  159. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/filter.rs +0 -0
  160. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/group.rs +0 -0
  161. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/join.rs +0 -0
  162. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/left_join.rs +0 -0
  163. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/minus.rs +0 -0
  164. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/order_by.rs +0 -0
  165. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/path.rs +0 -0
  166. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/project.rs +0 -0
  167. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/pvalues.rs +0 -0
  168. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/triple.rs +0 -0
  169. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/triples_ordering.rs +0 -0
  170. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/union.rs +0 -0
  171. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns/values.rs +0 -0
  172. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_graph_patterns.rs +0 -0
  173. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/lazy_order.rs +0 -0
  174. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/rewrite/rewrite_cse.rs +0 -0
  175. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/rewrite/rewrite_pushdown.rs +0 -0
  176. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql/rewrite.rs +0 -0
  177. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/sparql.rs +0 -0
  178. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/storage/so_index.rs +0 -0
  179. {maplib-0.19.5 → maplib-0.19.9}/lib/triplestore/src/triples_write/fast_ntriples.rs +0 -0
  180. {maplib-0.19.5 → maplib-0.19.9}/lib/utils/Cargo.toml +0 -0
  181. {maplib-0.19.5 → maplib-0.19.9}/lib/utils/src/lib.rs +0 -0
  182. {maplib-0.19.5 → maplib-0.19.9}/lib/utils/src/polars.rs +0 -0
  183. {maplib-0.19.5 → maplib-0.19.9}/maplib/adding_triples.py +0 -0
  184. {maplib-0.19.5 → maplib-0.19.9}/maplib/py.typed +0 -0
  185. {maplib-0.19.5 → maplib-0.19.9}/maplib/template_generator/__init__.py +0 -0
  186. {maplib-0.19.5 → maplib-0.19.9}/maplib/template_generator/generate.py +0 -0
  187. {maplib-0.19.5 → maplib-0.19.9}/maplib/template_generator/ordering.py +0 -0
  188. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/LICENSE +0 -0
  189. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/README.md +0 -0
  190. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/.gitignore +0 -0
  191. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/adding_triples.py +0 -0
  192. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/py.typed +0 -0
  193. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/template_generator/__init__.py +0 -0
  194. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/template_generator/generate.py +0 -0
  195. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/maplib/template_generator/ordering.py +0 -0
  196. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/src/error.rs +0 -0
  197. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/src/shacl.rs +0 -0
  198. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/.gitignore +0 -0
  199. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/__init__.py +0 -0
  200. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/out.ttl +0 -0
  201. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/requirements.txt +0 -0
  202. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_blank_nodes_multi.py +0 -0
  203. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_data_validation.py +0 -0
  204. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_exceptions.py +0 -0
  205. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_multi_expressions.py +0 -0
  206. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_named_graphs.py +0 -0
  207. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_pizza_example.py +0 -0
  208. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_programmatic_pizza_example.py +0 -0
  209. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_rdf_parser.py +0 -0
  210. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_read_write.py +0 -0
  211. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_stottr.py +0 -0
  212. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/test_validate_iris.py +0 -0
  213. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/expected_easy_case.ttl +0 -0
  214. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/iterated_property_path_constant_object_query.csv +0 -0
  215. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/iterated_property_path_constant_subject_query.csv +0 -0
  216. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/iterated_property_path_query.csv +0 -0
  217. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/iterated_property_path_query_with_bug.csv +0 -0
  218. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/larger_ordered_query.csv +0 -0
  219. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/larger_query.csv +0 -0
  220. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_concat.csv +0 -0
  221. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_join_query.csv +0 -0
  222. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_join_query_two_vars.csv +0 -0
  223. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_leftjoin_query.csv +0 -0
  224. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_query.csv +0 -0
  225. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_query_sorting.csv +0 -0
  226. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_union_query.csv +0 -0
  227. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_union_query_native_df.parquet +0 -0
  228. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_union_sort_desc1_query.csv +0 -0
  229. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_datatype_union_sort_query.csv +0 -0
  230. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/multi_many_comp.csv +0 -0
  231. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/property_path_query.csv +0 -0
  232. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/rdf_parser/date_panic.nt +0 -0
  233. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/read_ntriples.csv +0 -0
  234. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/read_ntriples.nt +0 -0
  235. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/read_ntriples2.csv +0 -0
  236. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/simple_construct_query_nothing.csv +0 -0
  237. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/simple_construct_query_something.csv +0 -0
  238. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/simple_insert_query_nothing.csv +0 -0
  239. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/simple_insert_query_something.csv +0 -0
  240. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/simple_property_path_query.csv +0 -0
  241. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/simple_query.csv +0 -0
  242. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/stringfuncs.csv +0 -0
  243. {maplib-0.19.5 → maplib-0.19.9}/py_maplib/tests/testdata/templates.ttl +0 -0
  244. {maplib-0.19.5 → maplib-0.19.9}/pyproject.toml +0 -0
@@ -32,9 +32,9 @@ dependencies = [
32
32
 
33
33
  [[package]]
34
34
  name = "aho-corasick"
35
- version = "1.1.3"
35
+ version = "1.1.4"
36
36
  source = "registry+https://github.com/rust-lang/crates.io-index"
37
- checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
37
+ checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
38
38
  dependencies = [
39
39
  "memchr",
40
40
  ]
@@ -1414,6 +1414,7 @@ dependencies = [
1414
1414
  "oxrdfio",
1415
1415
  "polars",
1416
1416
  "pyo3",
1417
+ "query_processing",
1417
1418
  "rayon",
1418
1419
  "representation",
1419
1420
  "rstest",
@@ -2451,7 +2452,7 @@ dependencies = [
2451
2452
 
2452
2453
  [[package]]
2453
2454
  name = "py_maplib"
2454
- version = "0.19.5"
2455
+ version = "0.19.9"
2455
2456
  dependencies = [
2456
2457
  "chrono",
2457
2458
  "cimxml",
@@ -3793,11 +3794,11 @@ dependencies = [
3793
3794
  name = "triplestore"
3794
3795
  version = "0.5.0"
3795
3796
  dependencies = [
3797
+ "aho-corasick",
3796
3798
  "file_io",
3797
3799
  "fts",
3798
3800
  "itoa",
3799
3801
  "memmap2",
3800
- "nohash-hasher",
3801
3802
  "oxrdf",
3802
3803
  "oxrdfio",
3803
3804
  "oxttl",
@@ -32,6 +32,7 @@ fundu = "2.0.1"
32
32
  memmap2 = "0.9.5"
33
33
  sprs = "0.11.3"
34
34
  walkdir = "2.5.0"
35
+ aho-corasick = "1.1.4"
35
36
 
36
37
  tracing = { version = "0.1", features = [ "log" ] }
37
38
  tracing-subscriber = { version = "0.3.19", features = [ "env-filter" ] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maplib
3
- Version: 0.19.5
3
+ Version: 0.19.9
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: License :: OSI Approved :: Apache Software License
6
6
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -14,6 +14,7 @@ shacl = { path = "../shacl" }
14
14
  representation = { path = "../representation" }
15
15
  datalog = {path = "../datalog"}
16
16
  cimxml = {path = "../cimxml"}
17
+ query_processing = {path ="../query_processing"}
17
18
 
18
19
  rayon = { workspace = true }
19
20
  oxrdf = { workspace = true }
@@ -27,11 +27,11 @@ use templates::ast::{
27
27
  };
28
28
  use templates::MappingColumnType;
29
29
  use tracing::debug;
30
+ use query_processing::expressions::non_multi_col_is_null_workaround;
30
31
  use triplestore::TriplesToAdd;
31
32
 
32
33
  const LIST_COL: &str = "list";
33
34
  const FIRST_COL: &str = "first";
34
-
35
35
  const REST_COL: &str = "rest";
36
36
 
37
37
  impl Model {
@@ -253,7 +253,9 @@ impl Model {
253
253
  predicate,
254
254
  } in ok_triples
255
255
  {
256
- let has_multi = subject_type.is_multi() || object_type.is_multi();
256
+ let subject_multi = subject_type.is_multi();
257
+ let object_multi = object_type.is_multi();
258
+ let has_multi = subject_multi || object_multi;
257
259
 
258
260
  let mut types = HashMap::from([
259
261
  (SUBJECT_COL_NAME.to_string(), subject_type),
@@ -270,23 +272,34 @@ impl Model {
270
272
  } else {
271
273
  vec![(df, types)]
272
274
  };
273
- for (df, mut types) in dfs {
274
- let (subject_type, subject_state) = types
275
+ for (mut df, mut part_types) in dfs {
276
+ let (subject_type, subject_state) = part_types
275
277
  .remove(SUBJECT_COL_NAME)
276
278
  .unwrap()
277
279
  .map
278
280
  .into_iter()
279
281
  .next()
280
282
  .unwrap();
281
- let (object_type, object_state) = types
283
+ let (object_type, object_state) = part_types
282
284
  .remove(OBJECT_COL_NAME)
283
285
  .unwrap()
284
286
  .map
285
287
  .into_iter()
286
288
  .next()
287
289
  .unwrap();
290
+ // Splitting by multi introduces nulls
291
+ if has_multi {
292
+ let mut lf = df.lazy();
293
+ if subject_multi {
294
+ lf = lf.filter(non_multi_col_is_null_workaround(col(SUBJECT_COL_NAME), &subject_type).not())
295
+ }
296
+ if object_multi {
297
+ lf = lf.filter(non_multi_col_is_null_workaround(col(OBJECT_COL_NAME), &object_type).not())
298
+ }
299
+ df = lf.collect().unwrap();
300
+ }
288
301
  let predicate_state = if predicate.is_none() {
289
- let (_, s) = types
302
+ let (_, s) = part_types
290
303
  .remove(PREDICATE_COL_NAME)
291
304
  .unwrap()
292
305
  .map
@@ -313,9 +313,14 @@ impl Model {
313
313
  buffer: &mut W,
314
314
  graph: &NamedGraph,
315
315
  rdf_format: RdfFormat,
316
+ prefixes: Option<&HashMap<String, NamedNode>>,
316
317
  ) -> Result<(), MaplibError> {
318
+ let mut use_prefixes = self.prefixes.clone();
319
+ if let Some(prefixes) = prefixes {
320
+ use_prefixes.extend(prefixes.clone());
321
+ }
317
322
  self.triplestore
318
- .write_triples(buffer, rdf_format, graph)
323
+ .write_triples(buffer, rdf_format, graph, &use_prefixes)
319
324
  .map_err(MaplibError::TriplestoreError)?;
320
325
  Ok(())
321
326
  }
@@ -104,7 +104,7 @@ pub fn df_to_py_df(
104
104
  let pyarrow = PyModule::import(py, "pyarrow")?;
105
105
  let polars = PyModule::import(py, "polars")?;
106
106
  let py_df = to_py_df(&chunk, names.as_slice(), py, &pyarrow, &polars)?;
107
- if include_datatypes || debug_outputs.is_some() {
107
+ if include_datatypes {
108
108
  Py::new(
109
109
  py,
110
110
  PySolutionMappings {
@@ -159,15 +159,37 @@ pub fn binary_expression(
159
159
  .get(right_context.as_str())
160
160
  .unwrap();
161
161
  if left_type.is_none() || right_type.is_none() {
162
- solution_mappings.mappings = solution_mappings.mappings.with_column(
163
- lit(LiteralValue::untyped_null())
164
- .cast(BaseRDFNodeType::None.default_input_polars_data_type())
165
- .alias(outer_context.as_str()),
166
- );
167
- solution_mappings.rdf_node_types.insert(
168
- outer_context.as_str().to_string(),
169
- BaseRDFNodeType::None.into_default_input_rdf_node_state(),
170
- );
162
+ if matches!(
163
+ expression,
164
+ Expression::Equal(..)
165
+ | Expression::Less(..)
166
+ | Expression::Greater(..)
167
+ | Expression::GreaterOrEqual(..)
168
+ | Expression::LessOrEqual(..)
169
+ | Expression::And(..)
170
+ | Expression::Or(..)
171
+ ) {
172
+ let bool = BaseRDFNodeType::Literal(xsd::BOOLEAN.into_owned());
173
+ solution_mappings.mappings = solution_mappings.mappings.with_column(
174
+ lit(LiteralValue::untyped_null())
175
+ .cast(bool.default_input_polars_data_type())
176
+ .alias(outer_context.as_str()),
177
+ );
178
+ solution_mappings.rdf_node_types.insert(
179
+ outer_context.as_str().to_string(),
180
+ bool.into_default_input_rdf_node_state(),
181
+ );
182
+ } else {
183
+ solution_mappings.mappings = solution_mappings.mappings.with_column(
184
+ lit(LiteralValue::untyped_null())
185
+ .cast(BaseRDFNodeType::None.default_input_polars_data_type())
186
+ .alias(outer_context.as_str()),
187
+ );
188
+ solution_mappings.rdf_node_types.insert(
189
+ outer_context.as_str().to_string(),
190
+ BaseRDFNodeType::None.into_default_input_rdf_node_state(),
191
+ );
192
+ }
171
193
  solution_mappings =
172
194
  drop_inner_contexts(solution_mappings, &vec![left_context, right_context]);
173
195
  return Ok(solution_mappings);
@@ -342,23 +364,27 @@ pub fn bound(
342
364
  pub fn expr_is_null_workaround(expr: Expr, rdf_node_type: &RDFNodeState) -> Expr {
343
365
  if !rdf_node_type.is_multi() {
344
366
  let b = rdf_node_type.get_base_type().unwrap();
345
- match b {
346
- BaseRDFNodeType::Literal(l) => {
347
- if l.as_ref() == rdf::LANG_STRING {
348
- expr.struct_()
349
- .field_by_name(LANG_STRING_VALUE_FIELD)
350
- .is_null()
351
- } else {
352
- expr.is_null()
353
- }
354
- }
355
- _ => expr.is_null(),
356
- }
367
+ non_multi_col_is_null_workaround(expr, b)
357
368
  } else {
358
369
  create_all_types_null_expression(expr, rdf_node_type.get_sorted_types())
359
370
  }
360
371
  }
361
372
 
373
+ pub fn non_multi_col_is_null_workaround(expr: Expr, base_rdf_node_type: &BaseRDFNodeType) -> Expr {
374
+ match base_rdf_node_type {
375
+ BaseRDFNodeType::Literal(l) => {
376
+ if l.as_ref() == rdf::LANG_STRING {
377
+ expr.struct_()
378
+ .field_by_name(LANG_STRING_VALUE_FIELD)
379
+ .is_null()
380
+ } else {
381
+ expr.is_null()
382
+ }
383
+ }
384
+ _ => expr.is_null(),
385
+ }
386
+ }
387
+
362
388
  pub fn if_expression(
363
389
  mut solution_mappings: SolutionMappings,
364
390
  left_context: &Context,
@@ -196,7 +196,7 @@ impl BaseRDFNodeType {
196
196
  } else if matches!(self, BaseRDFNodeType::IRI | BaseRDFNodeType::BlankNode) {
197
197
  DataType::UInt32
198
198
  } else if let BaseRDFNodeType::Literal(l) = self {
199
- literal_type(l.as_ref(), &BaseCatState::String, false)
199
+ literal_type(l.as_ref(), &BaseCatState::CategoricalNative(false, None), false)
200
200
  } else {
201
201
  unreachable!("Should never happen")
202
202
  }
@@ -225,8 +225,7 @@ fn literal_type(
225
225
  DataType::Struct(polars_lang_fields(base_cat_state))
226
226
  } else {
227
227
  match base_cat_state {
228
- BaseCatState::CategoricalNative(_, _) => DataType::UInt32,
229
- BaseCatState::String | BaseCatState::NonString => DataType::String,
228
+ BaseCatState::String | BaseCatState::NonString | BaseCatState::CategoricalNative(..) => DataType::String,
230
229
  }
231
230
  }
232
231
  }
@@ -20,12 +20,21 @@ impl CatEncs {
20
20
  new_ser
21
21
  }
22
22
 
23
- pub fn maybe_decode_string(&self, u: &u32) -> Option<&str> {
23
+ pub fn maybe_decode_string(&self, u: &u32) -> Option<Cow<'_, str>> {
24
24
  self.maps.maybe_decode(u)
25
25
  }
26
26
  }
27
27
 
28
28
  impl Cats {
29
+ pub fn maybe_decode_of_type(&self, u:&u32, bt:&BaseRDFNodeType) -> Option<Cow<'_, str>> {
30
+ let ct = CatType::from_base_rdf_node_type(bt);
31
+ if let Some(cat_encs) = self.cat_map.get(&ct) {
32
+ cat_encs.maybe_decode_string(u)
33
+ } else {
34
+ None
35
+ }
36
+ }
37
+
29
38
  pub fn decode_iri_u32s(&self, us: &[u32], local_cats: Option<LockedCats>) -> Vec<NamedNode> {
30
39
  us.iter()
31
40
  .map(|x| self.decode_iri_u32(x, local_cats.clone()))
@@ -135,7 +144,7 @@ impl Cats {
135
144
  break;
136
145
  }
137
146
  }
138
- Some(Cow::Borrowed(s.expect("Expect all cats to resolve")))
147
+ Some(s.expect("Expect all cats to resolve"))
139
148
  } else {
140
149
  None
141
150
  };
@@ -10,14 +10,14 @@ use std::collections::HashMap;
10
10
  use std::path::Path;
11
11
 
12
12
  impl CatEncs {
13
- pub fn new_empty(path: Option<&Path>) -> CatEncs {
13
+ pub fn new_empty(path: Option<&Path>, bt: &BaseRDFNodeType) -> CatEncs {
14
14
  CatEncs {
15
- maps: CatMaps::new_empty(path),
15
+ maps: CatMaps::new_empty(path, bt),
16
16
  }
17
17
  }
18
18
 
19
- pub fn new_singular(value: &str, u: u32, path: Option<&Path>) -> CatEncs {
20
- let maps = CatMaps::new_singular(value, u, path);
19
+ pub fn new_singular(value: &str, u: u32, path: Option<&Path>, bt: &BaseRDFNodeType) -> CatEncs {
20
+ let maps = CatMaps::new_singular(value, u, path, bt);
21
21
  CatEncs { maps }
22
22
  }
23
23
 
@@ -112,7 +112,7 @@ impl Cats {
112
112
  };
113
113
 
114
114
  let enc = self.get_encs(t).pop();
115
- let mut new_enc = CatEncs::new_empty(path);
115
+ let mut new_enc = CatEncs::new_empty(path, t);
116
116
  let strch = series.str().unwrap();
117
117
  let encoded_global: Vec<_> = strch
118
118
  .iter()
@@ -27,7 +27,8 @@ impl Cats {
27
27
  for ct in cat_triples {
28
28
  let t = CatType::IRI;
29
29
  if !self.cat_map.contains_key(&t) {
30
- self.cat_map.insert(t.clone(), CatEncs::new_empty(path));
30
+ self.cat_map
31
+ .insert(t.clone(), CatEncs::new_empty(path, &BaseRDFNodeType::IRI));
31
32
  }
32
33
  let enc = self.cat_map.get_mut(&t).unwrap();
33
34
  let pred = ct.predicate.as_str().to_string();
@@ -2,7 +2,7 @@ use super::{reencode_solution_mappings, CatEncs, CatType};
2
2
  use super::{CatReEnc, Cats};
3
3
  use crate::cats::LockedCats;
4
4
  use crate::solution_mapping::{BaseCatState, EagerSolutionMappings};
5
- use crate::{BaseRDFNodeType, RDFNodeState};
5
+ use crate::{BaseRDFNodeType, RDFNodeState, LANG_STRING_LANG_FIELD, LANG_STRING_VALUE_FIELD};
6
6
  use nohash_hasher::NoHashHasher;
7
7
  use std::collections::{HashMap, HashSet};
8
8
  use std::hash::BuildHasherDefault;
@@ -21,20 +21,40 @@ impl Cats {
21
21
  let t = sm.rdf_node_types.get(c).unwrap();
22
22
  for (bt, bs) in &t.map {
23
23
  if let BaseCatState::CategoricalNative(_, local) = bs {
24
- let ser = if t.is_multi() {
25
- sm.mappings
24
+ let mut sers = vec![];
25
+ if bt.is_lang_string() {
26
+ let ser1 = sm.mappings
26
27
  .column(c)
27
28
  .unwrap()
28
29
  .struct_()
29
30
  .unwrap()
30
- .field_by_name(&bt.field_col_name())
31
+ .field_by_name(LANG_STRING_VALUE_FIELD)
32
+ .unwrap();
33
+ sers.push(ser1);
34
+ let ser2 = sm.mappings
35
+ .column(c)
36
+ .unwrap()
37
+ .struct_()
38
+ .unwrap()
39
+ .field_by_name(LANG_STRING_LANG_FIELD)
40
+ .unwrap();
41
+ sers.push(ser2);
42
+ } else if t.is_multi() {
43
+ let ser = sm.mappings
44
+ .column(c)
31
45
  .unwrap()
46
+ .struct_()
47
+ .unwrap()
48
+ .field_by_name(&bt.field_col_name())
49
+ .unwrap();
50
+ sers.push(ser);
32
51
  } else {
33
- sm.mappings
52
+ let ser = sm.mappings
34
53
  .column(c)
35
54
  .unwrap()
36
55
  .as_materialized_series()
37
- .clone()
56
+ .clone();
57
+ sers.push(ser);
38
58
  };
39
59
  if !s.contains_key(bt) {
40
60
  s.insert(bt.clone(), HashSet::new());
@@ -48,16 +68,18 @@ impl Cats {
48
68
  None
49
69
  };
50
70
  let ss = s.get_mut(bt).unwrap();
51
- let new_ss = ser
52
- .u32()
53
- .unwrap()
54
- .into_iter()
55
- .filter(|x| x.is_some())
56
- .map(|x| x.unwrap());
57
- if let Some(local_rev_map) = local_rev_map {
58
- ss.extend(new_ss.filter(|x| !local_rev_map.maps.contains_u32(x)));
59
- } else {
60
- ss.extend(new_ss);
71
+ for ser in sers {
72
+ let new_ss = ser
73
+ .u32()
74
+ .unwrap()
75
+ .into_iter()
76
+ .filter(|x| x.is_some())
77
+ .map(|x| x.unwrap());
78
+ if let Some(local_rev_map) = local_rev_map {
79
+ ss.extend(new_ss.filter(|x| !local_rev_map.maps.contains_u32(x)));
80
+ } else {
81
+ ss.extend(new_ss);
82
+ }
61
83
  }
62
84
  }
63
85
  }