hyperstreamdb 0.2.5__tar.gz → 0.2.6__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 (288) hide show
  1. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/Cargo.lock +1 -1
  2. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/Cargo.toml +1 -1
  3. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/PKG-INFO +1 -1
  4. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/cache.rs +16 -1
  5. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/gpu.rs +19 -0
  6. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_ivf.rs +37 -2
  7. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/flatten.rs +8 -11
  8. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/hnswio.rs +24 -39
  9. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/memory.rs +41 -3
  10. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/segment.rs +17 -16
  11. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/telemetry/tracing.rs +17 -4
  12. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/.gitattributes +0 -0
  13. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/.gitignore +0 -0
  14. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/.hypothesis/constants/32b327793848e7d8 +0 -0
  15. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/.hypothesis/constants/67b0a8ccf18bf5d2 +0 -0
  16. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/.hypothesis/constants/84828557b4ee7be4 +0 -0
  17. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/.instructions.md +0 -0
  18. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/CNAME +0 -0
  19. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/DORIS_OPTIMIZATION_PATTERNS.md +0 -0
  20. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/LICENSE-APACHE +0 -0
  21. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/LICENSE-MIT +0 -0
  22. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/README.md +0 -0
  23. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/RUN_COMPLIANCE_TESTS.sh +0 -0
  24. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/STEERING.md +0 -0
  25. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/THIRDPARTY_NOTICES.md +0 -0
  26. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benches/bench_table.rs +0 -0
  27. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benches/performance.rs +0 -0
  28. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/BENCHMARK_REPORT.md +0 -0
  29. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/benchmark_charts.png +0 -0
  30. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/benchmark_results.csv +0 -0
  31. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/concurrent_queries_20260409_214245.json +0 -0
  32. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/concurrent_queries_20260409_214245.md +0 -0
  33. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_search_comparison_20260409_222607.json +0 -0
  34. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_search_comparison_20260409_222607.md +0 -0
  35. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_214355.json +0 -0
  36. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_214355.md +0 -0
  37. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_220418.json +0 -0
  38. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_220418.md +0 -0
  39. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_222053.json +0 -0
  40. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_222053.md +0 -0
  41. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_225907.json +0 -0
  42. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/filtered_vector_search_20260409_225907.md +0 -0
  43. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/full_scan_baseline_20260409_222303.json +0 -0
  44. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/full_scan_baseline_20260409_222303.md +0 -0
  45. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/high_selectivity_filter_20260409_222302.json +0 -0
  46. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/high_selectivity_filter_20260409_222302.md +0 -0
  47. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/ingestion_comparison_20260409_222516.json +0 -0
  48. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/ingestion_comparison_20260409_222516.md +0 -0
  49. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_214428.json +0 -0
  50. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_214428.md +0 -0
  51. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_220450.json +0 -0
  52. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_220450.md +0 -0
  53. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_222131.json +0 -0
  54. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_222131.md +0 -0
  55. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_225938.json +0 -0
  56. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/multi_filter_vector_20260409_225938.md +0 -0
  57. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_214501.json +0 -0
  58. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_214501.md +0 -0
  59. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_220524.json +0 -0
  60. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_220524.md +0 -0
  61. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_222204.json +0 -0
  62. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_222204.md +0 -0
  63. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_230010.json +0 -0
  64. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/post_vs_pre_filter_20260409_230010.md +0 -0
  65. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/query_comparison_20260409_222541.json +0 -0
  66. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/query_comparison_20260409_222541.md +0 -0
  67. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/range_query_20260409_222302.json +0 -0
  68. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/range_query_20260409_222302.md +0 -0
  69. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/search_filtered_high_selectivity_20260409_214144.json +0 -0
  70. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/search_filtered_high_selectivity_20260409_214144.md +0 -0
  71. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/search_unfiltered_20260409_214028.json +0 -0
  72. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/benchmark_results/search_unfiltered_20260409_214028.md +0 -0
  73. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/book.toml +0 -0
  74. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/broken_binaries_all.txt +0 -0
  75. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/broken_bins.txt +0 -0
  76. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/build-connectors.sh +0 -0
  77. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/build.rs +0 -0
  78. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/check_iceberg_compliance.py +0 -0
  79. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/compliance_output.txt +0 -0
  80. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/critical_code_review.md +0 -0
  81. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/debug_log.txt +0 -0
  82. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/demo_basics_run.txt +0 -0
  83. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/demo_basics_v2.txt +0 -0
  84. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docker-compose-minio-nessie.yml +0 -0
  85. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docker-compose.yml +0 -0
  86. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/BENCHMARKING.md +0 -0
  87. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/COMPREHENSIVE_GUIDE.md +0 -0
  88. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/CONCURRENCY.md +0 -0
  89. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/CONFIGURATION.md +0 -0
  90. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/GPU_SETUP_GUIDE.md +0 -0
  91. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/ICEBERG_V2_V3_API.md +0 -0
  92. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/INSTALLATION.md +0 -0
  93. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/PGVECTOR_SQL_GUIDE.md +0 -0
  94. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/PYTHON_VECTOR_API.md +0 -0
  95. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/VECTOR_CONFIGURATION.md +0 -0
  96. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/api_reference.md +0 -0
  97. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/architecture.md +0 -0
  98. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/catalog_usage.md +0 -0
  99. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/index.md +0 -0
  100. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/integrations/README.md +0 -0
  101. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/integrations/java_jni.md +0 -0
  102. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/integrations/python.md +0 -0
  103. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/integrations/spark.md +0 -0
  104. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/integrations/trino.md +0 -0
  105. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/requirements.txt +0 -0
  106. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/source/_static/HyperStreamDB.png +0 -0
  107. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/source/api/python.rst +0 -0
  108. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/source/api/rust.rst +0 -0
  109. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/source/conf.py +0 -0
  110. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/source/index.rst +0 -0
  111. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/docs/source/roadmap.md +0 -0
  112. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/fix_nb.py +0 -0
  113. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/proptest-regressions/core/index/gpu.txt +0 -0
  114. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/proptest-regressions/core/sql/vector_literal.txt +0 -0
  115. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/proptest-regressions/core/sql/vector_udf.txt +0 -0
  116. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/pyproject.toml +0 -0
  117. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/python/hyperstreamdb/__init__.py +0 -0
  118. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/python/hyperstreamdb/embeddings.py +0 -0
  119. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/python_test_output.txt +0 -0
  120. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/python_test_output_v2.txt +0 -0
  121. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/python_test_output_v3.txt +0 -0
  122. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/rust_check_all_warnings.txt +0 -0
  123. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/rust_test_output.txt +0 -0
  124. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/rust_warnings.txt +0 -0
  125. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/scratch/check_os_error.rs +0 -0
  126. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/simd_test_results.txt +0 -0
  127. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/.bloop/bloop.settings.json +0 -0
  128. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/.bloop/spark-hyperstream-test.json +0 -0
  129. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/.bloop/spark-hyperstream.json +0 -0
  130. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/pom.xml +0 -0
  131. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/src/main/java/com/hyperstreamdb/spark/DefaultSource.java +0 -0
  132. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/src/main/java/com/hyperstreamdb/spark/HyperStreamPartition.java +0 -0
  133. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/src/main/java/com/hyperstreamdb/spark/HyperStreamPartitionReader.java +0 -0
  134. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/src/main/java/com/hyperstreamdb/spark/HyperStreamPartitionReaderFactory.java +0 -0
  135. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/src/main/java/com/hyperstreamdb/spark/HyperStreamScanBuilder.java +0 -0
  136. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/spark-hyperstream/src/main/java/com/hyperstreamdb/spark/HyperStreamTable.java +0 -0
  137. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/bin/gateway.rs +0 -0
  138. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/bin/hdb.rs +0 -0
  139. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/bin/iceberg_rest.rs +0 -0
  140. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/bin/probe_datafusion.rs +0 -0
  141. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/bin/setup_test_data.rs +0 -0
  142. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/bin/verify_layered_indexing.rs +0 -0
  143. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/config.rs +0 -0
  144. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/glue.rs +0 -0
  145. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/hive.rs +0 -0
  146. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/jdbc.rs +0 -0
  147. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/mod.rs +0 -0
  148. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/nessie.rs +0 -0
  149. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/rest.rs +0 -0
  150. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/catalog/unity.rs +0 -0
  151. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/clustering.rs +0 -0
  152. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/compaction.rs +0 -0
  153. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/embeddings.rs +0 -0
  154. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/ffi.rs +0 -0
  155. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/iceberg/iceberg_delete.rs +0 -0
  156. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/iceberg.rs +0 -0
  157. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/cosine_distance.cu +0 -0
  158. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/hamming_distance.cu +0 -0
  159. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/inner_product.cu +0 -0
  160. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/jaccard_distance.cu +0 -0
  161. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/kmeans_assignment.cu +0 -0
  162. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/l1_distance.cu +0 -0
  163. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/cuda/l2_distance.cu +0 -0
  164. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/distance.rs +0 -0
  165. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/annhdf5.rs +0 -0
  166. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/api.rs +0 -0
  167. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/dist.rs +0 -0
  168. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/hnsw.rs +0 -0
  169. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/libext.rs +0 -0
  170. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/mod.rs +0 -0
  171. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/prelude.rs +0 -0
  172. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/hnsw_rs/test.rs +0 -0
  173. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/ivf.rs +0 -0
  174. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mod.rs +0 -0
  175. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/cosine_distance.metal +0 -0
  176. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/hamming_distance.metal +0 -0
  177. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/inner_product.metal +0 -0
  178. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/jaccard_distance.metal +0 -0
  179. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/kmeans_assignment.metal +0 -0
  180. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/l1_distance.metal +0 -0
  181. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/mps/l2_distance.metal +0 -0
  182. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/cosine_distance.cl +0 -0
  183. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/hamming_distance.cl +0 -0
  184. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/inner_product.cl +0 -0
  185. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/jaccard_distance.cl +0 -0
  186. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/kmeans_assignment.cl +0 -0
  187. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/l1_distance.cl +0 -0
  188. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/opencl/l2_distance.cl +0 -0
  189. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/pq.rs +0 -0
  190. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/tokenizer.rs +0 -0
  191. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/index/wgpu_kernel.wgsl +0 -0
  192. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/license.rs +0 -0
  193. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/maintenance.rs +0 -0
  194. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/manifest.rs +0 -0
  195. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/merge.rs +0 -0
  196. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/metadata.rs +0 -0
  197. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/mod.rs +0 -0
  198. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/nessie.rs +0 -0
  199. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/planner.rs +0 -0
  200. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/puffin.rs +0 -0
  201. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/query.rs +0 -0
  202. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/reader.rs +0 -0
  203. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/mod.rs +0 -0
  204. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/optimizer.rs +0 -0
  205. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/pgvector_rewriter.rs +0 -0
  206. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/physical_plan/index_join.rs +0 -0
  207. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/physical_plan.rs +0 -0
  208. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/session.rs +0 -0
  209. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/vector_literal.rs +0 -0
  210. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/vector_operators.rs +0 -0
  211. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/sql/vector_udf.rs +0 -0
  212. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/storage.rs +0 -0
  213. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/table/builder.rs +0 -0
  214. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/table/fluent.rs +0 -0
  215. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/table/mod.rs +0 -0
  216. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/table/read.rs +0 -0
  217. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/table/schema.rs +0 -0
  218. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/table/write.rs +0 -0
  219. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/core/wal.rs +0 -0
  220. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/enterprise/continuous_indexing.rs +0 -0
  221. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/enterprise/license.rs +0 -0
  222. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/enterprise/mod.rs +0 -0
  223. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/index.rs.old +0 -0
  224. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/lib.rs +0 -0
  225. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/python_binding.rs +0 -0
  226. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/python_distance.rs +0 -0
  227. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/python_gpu_context.rs +0 -0
  228. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/telemetry/metrics.rs +0 -0
  229. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/src/telemetry/mod.rs +0 -0
  230. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/task.md +0 -0
  231. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/all_types_index_test.rs +0 -0
  232. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/bin/generate_iceberg_manifests.rs +0 -0
  233. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/bin/verify_iceberg_read_check.rs +0 -0
  234. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/check_mmh3.py +0 -0
  235. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/data/download_nyc_taxi.sh +0 -0
  236. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/data/generate_embeddings.py +0 -0
  237. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/data/generate_wikipedia.py +0 -0
  238. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/data/start_nessie.sh +0 -0
  239. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/datafusion_rust_test.rs +0 -0
  240. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/debug_murmur3.rs +0 -0
  241. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/fuzz_murmur3.rs +0 -0
  242. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/integration_test_hnsw_ivf_native.rs +0 -0
  243. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/performance/README.md +0 -0
  244. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/prototype_merge.py +0 -0
  245. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/schema_evolution_test.rs +0 -0
  246. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_catalog_commit.rs +0 -0
  247. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_compliance.rs +0 -0
  248. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_delete_correctness.rs +0 -0
  249. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_iceberg_python_delete.sh +0 -0
  250. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_iceberg_rest.sh +0 -0
  251. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_iceberg_rest_create.sh +0 -0
  252. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_iceberg_rest_delete.sh +0 -0
  253. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_iceberg_rest_remove_index.sh +0 -0
  254. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_iceberg_rest_update.sh +0 -0
  255. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_metadata_creation.rs +0 -0
  256. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_mor_reads.rs +0 -0
  257. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_mor_writes.rs +0 -0
  258. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_partition_transforms.rs +0 -0
  259. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_partitioned_writes.rs +0 -0
  260. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_puffin_index.sh +0 -0
  261. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_rest_updates.sh +0 -0
  262. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/tests/verify_schema_compat.rs +0 -0
  263. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/.DS_Store +0 -0
  264. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/catalog/glue_catalog.properties +0 -0
  265. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/catalog/hyperstreamdb.properties +0 -0
  266. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/catalog/iceberg.properties +0 -0
  267. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/catalog/memory.properties +0 -0
  268. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/catalog/postgres.properties +0 -0
  269. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/config.properties +0 -0
  270. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/entrypoint.sh +0 -0
  271. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/jvm.config +0 -0
  272. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config/node.properties +0 -0
  273. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-config.zip +0 -0
  274. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/pom.xml +0 -0
  275. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBColumnHandle.java +0 -0
  276. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBConnectorFactory.java +0 -0
  277. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBMetadata.java +0 -0
  278. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBPageSource.java +0 -0
  279. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBPageSourceProvider.java +0 -0
  280. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBPlugin.java +0 -0
  281. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBSplit.java +0 -0
  282. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBSplitManager.java +0 -0
  283. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/trino-hyperstream/src/main/java/com/hyperstreamdb/trino/HyperStreamDBTableHandle.java +0 -0
  284. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/update_schema_patch.py +0 -0
  285. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/update_schema_patch2.py +0 -0
  286. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/verify_docstrings.py +0 -0
  287. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/verify_fluent_api.py +0 -0
  288. {hyperstreamdb-0.2.5 → hyperstreamdb-0.2.6}/verify_unified_ingest.py +0 -0
@@ -3375,7 +3375,7 @@ dependencies = [
3375
3375
 
3376
3376
  [[package]]
3377
3377
  name = "hyperstreamdb"
3378
- version = "0.2.5"
3378
+ version = "0.2.6"
3379
3379
  dependencies = [
3380
3380
  "ahash 0.8.12",
3381
3381
  "anyhow",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "hyperstreamdb"
3
- version = "0.2.5"
3
+ version = "0.2.6"
4
4
  edition = "2021"
5
5
  license = "MIT AND Apache-2.0"
6
6
  description = "HyperStreamDB - Serverless Index-Streaming Database with Overlay Indexing and Vector Search"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperstreamdb
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Programming Language :: Rust
@@ -59,7 +59,22 @@ impl DiskCache {
59
59
  }
60
60
 
61
61
  let b = self.store.get(&object_store::path::Path::from(path)).await?.bytes().await?;
62
- let _ = std::fs::write(&cache_path, &b);
62
+
63
+ // Atomic write: write to unique temp file then rename
64
+ let thread_id = format!("{:?}", std::thread::current().id());
65
+ let temp_name = format!("{}.{}.{}.tmp", hash, std::process::id(), thread_id);
66
+ let temp_path = cache_dir.join(temp_name);
67
+
68
+ if let Ok(mut f) = std::fs::File::create(&temp_path) {
69
+ use std::io::Write;
70
+ if f.write_all(&b).is_ok() {
71
+ // rename is atomic on POSIX
72
+ let _ = std::fs::rename(&temp_path, &cache_path);
73
+ } else {
74
+ let _ = std::fs::remove_file(&temp_path);
75
+ }
76
+ }
77
+
63
78
  Ok(b)
64
79
  } else {
65
80
  let res = self.store.get(&object_store::path::Path::from(path)).await
@@ -424,6 +424,25 @@ impl ComputeContext {
424
424
  }
425
425
 
426
426
  pub fn auto_detect() -> Self {
427
+ {
428
+ let read = GLOBAL_GPU_CONTEXT.read().unwrap();
429
+ if let Some(ctx) = &*read {
430
+ return ctx.clone();
431
+ }
432
+ }
433
+
434
+ let mut write = GLOBAL_GPU_CONTEXT.write().unwrap();
435
+ // Check again after acquiring lock
436
+ if let Some(ctx) = &*write {
437
+ return ctx.clone();
438
+ }
439
+
440
+ let ctx = Self::do_auto_detect();
441
+ *write = Some(ctx.clone());
442
+ ctx
443
+ }
444
+
445
+ fn do_auto_detect() -> Self {
427
446
  #[cfg(feature = "cuda")]
428
447
  if let Ok(b) = CudaBackend::new(0) { return Self { backend: ComputeBackend::Cuda, device_id: 0, implementation: Some(Arc::new(b)) }; }
429
448
  #[cfg(all(target_os = "macos", feature = "mps"))]
@@ -645,7 +645,7 @@ impl HnswIvfIndex {
645
645
 
646
646
  let disk_cache = DiskCache::new(store.clone());
647
647
 
648
- let root_path = if base_path.contains("://") {
648
+ let mut root_path = if base_path.contains("://") {
649
649
  if let Ok(url) = url::Url::parse(base_path) {
650
650
  url.path().trim_start_matches('/').to_string()
651
651
  } else {
@@ -655,6 +655,13 @@ impl HnswIvfIndex {
655
655
  base_path.to_string()
656
656
  };
657
657
 
658
+ // Robustness: If the path points to a specific cluster shard or graph file, strip it to get the base
659
+ if let Some(idx) = root_path.find(".cluster_") {
660
+ root_path = root_path[..idx].to_string();
661
+ } else if let Some(idx) = root_path.find(".hnsw.graph") {
662
+ root_path = root_path[..idx].to_string();
663
+ }
664
+
658
665
  let centroids_path = format!("{}.centroids.parquet", root_path);
659
666
  let centroids_bytes = disk_cache.get_bytes(&centroids_path).await?;
660
667
 
@@ -814,7 +821,14 @@ impl HnswIvfIndex {
814
821
  use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
815
822
  use std::fs::File;
816
823
 
817
- let centroids_path = format!("{}.centroids.parquet", base_path);
824
+ let mut base_path_str = base_path.to_string();
825
+ if let Some(idx) = base_path_str.find(".cluster_") {
826
+ base_path_str = base_path_str[..idx].to_string();
827
+ } else if let Some(idx) = base_path_str.find(".hnsw.graph") {
828
+ base_path_str = base_path_str[..idx].to_string();
829
+ }
830
+
831
+ let centroids_path = format!("{}.centroids.parquet", base_path_str);
818
832
  let file = File::open(&centroids_path)?;
819
833
  let builder = ParquetRecordBatchReaderBuilder::try_new(file)?;
820
834
  let reader = builder.build()?;
@@ -991,4 +1005,25 @@ mod tests {
991
1005
  assert!(filter.contains(*id as u32), "Result ID {} was not in the filter!", id);
992
1006
  }
993
1007
  }
1008
+
1009
+ #[test]
1010
+ fn test_hnsw_ivf_path_robustness() {
1011
+ let base_path_str = "/tmp/test_robust";
1012
+
1013
+ let paths = vec![
1014
+ format!("{}.cluster_0.hnsw.graph", base_path_str),
1015
+ format!("{}.cluster_99.hnsw.graph", base_path_str),
1016
+ format!("{}.hnsw.graph", base_path_str),
1017
+ ];
1018
+
1019
+ for p in paths {
1020
+ let mut root = p.clone();
1021
+ if let Some(idx) = root.find(".cluster_") {
1022
+ root = root[..idx].to_string();
1023
+ } else if let Some(idx) = root.find(".hnsw.graph") {
1024
+ root = root[..idx].to_string();
1025
+ }
1026
+ assert_eq!(root, base_path_str, "Failed to strip suffix from {}", p);
1027
+ }
1028
+ }
994
1029
  }
@@ -205,17 +205,15 @@ fn test_dump_reload_graph_flatten() {
205
205
  let neighborhood_before_dump = FlatNeighborhood::from(&hnsw);
206
206
  let nbg_2_before = neighborhood_before_dump.get_neighbours(2).unwrap();
207
207
  println!("voisins du point 2 {:?}", nbg_2_before);
208
- // dump in a file. Must take care of name as tests runs in // !!!
209
- let fname = String::from("dumpreloadtestflat");
210
- let _res = hnsw.file_dump(&fname);
211
- // This will dump in 2 files named dumpreloadtest.hnsw.graph and dumpreloadtest.hnsw.data
212
- //
208
+ // dump in a file. Use tempdir for parallel safety.
209
+ let temp_dir = tempfile::tempdir().unwrap();
210
+ let fname = temp_dir.path().join("dumpreloadtestflat");
211
+ let fname_str = fname.to_str().unwrap().to_string();
212
+ let _res = hnsw.file_dump(&fname_str);
213
+
213
214
  // reload
214
215
  log::debug!("\n\n hnsw reload");
215
- // we will need a procedural macro to get from distance name to its instanciation.
216
- // from now on we test with DistL1
217
- let graphfname = String::from("dumpreloadtestflat.hnsw.graph");
218
- let graphpath = PathBuf::from(graphfname);
216
+ let graphpath = PathBuf::from(format!("{}.hnsw.graph", fname_str));
219
217
  let graphfileres = OpenOptions::new().read(true).open(&graphpath);
220
218
  if graphfileres.is_err() {
221
219
  println!("test_dump_reload: could not open file {:?}", graphpath.as_os_str());
@@ -223,8 +221,7 @@ fn test_dump_reload_graph_flatten() {
223
221
  }
224
222
  let graphfile = graphfileres.unwrap();
225
223
  //
226
- let datafname = String::from("dumpreloadtestflat.hnsw.data");
227
- let datapath = PathBuf::from(datafname);
224
+ let datapath = PathBuf::from(format!("{}.hnsw.data", fname_str));
228
225
  let datafileres = OpenOptions::new().read(true).open(&datapath);
229
226
  if datafileres.is_err() {
230
227
  println!("test_dump_reload : could not open file {:?}", datapath.as_os_str());
@@ -783,19 +783,15 @@ fn test_dump_reload_1() {
783
783
  for i in 0..data.len() {
784
784
  hnsw.insert((&data[i], i));
785
785
  }
786
- // some loggin info
787
- hnsw.dump_layer_info();
788
- // dump in a file. Must take care of name as tests runs in // !!!
789
- let fname = String::from("dumpreloadtest1");
790
- let _res = hnsw.file_dump(&fname);
791
- // This will dump in 2 files named dumpreloadtest.hnsw.graph and dumpreloadtest.hnsw.data
792
- //
786
+ // dump in a file. Use tempdir for parallel safety.
787
+ let temp_dir = tempfile::tempdir().unwrap();
788
+ let fname = temp_dir.path().join("dumpreloadtest1");
789
+ let fname_str = fname.to_str().unwrap().to_string();
790
+ let _res = hnsw.file_dump(&fname_str);
791
+
793
792
  // reload
794
793
  log::debug!("\n\n hnsw reload");
795
- // we will need a procedural macro to get from distance name to its instanciation.
796
- // from now on we test with DistL1
797
- let graphfname = String::from("dumpreloadtest1.hnsw.graph");
798
- let graphpath = PathBuf::from(graphfname);
794
+ let graphpath = PathBuf::from(format!("{}.hnsw.graph", fname_str));
799
795
  let graphfileres = OpenOptions::new().read(true).open(&graphpath);
800
796
  if graphfileres.is_err() {
801
797
  println!("test_dump_reload: could not open file {:?}", graphpath.as_os_str());
@@ -803,8 +799,7 @@ fn test_dump_reload_1() {
803
799
  }
804
800
  let graphfile = graphfileres.unwrap();
805
801
  //
806
- let datafname = String::from("dumpreloadtest1.hnsw.data");
807
- let datapath = PathBuf::from(datafname);
802
+ let datapath = PathBuf::from(format!("{}.hnsw.data", fname_str));
808
803
  let datafileres = OpenOptions::new().read(true).open(&datapath);
809
804
  if datafileres.is_err() {
810
805
  println!("test_dump_reload : could not open file {:?}", datapath.as_os_str());
@@ -852,19 +847,15 @@ fn test_dump_reload_myfn() {
852
847
  for i in 0..data.len() {
853
848
  hnsw.insert((&data[i], i));
854
849
  }
855
- // some loggin info
856
- hnsw.dump_layer_info();
857
- // dump in a file. Must take care of name as tests runs in // !!!
858
- let fname = String::from("dumpreloadtest_myfn");
859
- let _res = hnsw.file_dump(&fname);
860
- // This will dump in 2 files named dumpreloadtest.hnsw.graph and dumpreloadtest.hnsw.data
861
- //
850
+ // dump in a file. Use tempdir for parallel safety.
851
+ let temp_dir = tempfile::tempdir().unwrap();
852
+ let fname = temp_dir.path().join("dumpreloadtest_myfn");
853
+ let fname_str = fname.to_str().unwrap().to_string();
854
+ let _res = hnsw.file_dump(&fname_str);
855
+
862
856
  // reload
863
857
  log::debug!("\n\n hnsw reload");
864
- // we will need a procedural macro to get from distance name to its instanciation.
865
- // from now on we test with DistL1
866
- let graphfname = String::from("dumpreloadtest_myfn.hnsw.graph");
867
- let graphpath = PathBuf::from(graphfname);
858
+ let graphpath = PathBuf::from(format!("{}.hnsw.graph", fname_str));
868
859
  let graphfileres = OpenOptions::new().read(true).open(&graphpath);
869
860
  if graphfileres.is_err() {
870
861
  println!("test_dump_reload: could not open file {:?}", graphpath.as_os_str());
@@ -872,8 +863,7 @@ fn test_dump_reload_myfn() {
872
863
  }
873
864
  let graphfile = graphfileres.unwrap();
874
865
  //
875
- let datafname = String::from("dumpreloadtest_myfn.hnsw.data");
876
- let datapath = PathBuf::from(datafname);
866
+ let datapath = PathBuf::from(format!("{}.hnsw.data", fname_str));
877
867
  let datafileres = OpenOptions::new().read(true).open(&datapath);
878
868
  if datafileres.is_err() {
879
869
  println!("test_dump_reload : could not open file {:?}", datapath.as_os_str());
@@ -918,19 +908,15 @@ fn test_dump_reload_graph_only() {
918
908
  for i in 0..data.len() {
919
909
  hnsw.insert((&data[i], i));
920
910
  }
921
- // some loggin info
922
- hnsw.dump_layer_info();
923
- // dump in a file. Must take care of name as tests runs in // !!!
924
- let fname = String::from("dumpreloadtestgraph");
925
- let _res = hnsw.file_dump(&fname);
926
- // This will dump in 2 files named dumpreloadtest.hnsw.graph and dumpreloadtest.hnsw.data
927
- //
911
+ // dump in a file. Use tempdir for parallel safety.
912
+ let temp_dir = tempfile::tempdir().unwrap();
913
+ let fname = temp_dir.path().join("dumpreloadtestgraph");
914
+ let fname_str = fname.to_str().unwrap().to_string();
915
+ let _res = hnsw.file_dump(&fname_str);
916
+
928
917
  // reload
929
918
  log::debug!("\n\n hnsw reload");
930
- // we will need a procedural macro to get from distance name to its instanciation.
931
- // from now on we test with DistL1
932
- let graphfname = String::from("dumpreloadtestgraph.hnsw.graph");
933
- let graphpath = PathBuf::from(graphfname);
919
+ let graphpath = PathBuf::from(format!("{}.hnsw.graph", fname_str));
934
920
  let graphfileres = OpenOptions::new().read(true).open(&graphpath);
935
921
  if graphfileres.is_err() {
936
922
  println!("test_dump_reload: could not open file {:?}", graphpath.as_os_str());
@@ -938,8 +924,7 @@ fn test_dump_reload_graph_only() {
938
924
  }
939
925
  let graphfile = graphfileres.unwrap();
940
926
  //
941
- let datafname = String::from("dumpreloadtestgraph.hnsw.data");
942
- let datapath = PathBuf::from(datafname);
927
+ let datapath = PathBuf::from(format!("{}.hnsw.data", fname_str));
943
928
  let datafileres = OpenOptions::new().read(true).open(&datapath);
944
929
  if datafileres.is_err() {
945
930
  println!("test_dump_reload : could not open file {:?}", datapath.as_os_str());
@@ -125,13 +125,16 @@ impl InMemoryVectorIndex {
125
125
  let values = fsl.values().as_any().downcast_ref::<Float32Array>()
126
126
  .context("Expected Float32Array values in FixedSizeListArray")?;
127
127
 
128
- // Bulk extend for high performance
129
- self.vectors.extend_from_slice(values.values());
128
+ // Respect slicing: only copy the range of the value array that belongs to this FSL slice
129
+ let start_offset = fsl.offset() * self.dim;
130
+ let len = fsl.len() * self.dim;
131
+ let slice = &values.values()[start_offset..start_offset + len];
132
+
133
+ self.vectors.extend_from_slice(slice);
130
134
  self.count += fsl.len();
131
135
  } else if let Some(list) = col.as_any().downcast_ref::<ListArray>() {
132
136
  for i in 0..list.len() {
133
137
  if list.is_null(i) {
134
- // Fill with zeros to maintain alignment or handle nulls
135
138
  self.vectors.extend(std::iter::repeat_n(0.0, self.dim));
136
139
  } else {
137
140
  let vector_array = list.value(i);
@@ -244,4 +247,39 @@ mod tests {
244
247
  assert_eq!(results[0].0, 0); // v1 is closest
245
248
  assert_eq!(results[1].0, 1); // v2 is second closest
246
249
  }
250
+
251
+ #[test]
252
+ fn test_memory_index_sliced_array() {
253
+ let dim = 4;
254
+ let mut index = InMemoryVectorIndex::new(dim);
255
+
256
+ let schema = Arc::new(Schema::new(vec![
257
+ Field::new("vec", DataType::FixedSizeList(
258
+ Arc::new(Field::new("item", DataType::Float32, true)),
259
+ dim as i32
260
+ ), true),
261
+ ]));
262
+
263
+ let v1 = vec![Some(1.0), Some(0.0), Some(0.0), Some(0.0)];
264
+ let v2 = vec![Some(0.0), Some(1.0), Some(0.0), Some(0.0)];
265
+ let v3 = vec![Some(0.0), Some(0.0), Some(1.0), Some(0.0)];
266
+
267
+ let array = FixedSizeListArray::from_iter_primitive::<Float32Type, _, _>(
268
+ vec![Some(v1), Some(v2.clone()), Some(v3)],
269
+ dim as i32
270
+ );
271
+
272
+ // Slice the array to only include v2
273
+ let sliced_array = array.slice(1, 1);
274
+ let batch = RecordBatch::try_new(schema, vec![Arc::new(sliced_array)]).unwrap();
275
+ index.insert_batch(&batch, "vec", 0).unwrap();
276
+
277
+ assert_eq!(index.count, 1);
278
+ assert_eq!(index.vectors.len(), dim);
279
+
280
+ let query = crate::core::index::VectorValue::Float32(v2.into_iter().map(|x| x.unwrap()).collect());
281
+ let results = index.search(&query, 1, None);
282
+ assert_eq!(results.len(), 1);
283
+ assert_eq!(results[0].1, 0.0); // Exact match
284
+ }
247
285
  }
@@ -105,22 +105,23 @@ impl HybridSegmentWriter {
105
105
  offset: None,
106
106
  length: None,
107
107
  });
108
- } else if filename.contains(".hnsw.") {
109
- // Vector Index
110
- let parts: Vec<&str> = filename.split('.').collect();
111
- let col = parts.get(1).map(|s| s.to_string());
112
-
113
- if (filename.ends_with(".hnsw.graph") || filename.ends_with(".centroids.parquet"))
114
- && !index_files.iter().any(|idx| idx.column_name == col && idx.index_type == "vector") {
115
- index_files.push(crate::core::manifest::IndexFile {
116
- file_path: filename.clone(),
117
- index_type: "vector".to_string(),
118
- column_name: col,
119
- blob_type: None,
120
- offset: None,
121
- length: None,
122
- });
123
- }
108
+ } else if filename.contains(".hnsw.") || filename.ends_with(".centroids.parquet") {
109
+ // Vector Index
110
+ let col_opt = filename.split('.').nth(1).map(|s| s.to_string());
111
+
112
+ if let Some(col) = col_opt {
113
+ if !index_files.iter().any(|idx| idx.column_name.as_ref() == Some(&col) && idx.index_type == "vector") {
114
+ let base_path = format!("{}.{}", self.config.segment_id, col);
115
+ index_files.push(crate::core::manifest::IndexFile {
116
+ file_path: base_path,
117
+ index_type: "vector".to_string(),
118
+ column_name: Some(col),
119
+ blob_type: None,
120
+ offset: None,
121
+ length: None,
122
+ });
123
+ }
124
+ }
124
125
  }
125
126
  }
126
127
 
@@ -15,15 +15,28 @@ impl<S: Subscriber> Layer<S> for ReloadableFilter {
15
15
  fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool {
16
16
  self.filter.read().unwrap().enabled(metadata, ctx)
17
17
  }
18
-
19
- fn on_event(&self, event: &tracing::Event<'_>, ctx: Context<'_, S>) {
20
- self.filter.read().unwrap().on_event(event, ctx);
21
- }
22
18
  }
23
19
 
24
20
  static SHARED_FILTER: once_cell::sync::OnceCell<Arc<RwLock<EnvFilter>>> = once_cell::sync::OnceCell::new();
21
+ static INIT: std::sync::Once = std::sync::Once::new();
25
22
 
26
23
  pub fn init_tracing(service_name: &str) -> Result<(), Box<dyn std::error::Error>> {
24
+ let mut init_err: Option<Box<dyn std::error::Error>> = None;
25
+
26
+ INIT.call_once(|| {
27
+ if let Err(e) = do_init_tracing(service_name) {
28
+ init_err = Some(e);
29
+ }
30
+ });
31
+
32
+ if let Some(e) = init_err {
33
+ return Err(e);
34
+ }
35
+
36
+ Ok(())
37
+ }
38
+
39
+ fn do_init_tracing(service_name: &str) -> Result<(), Box<dyn std::error::Error>> {
27
40
  global::set_text_map_propagator(TraceContextPropagator::new());
28
41
 
29
42
  let base_filter = EnvFilter::from_default_env();
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes