vastdb 2.0.7__tar.gz → 2.0.8__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 (236) hide show
  1. {vastdb-2.0.7 → vastdb-2.0.8}/CHANGELOG.md +6 -0
  2. {vastdb-2.0.7 → vastdb-2.0.8}/PKG-INFO +2 -1
  3. {vastdb-2.0.7 → vastdb-2.0.8}/requirements.txt +1 -0
  4. {vastdb-2.0.7 → vastdb-2.0.8}/setup.py +1 -1
  5. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/_internal.py +3 -3
  6. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/schema.py +12 -2
  7. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/table.py +2 -3
  8. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/table_metadata.py +7 -7
  9. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_tables.py +63 -0
  10. vastdb-2.0.8/vastdb/tests/test_vector_index.py +324 -0
  11. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb.egg-info/PKG-INFO +2 -1
  12. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb.egg-info/requires.txt +1 -0
  13. vastdb-2.0.7/vastdb/tests/test_vector_index.py +0 -162
  14. {vastdb-2.0.7 → vastdb-2.0.8}/CONTRIBUTING.md +0 -0
  15. {vastdb-2.0.7 → vastdb-2.0.8}/LICENSE +0 -0
  16. {vastdb-2.0.7 → vastdb-2.0.8}/MANIFEST.in +0 -0
  17. {vastdb-2.0.7 → vastdb-2.0.8}/README.md +0 -0
  18. {vastdb-2.0.7 → vastdb-2.0.8}/setup.cfg +0 -0
  19. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/__init__.py +0 -0
  20. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/_adbc.py +0 -0
  21. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/_ibis_support.py +0 -0
  22. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/_table_interface.py +0 -0
  23. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/__init__.py +0 -0
  24. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/__init__.py +0 -0
  25. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/bench_repo/__init__.py +0 -0
  26. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/bench_repo/mega_combo.py +0 -0
  27. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/cli.py +0 -0
  28. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/common/__init__.py +0 -0
  29. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/common/constants.py +0 -0
  30. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/common/log_utils.py +0 -0
  31. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/common/types.py +0 -0
  32. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/common/utils.py +0 -0
  33. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/dataset/__init__.py +0 -0
  34. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/dataset/generate_secmaster.py +0 -0
  35. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/dataset/generate_stocks_dataset.py +0 -0
  36. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/dataset/schemas.py +0 -0
  37. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/dataset/secmaster.py +0 -0
  38. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/orchestrate/__init__.py +0 -0
  39. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/orchestrate/bench_spec.py +0 -0
  40. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/orchestrate/results_helpers.py +0 -0
  41. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/orchestrate/scenario.py +0 -0
  42. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/orchestrate/scenario_generator.py +0 -0
  43. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/query/__init__.py +0 -0
  44. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/query/arrow_common.py +0 -0
  45. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/query/query.py +0 -0
  46. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/query/query_pyarrow.py +0 -0
  47. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/query/query_vastdb.py +0 -0
  48. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/perf_bench/run.py +0 -0
  49. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/test_perf.py +0 -0
  50. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bench/test_sample.py +0 -0
  51. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/bucket.py +0 -0
  52. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/config.py +0 -0
  53. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/conftest.py +0 -0
  54. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/errors.py +0 -0
  55. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/features.py +0 -0
  56. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/session.py +0 -0
  57. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/__init__.py +0 -0
  58. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/metrics.py +0 -0
  59. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_adbc_integration.py +0 -0
  60. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_duckdb.py +0 -0
  61. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_fixed_list.py +0 -0
  62. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_imports.py +0 -0
  63. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_nested.py +0 -0
  64. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_projections.py +0 -0
  65. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_sanity.py +0 -0
  66. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_schemas.py +0 -0
  67. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_table_in_tx.py +0 -0
  68. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_util.py +0 -0
  69. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/test_vector_search.py +0 -0
  70. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/tests/util.py +0 -0
  71. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/transaction.py +0 -0
  72. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/util.py +0 -0
  73. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/__init__.py +0 -0
  74. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/__init__.py +0 -0
  75. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/__init__.py +0 -0
  76. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/__init__.py +0 -0
  77. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/__init__.py +0 -0
  78. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Aggregate.py +0 -0
  79. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ArraySlice.py +0 -0
  80. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ArraySubscript.py +0 -0
  81. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/BinaryLiteral.py +0 -0
  82. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/BooleanLiteral.py +0 -0
  83. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Bound.py +0 -0
  84. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Call.py +0 -0
  85. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/CaseFragment.py +0 -0
  86. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Cast.py +0 -0
  87. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ConcreteBoundImpl.py +0 -0
  88. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ConditionalCase.py +0 -0
  89. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/CurrentRow.py +0 -0
  90. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/DateLiteral.py +0 -0
  91. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/DecimalLiteral.py +0 -0
  92. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Deref.py +0 -0
  93. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/DurationLiteral.py +0 -0
  94. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Expression.py +0 -0
  95. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ExpressionImpl.py +0 -0
  96. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/FieldIndex.py +0 -0
  97. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/FieldRef.py +0 -0
  98. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Filter.py +0 -0
  99. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/FixedSizeBinaryLiteral.py +0 -0
  100. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Float16Literal.py +0 -0
  101. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Float32Literal.py +0 -0
  102. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Float64Literal.py +0 -0
  103. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Following.py +0 -0
  104. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Frame.py +0 -0
  105. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Grouping.py +0 -0
  106. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int16Literal.py +0 -0
  107. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int32Literal.py +0 -0
  108. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int64Literal.py +0 -0
  109. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int8Literal.py +0 -0
  110. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteral.py +0 -0
  111. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteralDaysMilliseconds.py +0 -0
  112. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteralImpl.py +0 -0
  113. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteralMonths.py +0 -0
  114. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Join.py +0 -0
  115. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/JoinKind.py +0 -0
  116. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/KeyValue.py +0 -0
  117. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Limit.py +0 -0
  118. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ListLiteral.py +0 -0
  119. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Literal.py +0 -0
  120. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/LiteralColumn.py +0 -0
  121. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/LiteralImpl.py +0 -0
  122. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/LiteralRelation.py +0 -0
  123. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/MapKey.py +0 -0
  124. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/MapLiteral.py +0 -0
  125. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/OrderBy.py +0 -0
  126. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Ordering.py +0 -0
  127. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Plan.py +0 -0
  128. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Preceding.py +0 -0
  129. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Project.py +0 -0
  130. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/RelId.py +0 -0
  131. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Relation.py +0 -0
  132. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/RelationImpl.py +0 -0
  133. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SetOpKind.py +0 -0
  134. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SetOperation.py +0 -0
  135. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SimpleCase.py +0 -0
  136. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SortKey.py +0 -0
  137. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Source.py +0 -0
  138. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/StringLiteral.py +0 -0
  139. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/StructField.py +0 -0
  140. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/StructLiteral.py +0 -0
  141. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/TimeLiteral.py +0 -0
  142. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/TimestampLiteral.py +0 -0
  143. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt16Literal.py +0 -0
  144. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt32Literal.py +0 -0
  145. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt64Literal.py +0 -0
  146. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt8Literal.py +0 -0
  147. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Unbounded.py +0 -0
  148. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/WindowCall.py +0 -0
  149. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/computeir/flatbuf/__init__.py +0 -0
  150. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Binary.py +0 -0
  151. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Block.py +0 -0
  152. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/BodyCompression.py +0 -0
  153. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/BodyCompressionMethod.py +0 -0
  154. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Bool.py +0 -0
  155. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Buffer.py +0 -0
  156. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/CompressionType.py +0 -0
  157. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Date.py +0 -0
  158. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/DateUnit.py +0 -0
  159. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Decimal.py +0 -0
  160. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/DictionaryBatch.py +0 -0
  161. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/DictionaryEncoding.py +0 -0
  162. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/DictionaryKind.py +0 -0
  163. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Duration.py +0 -0
  164. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Endianness.py +0 -0
  165. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Feature.py +0 -0
  166. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Field.py +0 -0
  167. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/FieldNode.py +0 -0
  168. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/FixedSizeBinary.py +0 -0
  169. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/FixedSizeList.py +0 -0
  170. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/FloatingPoint.py +0 -0
  171. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Footer.py +0 -0
  172. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Int.py +0 -0
  173. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Interval.py +0 -0
  174. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/IntervalUnit.py +0 -0
  175. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/KeyValue.py +0 -0
  176. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/LargeBinary.py +0 -0
  177. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/LargeList.py +0 -0
  178. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/LargeUtf8.py +0 -0
  179. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/List.py +0 -0
  180. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Map.py +0 -0
  181. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Message.py +0 -0
  182. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/MessageHeader.py +0 -0
  183. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/MetadataVersion.py +0 -0
  184. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Null.py +0 -0
  185. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Precision.py +0 -0
  186. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/RecordBatch.py +0 -0
  187. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Schema.py +0 -0
  188. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/SparseMatrixCompressedAxis.py +0 -0
  189. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/SparseMatrixIndexCSX.py +0 -0
  190. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensor.py +0 -0
  191. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensorIndex.py +0 -0
  192. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensorIndexCOO.py +0 -0
  193. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensorIndexCSF.py +0 -0
  194. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Struct_.py +0 -0
  195. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Tensor.py +0 -0
  196. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/TensorDim.py +0 -0
  197. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Time.py +0 -0
  198. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/TimeUnit.py +0 -0
  199. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Timestamp.py +0 -0
  200. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Type.py +0 -0
  201. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Union.py +0 -0
  202. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/UnionMode.py +0 -0
  203. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/Utf8.py +0 -0
  204. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/org/apache/arrow/flatbuf/__init__.py +0 -0
  205. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/AlterColumnRequest.py +0 -0
  206. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/AlterProjectionTableRequest.py +0 -0
  207. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/AlterSchemaRequest.py +0 -0
  208. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/AlterTableRequest.py +0 -0
  209. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/Column.py +0 -0
  210. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ColumnDetails.py +0 -0
  211. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ColumnType.py +0 -0
  212. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/CreateProjectionRequest.py +0 -0
  213. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/CreateSchemaRequest.py +0 -0
  214. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/CreateViewRequest.py +0 -0
  215. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/FilterString.py +0 -0
  216. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/GetProjectionTableStatsResponse.py +0 -0
  217. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/GetRowColumnSecurityResponse.py +0 -0
  218. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/GetTableStatsResponse.py +0 -0
  219. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ImportDataRequest.py +0 -0
  220. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/KeyName.py +0 -0
  221. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ListProjectionsResponse.py +0 -0
  222. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ListSchemasResponse.py +0 -0
  223. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ListTablesResponse.py +0 -0
  224. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ListViewsResponse.py +0 -0
  225. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/NameString.py +0 -0
  226. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/ObjectDetails.py +0 -0
  227. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/S3File.py +0 -0
  228. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/VectorIndexMetadata.py +0 -0
  229. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/VipRange.py +0 -0
  230. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_flatbuf/tabular/__init__.py +0 -0
  231. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_tests/__init__.py +0 -0
  232. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_tests/test_ha.py +0 -0
  233. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb/vast_tests/test_scale.py +0 -0
  234. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb.egg-info/SOURCES.txt +0 -0
  235. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb.egg-info/dependency_links.txt +0 -0
  236. {vastdb-2.0.7 → vastdb-2.0.8}/vastdb.egg-info/top_level.txt +0 -0
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
 
7
+ ## [2.0.8] (2026-01-21)
8
+ [2.0.8]: https://github.com/vast-data/vastdb_sdk/compare/v2.0.7...v2.0.8
9
+
10
+ ### Changed
11
+ - populate _metadata._vector_index from list_tables response.
12
+
7
13
  ## [2.0.7] (2026-01-19)
8
14
  [2.0.7]: https://github.com/vast-data/vastdb_sdk/compare/v2.0.5...v2.0.6
9
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vastdb
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: VAST Data SDK
5
5
  Home-page: https://github.com/vast-data/vastdb_sdk
6
6
  Author: VAST DATA
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: aws-requests-auth
22
22
  Requires-Dist: ibis-framework~=10.1
23
+ Requires-Dist: sqlglot<28.7,>=23.4
23
24
  Requires-Dist: pyarrow~=18.0
24
25
  Requires-Dist: pyarrow-hotfix==0.7
25
26
  Requires-Dist: flatbuffers
@@ -1,5 +1,6 @@
1
1
  aws-requests-auth
2
2
  ibis-framework~=10.1
3
+ sqlglot>=23.4,<28.7
3
4
  pyarrow~=18.0
4
5
  pyarrow-hotfix==0.7
5
6
  flatbuffers
@@ -29,7 +29,7 @@ setup(
29
29
  name='vastdb',
30
30
  python_requires='>=3.10.0',
31
31
  description='VAST Data SDK',
32
- version='2.0.7' + suffix,
32
+ version='2.0.8' + suffix,
33
33
  url='https://github.com/vast-data/vastdb_sdk',
34
34
  author='VAST DATA',
35
35
  author_email='hello@vastdata.com',
@@ -808,9 +808,9 @@ def _parse_table_info(obj, parse_properties):
808
808
  sorting_done = bool(sorting_score_raw >> 63)
809
809
 
810
810
  vector_index_enabled = obj.VectorIndexEnabled() if hasattr(obj, 'VectorIndexEnabled') else False
811
- vector_index_column_name = obj.VectorIndexColumnName().decode() if hasattr(obj, 'VectorIndexColumnName') and obj.VectorIndexColumnName() else None
812
- vector_index_distance_metric = obj.VectorIndexDistanceMetric().decode() if hasattr(obj, 'VectorIndexDistanceMetric') and obj.VectorIndexDistanceMetric() else None
813
- vector_index_sql_function_name = obj.VectorIndexSqlFunctionName().decode() if hasattr(obj, 'VectorIndexSqlFunctionName') and obj.VectorIndexSqlFunctionName() else None
811
+ vector_index_column_name = obj.VectorIndexColumnName().decode() if hasattr(obj, 'VectorIndexColumnName') and obj.VectorIndexColumnName() else ""
812
+ vector_index_distance_metric = obj.VectorIndexDistanceMetric().decode() if hasattr(obj, 'VectorIndexDistanceMetric') and obj.VectorIndexDistanceMetric() else ""
813
+ vector_index_sql_function_name = obj.VectorIndexSqlFunctionName().decode() if hasattr(obj, 'VectorIndexSqlFunctionName') and obj.VectorIndexSqlFunctionName() else ""
814
814
 
815
815
  return TableInfo(name, properties, handle, num_rows, used_bytes, num_partitions, sorting_key_enabled,
816
816
  sorting_score, write_amplification, acummulative_row_insertion_count, sorting_done,
@@ -14,7 +14,7 @@ from vastdb.table_metadata import TableMetadata, TableRef, TableType
14
14
 
15
15
  from . import bucket, errors, schema, table
16
16
  from ._ibis_support import validate_ibis_support_schema
17
- from ._internal import VectorIndexSpec
17
+ from ._internal import VectorIndex, VectorIndexSpec
18
18
 
19
19
  if TYPE_CHECKING:
20
20
  from .table import Table
@@ -178,7 +178,17 @@ def _parse_table_info(table_info, schema: "schema.Schema"):
178
178
  table=table_info.name)
179
179
 
180
180
  table_type = TableType.Elysium if table_info.sorting_key_enabled else TableType.Regular
181
- table_metadata = TableMetadata(ref, table_type=table_type)
181
+
182
+ # populate vector_index from list_tables if vector index is enabled
183
+ vector_index = None
184
+ if table_info.vector_index_enabled:
185
+ vector_index = VectorIndex(
186
+ column=table_info.vector_index_column_name,
187
+ distance_metric=table_info.vector_index_distance_metric,
188
+ sql_distance_function=table_info.vector_index_sql_function_name
189
+ )
190
+
191
+ table_metadata = TableMetadata(ref, table_type=table_type, vector_index=vector_index)
182
192
 
183
193
  return table.Table(handle=int(table_info.handle),
184
194
  metadata=table_metadata,
@@ -824,9 +824,8 @@ class TableInTransaction(ITable):
824
824
 
825
825
  Both Elysium and Vector Index tables use global row IDs.
826
826
  """
827
- # check if table has vector index from loaded stats
828
- has_vector_index = (self._metadata.stats is not None and
829
- self._metadata.stats.vector_index is not None)
827
+ # _vector_index is set from list_tables or synced from stats.vector_index by _parse_stats_vector_index()
828
+ has_vector_index = self._metadata._vector_index is not None
830
829
  return self._is_sorted_table or has_vector_index
831
830
 
832
831
  def vector_search(
@@ -173,14 +173,14 @@ class TableMetadata:
173
173
  self._parse_stats_vector_index()
174
174
 
175
175
  def _parse_stats_vector_index(self):
176
- vector_index_is_set = self._vector_index is not None
176
+ if self._vector_index is not None and self._stats.vector_index != self._vector_index:
177
+ is_empty_placeholder = not self._vector_index.column and not self._vector_index.distance_metric
178
+ if not is_empty_placeholder:
179
+ raise ValueError(
180
+ f"Table has index {self._stats.vector_index}, but was initialized as {self._vector_index}"
181
+ )
177
182
 
178
- if vector_index_is_set and self._stats.vector_index != self._vector_index:
179
- raise ValueError(
180
- f"Table has index {self._stats.vector_index}, but was initialized as {self._vector_index}"
181
- )
182
- else:
183
- self._vector_index = self._stats.vector_index
183
+ self._vector_index = self._stats.vector_index
184
184
 
185
185
  def _set_sorted_table(self, tx: "Transaction"):
186
186
  self._table_type = TableType.Elysium
@@ -9,6 +9,7 @@ from contextlib import closing
9
9
  from tempfile import NamedTemporaryFile
10
10
 
11
11
  import ibis
12
+ import numpy as np
12
13
  import pandas as pd
13
14
  import pyarrow as pa
14
15
  import pyarrow.compute as pc
@@ -390,6 +391,7 @@ def test_types(session, clean_bucket_name):
390
391
  ('a2', pa.int16()),
391
392
  ('a4', pa.int64()),
392
393
  ('b', pa.float32()),
394
+ ('f16', pa.float16()),
393
395
  ('s', pa.string()),
394
396
  ('d', pa.decimal128(7, 3)),
395
397
  ('bin', pa.binary()),
@@ -410,6 +412,7 @@ def test_types(session, clean_bucket_name):
410
412
  [1999, 2000, 2001],
411
413
  [11122221, 222111122, 333333],
412
414
  [0.5, 1.5, 2.5],
415
+ [np.float16(0.5), np.float16(1.5), np.float16(2.5)],
413
416
  ["a", "v", "s"],
414
417
  [decimal.Decimal('110.52'), decimal.Decimal('231.15'), decimal.Decimal('3332.44')],
415
418
  [b"\x01\x02", b"\x01\x05", b"\x01\x07"],
@@ -436,6 +439,13 @@ def test_types(session, clean_bucket_name):
436
439
  assert select(t['a2'] == 2000) == expected.filter(pc.field('a2') == 2000)
437
440
  assert select(t['a4'] == 222111122) == expected.filter(pc.field('a4') == 222111122)
438
441
  assert select(t['b'] == 1.5) == expected.filter(pc.field('b') == 1.5)
442
+
443
+ # Test float16 predicate (PyArrow compute doesn't support float16, so validate manually)
444
+ f16_literal = np.float16(1.5)
445
+ result = select(t['f16'] == f16_literal)
446
+ assert len(result) == 1, f"Expected 1 row for f16==1.5, got {len(result)}"
447
+ assert np.float16(result.column('f16')[0].as_py()) == f16_literal
448
+
439
449
  assert select(t['s'] == "v") == expected.filter(pc.field('s') == "v")
440
450
  assert select(t['d'] == 231.15) == expected.filter(pc.field('d') == 231.15)
441
451
  assert select(t['bin'] == b"\x01\x02") == expected.filter(pc.field('bin') == b"\x01\x02")
@@ -468,6 +478,59 @@ def test_types(session, clean_bucket_name):
468
478
  assert select(t['ts9'] == ts_literal) == expected.filter(pc.field('ts9') == ts_literal)
469
479
 
470
480
 
481
+ @pytest.mark.parametrize("element_type,test_name", [
482
+ (pa.float32(), "float32"),
483
+ (pa.float16(), "float16"),
484
+ ])
485
+ def test_vector_types(session, clean_bucket_name, element_type, test_name):
486
+ """Test vector (fixed-size list) columns with different element types."""
487
+ vector_dim = 3
488
+ vec_type = pa.list_(pa.field('', element_type, False), vector_dim)
489
+
490
+ columns = pa.schema([
491
+ ('id', pa.int32()),
492
+ ('vector', vec_type),
493
+ ])
494
+
495
+ # Create test data based on element type
496
+ if element_type == pa.float16():
497
+ test_vectors = [
498
+ [np.float16(1.0), np.float16(2.0), np.float16(3.0)],
499
+ [np.float16(4.5), np.float16(5.5), np.float16(6.5)],
500
+ [np.float16(-1.0), np.float16(0.0), np.float16(1.0)],
501
+ ]
502
+ else: # float32
503
+ test_vectors = [
504
+ [1.0, 2.0, 3.0],
505
+ [4.5, 5.5, 6.5],
506
+ [-1.0, 0.0, 1.0],
507
+ ]
508
+
509
+ expected = pa.table(schema=columns, data=[
510
+ [0, 1, 2],
511
+ test_vectors,
512
+ ])
513
+
514
+ with prepare_data(session, clean_bucket_name, 's', 't', expected) as table:
515
+ # Read back and verify
516
+ actual = table.select().read_all()
517
+ assert actual.schema == columns
518
+ assert len(actual) == 3
519
+
520
+ # Verify vector data
521
+ actual_vectors = actual.column('vector').to_pylist()
522
+ for i, (actual_vec, expected_vec) in enumerate(zip(actual_vectors, test_vectors)):
523
+ assert len(actual_vec) == vector_dim, f"Wrong vector dimension at row {i}"
524
+ for j, (act, exp) in enumerate(zip(actual_vec, expected_vec)):
525
+ if element_type == pa.float16():
526
+ assert np.float16(act) == np.float16(exp), \
527
+ f"Mismatch at row {i}, element {j}: {act} != {exp}"
528
+ else:
529
+ assert act == exp, f"Mismatch at row {i}, element {j}: {act} != {exp}"
530
+
531
+ log.info(f"Vector type test ({test_name}) passed successfully")
532
+
533
+
471
534
  @pytest.mark.parametrize("arrow_type,internal_support", [
472
535
  # Types not supported by Vast.
473
536
  (pa.null(), False),
@@ -0,0 +1,324 @@
1
+ """Tests for vector index functionality."""
2
+
3
+ import logging
4
+ from typing import Optional
5
+
6
+ import pyarrow as pa
7
+ import pytest
8
+
9
+ from vastdb import errors
10
+ from vastdb._internal import VectorIndexSpec
11
+ from vastdb.session import Session
12
+
13
+ log = logging.getLogger(__name__)
14
+
15
+
16
+ @pytest.mark.parametrize("table_name,vector_index", [
17
+ # Test 1: Table without vector index
18
+ ("table_without_index", None),
19
+ # Test 2: Table with L2 vector index
20
+ ("table_with_l2_index", VectorIndexSpec("embedding", "l2sq")),
21
+ # Test 3: Table with inner product vector index
22
+ ("table_with_ip_index", VectorIndexSpec("embedding", "ip")),
23
+ ])
24
+ def test_create_table_with_vector_index_metadata(session: Session,
25
+ clean_bucket_name: str,
26
+ table_name: str,
27
+ vector_index: Optional[VectorIndexSpec]):
28
+ """Test that table creation and stats retrieval work correctly with vector index metadata."""
29
+ schema_name = "schema1"
30
+
31
+ with session.transaction() as tx:
32
+ log.info(f"Testing table '{table_name}' with {vector_index}")
33
+
34
+ # Create schema
35
+ bucket = tx.bucket(clean_bucket_name)
36
+ schema = bucket.create_schema(schema_name)
37
+
38
+ # Create the appropriate schema based on whether vector index is needed
39
+ if vector_index is None:
40
+ # Simple table without vector index
41
+ arrow_schema = pa.schema([
42
+ ('id', pa.int64()),
43
+ ('data', pa.string())
44
+ ])
45
+ else:
46
+ # Table with vector column
47
+ vector_dimension = 128 # Fixed-size vector dimension
48
+ vec_type = pa.list_(pa.field('', pa.float32(), False), vector_dimension)
49
+ arrow_schema = pa.schema([
50
+ ('id', pa.int64()),
51
+ ('embedding', vec_type) # Fixed-size vector column
52
+ ])
53
+
54
+ # Create table with or without vector index
55
+ log.info(f"Creating table: {table_name}")
56
+ table = schema.create_table(
57
+ table_name=table_name,
58
+ columns=arrow_schema,
59
+ vector_index=vector_index
60
+ )
61
+
62
+ # Reload stats to ensure we get the vector index metadata
63
+ table.reload_stats()
64
+
65
+ # Get vector index metadata
66
+ result_vector_index = table._metadata._vector_index
67
+
68
+ log.info(f"Vector index metadata: {result_vector_index}")
69
+
70
+ # Assert expected values (should match input parameters)
71
+ result_vector_index_spec = (
72
+ None
73
+ if result_vector_index is None
74
+ else result_vector_index.to_vector_index_spec()
75
+ )
76
+ assert result_vector_index_spec == vector_index
77
+
78
+ log.info(f"✓ Test passed for table '{table_name}'")
79
+
80
+
81
+ @pytest.mark.parametrize("table_name,vector_index,expected_error", [
82
+ # Test 1: Invalid column name (column doesn't exist in schema)
83
+ ("table_invalid_column", VectorIndexSpec("nonexistent_column", "l2sq"), "invalid vector indexed column name nonexistent_column"),
84
+ # Test 2: Invalid distance metric
85
+ ("table_invalid_metric", VectorIndexSpec("embedding", "invalid_metric"), "invalid vector index distance metric invalid_metric, supported metrics: 'l2sq', 'ip'"),
86
+ ])
87
+ def test_create_table_with_invalid_vector_index(session: Session,
88
+ clean_bucket_name: str,
89
+ table_name: str,
90
+ vector_index: VectorIndexSpec,
91
+ expected_error: str):
92
+ """Test that table creation fails with appropriate error messages for invalid vector index parameters."""
93
+ schema_name = "schema1"
94
+
95
+ with session.transaction() as tx:
96
+ log.info(f"Testing invalid table '{table_name}' with vector_index={vector_index}, expected_error={expected_error}")
97
+
98
+ # Create schema
99
+ bucket = tx.bucket(clean_bucket_name)
100
+ schema = bucket.create_schema(schema_name)
101
+
102
+ # Table with vector column
103
+ vector_dimension = 128 # Fixed-size vector dimension
104
+ vec_type = pa.list_(pa.field('', pa.float32(), False), vector_dimension)
105
+ arrow_schema = pa.schema([
106
+ ('id', pa.int64()),
107
+ ('embedding', vec_type) # Fixed-size vector column
108
+ ])
109
+
110
+ # Attempt to create table with invalid parameters - should raise an error
111
+ log.info(f"Attempting to create invalid table: {table_name}")
112
+ with pytest.raises((errors.BadRequest)) as exc_info:
113
+ schema.create_table(
114
+ table_name=table_name,
115
+ columns=arrow_schema,
116
+ vector_index=vector_index
117
+ )
118
+
119
+ # Verify the error message contains the expected error text
120
+ assert expected_error in str(exc_info.value), \
121
+ f"Expected error message to contain '{expected_error}', got '{str(exc_info.value)}'"
122
+
123
+ log.info(f"✓ Test passed for invalid table '{table_name}'")
124
+
125
+
126
+ def test_vector_index_metadata_from_stats(session: Session, clean_bucket_name: str):
127
+ """Test that vector index metadata is correctly retrieved from table stats."""
128
+ schema_name = "schema1"
129
+ table_name = "vector_table"
130
+
131
+ with session.transaction() as tx:
132
+ # Create schema
133
+ bucket = tx.bucket(clean_bucket_name)
134
+ schema = bucket.create_schema(schema_name)
135
+
136
+ # Create table with vector index
137
+ vector_dimension = 128
138
+ vec_type = pa.list_(pa.field('', pa.float32(), False), vector_dimension)
139
+ arrow_schema = pa.schema([
140
+ ('id', pa.int64()),
141
+ ('embedding', vec_type)
142
+ ])
143
+
144
+ table = schema.create_table(
145
+ table_name=table_name,
146
+ columns=arrow_schema,
147
+ vector_index=VectorIndexSpec("embedding", "l2sq")
148
+ )
149
+
150
+ # Check stats object directly
151
+ stats = table.stats
152
+ assert stats is not None
153
+ assert stats.vector_index is not None
154
+ assert stats.vector_index.column == "embedding"
155
+ assert stats.vector_index.distance_metric == "l2sq"
156
+
157
+ # Check via the table methods
158
+ assert table._metadata._vector_index is not None
159
+ assert table._metadata._vector_index.column == "embedding"
160
+ assert table._metadata._vector_index.distance_metric == "l2sq"
161
+
162
+ log.info("✓ Vector index metadata correctly retrieved from stats")
163
+
164
+
165
+ @pytest.fixture
166
+ def vector_index_test_tables(session: Session, clean_bucket_name: str):
167
+ """
168
+ Fixture that creates a schema with 4 test tables:
169
+ - regular_table: no vector index
170
+ - vector_table_l2: l2sq distance metric
171
+ - vector_table_ip: ip distance metric
172
+ - vector_table_cosine: cosine distance metric
173
+
174
+ Returns a tuple of (schema, table_names_dict, expected_metrics) where:
175
+ - table_names_dict contains the names of all created tables
176
+ - expected_metrics is a list of (metric_key, column, distance_metric, sql_function) tuples
177
+ """
178
+ schema_name = "vector_list_schema"
179
+ vector_dimension = 5
180
+
181
+ with session.transaction() as tx:
182
+ bucket = tx.bucket(clean_bucket_name)
183
+ schema = bucket.create_schema(schema_name)
184
+
185
+ # Create test tables
186
+ vec_type = pa.list_(pa.field('', pa.float32(), False), vector_dimension)
187
+ arrow_schema = pa.schema([
188
+ ('id', pa.int64()),
189
+ ('embedding', vec_type)
190
+ ])
191
+
192
+ table_names = {}
193
+ expected_metrics = []
194
+
195
+ # Regular table without vector index
196
+ table_name = "regular_table"
197
+ schema.create_table(table_name, arrow_schema)
198
+ table_names["regular"] = table_name
199
+ log.info(f"Created regular table: {table_name}")
200
+
201
+ # Vector index table with l2sq metric
202
+ table_name = "vector_table_l2"
203
+ schema.create_table(table_name, arrow_schema, vector_index=VectorIndexSpec("embedding", "l2sq"))
204
+ table_names["l2"] = table_name
205
+ expected_metrics.append(("l2", "embedding", "l2sq", "array_distance"))
206
+ log.info(f"Created vector index table (l2sq): {table_name}")
207
+
208
+ # Vector index table with ip metric
209
+ table_name = "vector_table_ip"
210
+ schema.create_table(table_name, arrow_schema, vector_index=VectorIndexSpec("embedding", "ip"))
211
+ table_names["ip"] = table_name
212
+ expected_metrics.append(("ip", "embedding", "ip", "array_inner_product"))
213
+ log.info(f"Created vector index table (ip): {table_name}")
214
+
215
+ # Vector index table with cosine metric
216
+ table_name = "vector_table_cosine"
217
+ schema.create_table(table_name, arrow_schema, vector_index=VectorIndexSpec("embedding", "cosine"))
218
+ table_names["cosine"] = table_name
219
+ expected_metrics.append(("cosine", "embedding", "cosine", "array_cosine_distance"))
220
+ log.info(f"Created vector index table (cosine): {table_name}")
221
+
222
+ yield schema, table_names, expected_metrics
223
+
224
+
225
+ def _check_vector_index_metadata(actual_column, actual_metric, actual_sql_func,
226
+ expected_column, expected_metric, expected_sql_func,
227
+ expect_full_metadata: bool,
228
+ table_name: str = "table"):
229
+ """Pure checker helper to validate vector index metadata values.
230
+
231
+ Args:
232
+ actual_column: Actual column name from result
233
+ actual_metric: Actual distance metric from result
234
+ actual_sql_func: Actual SQL function name from result
235
+ expected_column: Expected column name (when full metadata is present)
236
+ expected_metric: Expected distance metric (when full metadata is present)
237
+ expected_sql_func: Expected SQL function name (when full metadata is present)
238
+ expect_full_metadata: Whether full metadata should be present
239
+ table_name: Name of table for error messages
240
+ """
241
+ # Determine actual expected values based on metadata presence
242
+ if expect_full_metadata:
243
+ expected_col = expected_column
244
+ expected_met = expected_metric
245
+ expected_sql = expected_sql_func
246
+ else:
247
+ # When metadata is not loaded, both Table objects and TableInfo use empty strings
248
+ expected_col = ""
249
+ expected_met = ""
250
+ expected_sql = ""
251
+
252
+ assert actual_column == expected_col, \
253
+ f"Expected column='{expected_col}', got '{actual_column}' for {table_name}"
254
+ assert actual_metric == expected_met, \
255
+ f"Expected metric='{expected_met}', got '{actual_metric}' for {table_name}"
256
+ assert actual_sql_func == expected_sql, \
257
+ f"Expected sql_func='{expected_sql}', got '{actual_sql_func}' for {table_name}"
258
+
259
+
260
+ @pytest.mark.parametrize("test_case,use_public_api,include_metadata,expect_full_metadata", [
261
+ # Test 1: Public API schema.tables() - returns Table objects with empty metadata
262
+ ("schema.tables() public API", True, None, False),
263
+ # Test 2: Internal API with full metadata enabled
264
+ ("_iter_tables(include_vector_index_metadata=True)", False, True, True),
265
+ # Test 3: Internal API with metadata disabled - returns flag only
266
+ ("_iter_tables(include_vector_index_metadata=False)", False, False, False),
267
+ ])
268
+ def test_list_tables_vector_index_metadata(session: Session, vector_index_test_tables,
269
+ test_case: str, use_public_api: bool,
270
+ include_metadata: Optional[bool], expect_full_metadata: bool):
271
+ """
272
+ Test that list_tables APIs return correct vector index metadata based on parameters.
273
+
274
+ Tests three scenarios:
275
+ 1. schema.tables() - public API returns Table objects with vector_index placeholder (empty strings)
276
+ 2. _iter_tables(include_vector_index_metadata=True) - returns full metadata
277
+ 3. _iter_tables(include_vector_index_metadata=False) - returns flag only, no expensive metadata
278
+ """
279
+ schema, table_names, expected_metrics = vector_index_test_tables
280
+
281
+ log.info(f"Testing: {test_case}")
282
+
283
+ # Call the appropriate API and extract vector index info into uniform structure
284
+ if use_public_api:
285
+ # Public API returns Table objects with _vector_index
286
+ results = schema.tables()
287
+ results_by_name = {t.name: (t, t._metadata._vector_index) for t in results}
288
+ else:
289
+ # Internal API returns table info objects with individual vector_index fields
290
+ # Create a simple object to match _vector_index interface
291
+ from types import SimpleNamespace
292
+ results = list(schema._iter_tables(include_vector_index_metadata=include_metadata))
293
+ results_by_name = {}
294
+ for t in results:
295
+ # Create object with same attributes as VectorIndex for uniform access
296
+ vi = SimpleNamespace(
297
+ column=t.vector_index_column_name,
298
+ distance_metric=t.vector_index_distance_metric,
299
+ sql_distance_function=t.vector_index_sql_function_name,
300
+ ) if t.vector_index_enabled else None
301
+ results_by_name[t.name] = (t, vi)
302
+
303
+ assert len(results) == 4, f"Expected 4 tables, got {len(results)}"
304
+
305
+ # Validate regular table (no vector index)
306
+ _, regular_vi = results_by_name[table_names["regular"]]
307
+ assert regular_vi is None, \
308
+ "Expected vector_index=None for regular table"
309
+
310
+ # Validate vector index tables
311
+ for metric_key, expected_column, expected_metric, expected_sql_func in expected_metrics:
312
+ _, vi = results_by_name[table_names[metric_key]]
313
+
314
+ assert vi is not None, \
315
+ f"Expected vector_index present for {metric_key}"
316
+
317
+ _check_vector_index_metadata(
318
+ vi.column, vi.distance_metric, vi.sql_distance_function,
319
+ expected_column, expected_metric, expected_sql_func,
320
+ expect_full_metadata,
321
+ table_name=metric_key
322
+ )
323
+
324
+ log.info(f"{test_case} validated successfully")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vastdb
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: VAST Data SDK
5
5
  Home-page: https://github.com/vast-data/vastdb_sdk
6
6
  Author: VAST DATA
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: aws-requests-auth
22
22
  Requires-Dist: ibis-framework~=10.1
23
+ Requires-Dist: sqlglot<28.7,>=23.4
23
24
  Requires-Dist: pyarrow~=18.0
24
25
  Requires-Dist: pyarrow-hotfix==0.7
25
26
  Requires-Dist: flatbuffers
@@ -1,5 +1,6 @@
1
1
  aws-requests-auth
2
2
  ibis-framework~=10.1
3
+ sqlglot<28.7,>=23.4
3
4
  pyarrow~=18.0
4
5
  pyarrow-hotfix==0.7
5
6
  flatbuffers