vastdb 0.0.5.3__tar.gz → 0.1.1__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.
- vastdb-0.1.1/CHANGELOG.md +95 -0
- vastdb-0.1.1/MANIFEST.in +1 -0
- vastdb-0.1.1/PKG-INFO +31 -0
- vastdb-0.1.1/README.md +181 -0
- vastdb-0.1.1/requirements.txt +7 -0
- vastdb-0.1.1/setup.py +49 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/GetTableStatsResponse.py +45 -1
- vastdb-0.1.1/vast_flatbuf/tabular/VipRange.py +56 -0
- vastdb-0.1.1/vastdb/__init__.py +7 -0
- vastdb-0.1.1/vastdb/bench/test_perf.py +29 -0
- vastdb-0.1.1/vastdb/bucket.py +85 -0
- vastdb-0.1.1/vastdb/conftest.py +60 -0
- vastdb-0.1.1/vastdb/errors.py +175 -0
- vastdb-0.0.5.3/vastdb/api.py → vastdb-0.1.1/vastdb/internal_commands.py +373 -875
- vastdb-0.1.1/vastdb/schema.py +85 -0
- vastdb-0.1.1/vastdb/session.py +47 -0
- vastdb-0.1.1/vastdb/table.py +483 -0
- vastdb-0.1.1/vastdb/tests/__init__.py +0 -0
- vastdb-0.1.1/vastdb/tests/test_imports.py +123 -0
- vastdb-0.1.1/vastdb/tests/test_nested.py +28 -0
- vastdb-0.1.1/vastdb/tests/test_projections.py +42 -0
- vastdb-0.1.1/vastdb/tests/test_sanity.py +82 -0
- vastdb-0.1.1/vastdb/tests/test_schemas.py +63 -0
- vastdb-0.1.1/vastdb/tests/test_tables.py +655 -0
- vastdb-0.1.1/vastdb/tests/util.py +18 -0
- vastdb-0.1.1/vastdb/transaction.py +54 -0
- vastdb-0.1.1/vastdb/util.py +78 -0
- vastdb-0.1.1/vastdb.egg-info/PKG-INFO +31 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vastdb.egg-info/SOURCES.txt +24 -3
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vastdb.egg-info/requires.txt +3 -1
- vastdb-0.0.5.3/PKG-INFO +0 -42
- vastdb-0.0.5.3/README.md +0 -1222
- vastdb-0.0.5.3/setup.py +0 -64
- vastdb-0.0.5.3/vastdb/bench_scan.py +0 -45
- vastdb-0.0.5.3/vastdb.egg-info/PKG-INFO +0 -42
- {vastdb-0.0.5.3 → vastdb-0.1.1}/LICENSE +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/setup.cfg +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Aggregate.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ArraySlice.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ArraySubscript.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/BinaryLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/BooleanLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Bound.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Call.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/CaseFragment.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Cast.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ConcreteBoundImpl.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ConditionalCase.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/CurrentRow.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/DateLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/DecimalLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Deref.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/DurationLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Expression.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ExpressionImpl.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/FieldIndex.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/FieldRef.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Filter.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/FixedSizeBinaryLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Float16Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Float32Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Float64Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Following.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Frame.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Grouping.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int16Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int32Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int64Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Int8Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteralDaysMilliseconds.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteralImpl.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/IntervalLiteralMonths.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Join.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/JoinKind.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/KeyValue.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Limit.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/ListLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/LiteralColumn.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/LiteralImpl.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/LiteralRelation.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/MapKey.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/MapLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/OrderBy.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Ordering.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Plan.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Preceding.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Project.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/RelId.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Relation.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/RelationImpl.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SetOpKind.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SetOperation.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SimpleCase.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/SortKey.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Source.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/StringLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/StructField.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/StructLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/TimeLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/TimestampLiteral.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt16Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt32Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt64Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/UInt8Literal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/Unbounded.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/WindowCall.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/computeir/flatbuf/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Binary.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Block.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/BodyCompression.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/BodyCompressionMethod.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Bool.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Buffer.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/CompressionType.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Date.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/DateUnit.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Decimal.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/DictionaryBatch.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/DictionaryEncoding.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/DictionaryKind.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Duration.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Endianness.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Feature.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Field.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/FieldNode.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/FixedSizeBinary.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/FixedSizeList.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/FloatingPoint.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Footer.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Int.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Interval.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/IntervalUnit.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/KeyValue.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/LargeBinary.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/LargeList.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/LargeUtf8.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/List.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Map.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Message.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/MessageHeader.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/MetadataVersion.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Null.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Precision.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/RecordBatch.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Schema.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/SparseMatrixCompressedAxis.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/SparseMatrixIndexCSX.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensor.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensorIndex.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensorIndexCOO.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/SparseTensorIndexCSF.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Struct_.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Tensor.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/TensorDim.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Time.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/TimeUnit.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Timestamp.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Type.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Union.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/UnionMode.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/Utf8.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/org/apache/arrow/flatbuf/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/AlterColumnRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/AlterProjectionTableRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/AlterSchemaRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/AlterTableRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/Column.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/ColumnType.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/CreateProjectionRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/CreateSchemaRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/GetProjectionTableStatsResponse.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/ImportDataRequest.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/ListProjectionsResponse.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/ListSchemasResponse.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/ListTablesResponse.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/ObjectDetails.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/S3File.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vast_flatbuf/tabular/__init__.py +0 -0
- {vastdb-0.0.5.3/vastdb → vastdb-0.1.1/vastdb/bench}/__init__.py +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vastdb.egg-info/dependency_links.txt +0 -0
- {vastdb-0.0.5.3 → vastdb-0.1.1}/vastdb.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
|
|
7
|
+
## [0.1.1] (2024-04-15)
|
|
8
|
+
[0.1.1]: https://github.com/vast-data/vastdb_sdk/compare/v0.1.0...v0.1.1
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Support date & timestamp predicate pushdown [#25]
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- Add missing `requirements.txt` file to released tarball [#47]
|
|
15
|
+
|
|
16
|
+
## [0.1.0] (2024-04-11)
|
|
17
|
+
[0.1.0]: https://github.com/vast-data/vastdb_sdk/compare/v0.0.5.3...v0.1.0
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- Transactions are implemented using [context managers](https://docs.python.org/3/library/stdtypes.html#typecontextmanager)
|
|
21
|
+
- Database entities are derived from a specific transaction
|
|
22
|
+
- Predicate pushdown is using [ibis](https://ibis-project.org/)-like expressions
|
|
23
|
+
- Public SDK [test suite](vastdb/tests/)
|
|
24
|
+
- Internal CI with Python 3.9 - 3.12
|
|
25
|
+
- Using [`ruff`](https://github.com/astral-sh/ruff) for linting and code formatting
|
|
26
|
+
- Improved [`README.md`](README.md) with new API examples
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
|
|
30
|
+
- Old SDK classes and methods are deprecated
|
|
31
|
+
|
|
32
|
+
## [0.0.5.3] (2024-03-24)
|
|
33
|
+
[0.0.5.3]: https://github.com/vast-data/vastdb_sdk/compare/v0.0.5.2...v0.0.5.3
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- Allow changing default max list_columns page size [#43]
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
- Fixing insert function to use the correct tx while listing columns [#42]
|
|
40
|
+
|
|
41
|
+
## [0.0.5.2] (2024-03-19)
|
|
42
|
+
[0.0.5.2]: https://github.com/vast-data/vastdb_sdk/compare/v0.0.5.1...v0.0.5.2
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
- Support retrieving row IDs via `VastdbApi.query()` [#31]
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
- Fixed several functions that didn't use the correct txid [#30]
|
|
49
|
+
- Fix graceful cancellation for `VastdbApi.query_iterator()` [#33]
|
|
50
|
+
|
|
51
|
+
### Removed
|
|
52
|
+
- Remove `vast_protobuf` package and `protobuf` dependency [#29]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [0.0.5.1] (2024-03-01)
|
|
56
|
+
[0.0.5.1]: https://github.com/vast-data/vastdb_sdk/compare/v0.0.5.0...v0.0.5.1
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- Support latest Python (3.11+) by not requiring too old dependencies. [#16]
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [0.0.5.0] (2024-02-25)
|
|
63
|
+
[0.0.5.0]: https://github.com/vast-data/vastdb_sdk/compare/v0.0.4.0...v0.0.5.0
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
- Created a CHANGELOG
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
- Wait until all files are processed during import
|
|
70
|
+
- Sync with internal `api.py` code
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [0.0.4.0] (2024-02-14)
|
|
74
|
+
[0.0.4.0]: https://github.com/vast-data/vastdb_sdk/compare/v0.0.2...v0.0.4.0
|
|
75
|
+
|
|
76
|
+
### Added
|
|
77
|
+
- Allow creating a table using the schema of an existing Parquet file via `create_table_from_parquet_schema()`
|
|
78
|
+
- Allow inserting RecordBatch into DB via `insert()`
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
- Rename `vastdb_api` module to `api`
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
- Fix `concurrent.futures` import error
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
[#16]: https://github.com/vast-data/vastdb_sdk/pull/16
|
|
88
|
+
[#25]: https://github.com/vast-data/vastdb_sdk/pull/25
|
|
89
|
+
[#29]: https://github.com/vast-data/vastdb_sdk/pull/29
|
|
90
|
+
[#30]: https://github.com/vast-data/vastdb_sdk/pull/30
|
|
91
|
+
[#31]: https://github.com/vast-data/vastdb_sdk/pull/31
|
|
92
|
+
[#33]: https://github.com/vast-data/vastdb_sdk/pull/33
|
|
93
|
+
[#42]: https://github.com/vast-data/vastdb_sdk/pull/42
|
|
94
|
+
[#43]: https://github.com/vast-data/vastdb_sdk/pull/43
|
|
95
|
+
[#47]: https://github.com/vast-data/vastdb_sdk/pull/47
|
vastdb-0.1.1/MANIFEST.in
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include *.md LICENSE requirements.txt
|
vastdb-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: vastdb
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: VAST Data SDK
|
|
5
|
+
Home-page: https://github.com/vast-data/vastdb_sdk
|
|
6
|
+
Author: VAST DATA
|
|
7
|
+
Author-email: hello@vastdata.com
|
|
8
|
+
License: Copyright (C) VAST Data Ltd.
|
|
9
|
+
Platform: UNKNOWN
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Database
|
|
18
|
+
Classifier: Topic :: Database :: Front-Ends
|
|
19
|
+
Requires-Python: >=3.9.0
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
`vastdb` is a Python-based SDK designed for interacting
|
|
25
|
+
with [VAST Database](https://vastdata.com/database)
|
|
26
|
+
and [VAST Catalog](https://vastdata.com/blog/vast-catalog-treat-your-file-system-like-a-database),
|
|
27
|
+
enabling schema and table management, efficient ingest, query and modification of columnar data.
|
|
28
|
+
|
|
29
|
+
For more details, see [our whitepaper](https://vastdata.com/whitepaper/#TheVASTDataBase).
|
|
30
|
+
|
|
31
|
+
|
vastdb-0.1.1/README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
[](https://pypi.org/project/vastdb)
|
|
2
|
+
|
|
3
|
+
# VAST DB Python SDK
|
|
4
|
+
|
|
5
|
+
🚧 Please note that this package in a pre-release stage. Until version 1.x is officially released, the API should be considered unstable.
|
|
6
|
+
|
|
7
|
+
## Introduction
|
|
8
|
+
|
|
9
|
+
`vastdb` is a Python-based SDK designed for interacting with [VAST Database](https://vastdata.com/database) & [VAST Catalog](https://vastdata.com/blog/vast-catalog-treat-your-file-system-like-a-database), enabling schema and table management, efficient ingest, query and modification of columnar data. For more details, see [our whitepaper](https://vastdata.com/whitepaper/#TheVASTDataBase).
|
|
10
|
+
|
|
11
|
+
[](https://vastdata.com/database)
|
|
12
|
+
|
|
13
|
+
## Getting started
|
|
14
|
+
|
|
15
|
+
### Requirements
|
|
16
|
+
|
|
17
|
+
- Linux client with Python 3.9+ and a network access to the VAST cluster
|
|
18
|
+
- [Virtual IP pool configured with DNS service](https://support.vastdata.com/s/topic/0TOV40000000FThOAM/configuring-network-access-v50)
|
|
19
|
+
- [S3 access & secret keys on VAST cluster](https://support.vastdata.com/s/article/UUID-4d2e7e23-b2fb-7900-d98f-96c31a499626)
|
|
20
|
+
- [Tabular identity policy with the proper permissions](https://support.vastdata.com/s/article/UUID-14322b60-d6a2-89ac-3df0-3dfbb6974182)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install vastdb
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Also, see [our release notes](CHANGELOG.md).
|
|
30
|
+
|
|
31
|
+
### Quickstart
|
|
32
|
+
|
|
33
|
+
Creating schemas and tables + basic inserts and selects:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import pyarrow as pa
|
|
37
|
+
import vastdb
|
|
38
|
+
|
|
39
|
+
session = vastdb.connect(
|
|
40
|
+
endpoint='http://vip-pool.v123-xy.VastENG.lab',
|
|
41
|
+
access=AWS_ACCESS_KEY_ID,
|
|
42
|
+
secret=AWS_SECRET_ACCESS_KEY)
|
|
43
|
+
|
|
44
|
+
with session.transaction() as tx:
|
|
45
|
+
bucket = tx.bucket("bucket-name")
|
|
46
|
+
|
|
47
|
+
schema = bucket.create_schema("schema-name")
|
|
48
|
+
print(bucket.schemas())
|
|
49
|
+
|
|
50
|
+
columns = pa.schema([
|
|
51
|
+
('c1', pa.int16()),
|
|
52
|
+
('c2', pa.float32()),
|
|
53
|
+
('c3', pa.utf8()),
|
|
54
|
+
])
|
|
55
|
+
table = schema.create_table("table-name", columns)
|
|
56
|
+
print(schema.tables())
|
|
57
|
+
print(table.columns())
|
|
58
|
+
|
|
59
|
+
arrow_table = pa.table(schema=columns, data=[
|
|
60
|
+
[111, 222, 333],
|
|
61
|
+
[0.5, 1.5, 2.5],
|
|
62
|
+
['a', 'bb', 'ccc'],
|
|
63
|
+
])
|
|
64
|
+
table.insert(arrow_table)
|
|
65
|
+
|
|
66
|
+
result = pa.Table.from_batches(table.select()) # SELECT * FROM t
|
|
67
|
+
assert result == arrow_table
|
|
68
|
+
|
|
69
|
+
# the transaction is automatically committed when exiting the context
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Filters and projections
|
|
73
|
+
|
|
74
|
+
Our SDK supports predicate and projection pushdown:
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
# SELECT c1 FROM t WHERE (c2 > 2) AND (c3 IS NULL)
|
|
78
|
+
table.select(columns=['c1'],
|
|
79
|
+
predicate=(table['c2'] > 2) & table['c3'].isnull())
|
|
80
|
+
|
|
81
|
+
# SELECT c2, c3 FROM t WHERE (c2 BETWEEN 0 AND 1) OR (c2 > 10)
|
|
82
|
+
table.select(columns=['c2', 'c3'],
|
|
83
|
+
predicate=table['c2'].between(0, 1) | (table['c2'] > 10))
|
|
84
|
+
|
|
85
|
+
# SELECT * FROM t WHERE c3 LIKE '%substring%'
|
|
86
|
+
table.select(predicate=table['c3'].contains('substring'))
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Import a single Parquet file via S3 protocol
|
|
90
|
+
|
|
91
|
+
It is possible to efficiently create a table from a Parquet file (without copying it via the client):
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
with tempfile.NamedTemporaryFile() as f:
|
|
95
|
+
pa.parquet.write_table(arrow_table, f.name)
|
|
96
|
+
s3.put_object(Bucket='bucket-name', Key='staging/file.parquet', Body=f)
|
|
97
|
+
|
|
98
|
+
schema = tx.bucket('bucket-name').schema('schema-name')
|
|
99
|
+
table = util.create_table_from_files(
|
|
100
|
+
schema=schema, table_name='imported-table',
|
|
101
|
+
parquet_files=['/bucket-name/staging/file.parquet'])
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Import multiple Parquet files concurrently via S3 protocol
|
|
105
|
+
|
|
106
|
+
We can import multiple files concurrently into a table (by utilizing multiple CNodes' cores):
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
schema = tx.bucket('bucket-name').schema('schema-name')
|
|
110
|
+
table = util.create_table_from_files(
|
|
111
|
+
schema=schema, table_name='large-imported-table',
|
|
112
|
+
parquet_files=[f'/bucket-name/staging/file{i}.parquet' for i in range(10)])
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Post-processing
|
|
116
|
+
|
|
117
|
+
### Export
|
|
118
|
+
|
|
119
|
+
`Table.select()` returns a stream of [PyArrow record batches](https://arrow.apache.org/docs/python/data.html#record-batches), which can be directly exported into a Parquet file:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
batches = table.select()
|
|
123
|
+
with contextlib.closing(pa.parquet.ParquetWriter('/path/to/file.parquet', batches.schema)) as writer:
|
|
124
|
+
for batch in table_batches:
|
|
125
|
+
writer.write_batch(batch)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### DuckDB
|
|
129
|
+
|
|
130
|
+
We can use [DuckDB](https://duckdb.org/docs/guides/python/sql_on_arrow.html) to post-process the resulting stream of [PyArrow record batches](https://arrow.apache.org/docs/python/data.html#record-batches):
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
import duckdb
|
|
134
|
+
conn = duckdb.connect()
|
|
135
|
+
|
|
136
|
+
batches = table.select(columns=['c1'], predicate=(table['c2'] > 2))
|
|
137
|
+
print(conn.execute("SELECT sum(c1) FROM batches").arrow())
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Semi-sorted projections
|
|
141
|
+
|
|
142
|
+
We can create, list and delete [available semi-sorted projections](https://support.vastdata.com/s/article/UUID-e4ca42ab-d15b-6b72-bd6b-f3c77b455de4):
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
p = table.create_projection('proj', sorted=['c3'], unsorted=['c1'])
|
|
146
|
+
print(table.projections())
|
|
147
|
+
print(p.get_stats())
|
|
148
|
+
p.drop()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Snapshots
|
|
152
|
+
|
|
153
|
+
It is possible to list [available snapshots](https://vastdata.com/blog/bringing-snapshots-to-vasts-element-store):
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
print(bucket.list_snapshots())
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## VAST Catalog
|
|
160
|
+
|
|
161
|
+
[VAST Catalog](https://vastdata.com/blog/vast-catalog-treat-your-file-system-like-a-database) can be queried as a regular table:
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
table = pa.Table.from_batches(tx.catalog.select(['element_type']))
|
|
165
|
+
df = table.to_pandas()
|
|
166
|
+
|
|
167
|
+
total_elements = len(df)
|
|
168
|
+
print(f"Total elements in the catalog: {total_elements}")
|
|
169
|
+
|
|
170
|
+
file_count = (df['element_type'] == 'FILE').sum()
|
|
171
|
+
print(f"Number of files/objects: {file_count}")
|
|
172
|
+
|
|
173
|
+
distinct_elements = df['element_type'].unique()
|
|
174
|
+
print("Distinct element types on the system:")
|
|
175
|
+
print(distinct_elements)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
See the following blog posts for more examples:
|
|
179
|
+
|
|
180
|
+
- https://vastdata.com/blog/the-vast-catalog-in-action-part-1
|
|
181
|
+
- https://vastdata.com/blog/the-vast-catalog-in-action-part-2
|
vastdb-0.1.1/setup.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from setuptools import find_packages, setup
|
|
4
|
+
|
|
5
|
+
long_description = """
|
|
6
|
+
`vastdb` is a Python-based SDK designed for interacting
|
|
7
|
+
with [VAST Database](https://vastdata.com/database)
|
|
8
|
+
and [VAST Catalog](https://vastdata.com/blog/vast-catalog-treat-your-file-system-like-a-database),
|
|
9
|
+
enabling schema and table management, efficient ingest, query and modification of columnar data.
|
|
10
|
+
|
|
11
|
+
For more details, see [our whitepaper](https://vastdata.com/whitepaper/#TheVASTDataBase).
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def _get_version_suffix():
|
|
15
|
+
import subprocess
|
|
16
|
+
|
|
17
|
+
commit = subprocess.check_output(["git", "rev-parse", "HEAD"])
|
|
18
|
+
print(f"Git commit: {commit}")
|
|
19
|
+
return f".dev1+vast.{commit.decode()[:16]}"
|
|
20
|
+
|
|
21
|
+
suffix = ''
|
|
22
|
+
if os.environ.get('VASTDB_APPEND_VERSION_SUFFIX'):
|
|
23
|
+
suffix = _get_version_suffix()
|
|
24
|
+
|
|
25
|
+
setup(
|
|
26
|
+
name='vastdb',
|
|
27
|
+
python_requires='>=3.9.0',
|
|
28
|
+
description='VAST Data SDK',
|
|
29
|
+
version='0.1.1' + suffix,
|
|
30
|
+
url='https://github.com/vast-data/vastdb_sdk',
|
|
31
|
+
author='VAST DATA',
|
|
32
|
+
author_email='hello@vastdata.com',
|
|
33
|
+
license='Copyright (C) VAST Data Ltd.',
|
|
34
|
+
packages=find_packages(),
|
|
35
|
+
install_requires=open('requirements.txt').read().strip().split('\n'),
|
|
36
|
+
long_description=long_description,
|
|
37
|
+
long_description_content_type='text/markdown',
|
|
38
|
+
classifiers=[
|
|
39
|
+
'Development Status :: 4 - Beta',
|
|
40
|
+
'License :: OSI Approved :: Apache Software License',
|
|
41
|
+
'Programming Language :: Python :: 3',
|
|
42
|
+
'Programming Language :: Python :: 3.9',
|
|
43
|
+
'Programming Language :: Python :: 3.10',
|
|
44
|
+
'Programming Language :: Python :: 3.11',
|
|
45
|
+
'Programming Language :: Python :: 3.12',
|
|
46
|
+
'Topic :: Database',
|
|
47
|
+
'Topic :: Database :: Front-Ends',
|
|
48
|
+
],
|
|
49
|
+
)
|
|
@@ -45,7 +45,39 @@ class GetTableStatsResponse(object):
|
|
|
45
45
|
return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
|
|
46
46
|
return False
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
# GetTableStatsResponse
|
|
49
|
+
def AddressType(self):
|
|
50
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
|
|
51
|
+
if o != 0:
|
|
52
|
+
return self._tab.String(o + self._tab.Pos)
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
# GetTableStatsResponse
|
|
56
|
+
def Vips(self, j):
|
|
57
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
|
|
58
|
+
if o != 0:
|
|
59
|
+
x = self._tab.Vector(o)
|
|
60
|
+
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
|
|
61
|
+
x = self._tab.Indirect(x)
|
|
62
|
+
from vast_flatbuf.tabular.VipRange import VipRange
|
|
63
|
+
obj = VipRange()
|
|
64
|
+
obj.Init(self._tab.Bytes, x)
|
|
65
|
+
return obj
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
# GetTableStatsResponse
|
|
69
|
+
def VipsLength(self):
|
|
70
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
|
|
71
|
+
if o != 0:
|
|
72
|
+
return self._tab.VectorLen(o)
|
|
73
|
+
return 0
|
|
74
|
+
|
|
75
|
+
# GetTableStatsResponse
|
|
76
|
+
def VipsIsNone(self):
|
|
77
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
|
|
78
|
+
return o == 0
|
|
79
|
+
|
|
80
|
+
def Start(builder): builder.StartObject(5)
|
|
49
81
|
def GetTableStatsResponseStart(builder):
|
|
50
82
|
"""This method is deprecated. Please switch to Start."""
|
|
51
83
|
return Start(builder)
|
|
@@ -61,6 +93,18 @@ def AddIsExternalRowidAlloc(builder, isExternalRowidAlloc): builder.PrependBoolS
|
|
|
61
93
|
def GetTableStatsResponseAddIsExternalRowidAlloc(builder, isExternalRowidAlloc):
|
|
62
94
|
"""This method is deprecated. Please switch to AddIsExternalRowidAlloc."""
|
|
63
95
|
return AddIsExternalRowidAlloc(builder, isExternalRowidAlloc)
|
|
96
|
+
def AddAddressType(builder, addressType): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(addressType), 0)
|
|
97
|
+
def GetTableStatsResponseAddAddressType(builder, addressType):
|
|
98
|
+
"""This method is deprecated. Please switch to AddAddressType."""
|
|
99
|
+
return AddAddressType(builder, addressType)
|
|
100
|
+
def AddVips(builder, vips): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(vips), 0)
|
|
101
|
+
def GetTableStatsResponseAddVips(builder, vips):
|
|
102
|
+
"""This method is deprecated. Please switch to AddVips."""
|
|
103
|
+
return AddVips(builder, vips)
|
|
104
|
+
def StartVipsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
|
|
105
|
+
def GetTableStatsResponseStartVipsVector(builder, numElems):
|
|
106
|
+
"""This method is deprecated. Please switch to Start."""
|
|
107
|
+
return StartVipsVector(builder, numElems)
|
|
64
108
|
def End(builder): return builder.EndObject()
|
|
65
109
|
def GetTableStatsResponseEnd(builder):
|
|
66
110
|
"""This method is deprecated. Please switch to End."""
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
|
|
3
|
+
# namespace: tabular
|
|
4
|
+
|
|
5
|
+
import flatbuffers
|
|
6
|
+
from flatbuffers.compat import import_numpy
|
|
7
|
+
np = import_numpy()
|
|
8
|
+
|
|
9
|
+
class VipRange(object):
|
|
10
|
+
__slots__ = ['_tab']
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def GetRootAs(cls, buf, offset=0):
|
|
14
|
+
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
|
15
|
+
x = VipRange()
|
|
16
|
+
x.Init(buf, n + offset)
|
|
17
|
+
return x
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def GetRootAsVipRange(cls, buf, offset=0):
|
|
21
|
+
"""This method is deprecated. Please switch to GetRootAs."""
|
|
22
|
+
return cls.GetRootAs(buf, offset)
|
|
23
|
+
# VipRange
|
|
24
|
+
def Init(self, buf, pos):
|
|
25
|
+
self._tab = flatbuffers.table.Table(buf, pos)
|
|
26
|
+
|
|
27
|
+
# VipRange
|
|
28
|
+
def StartAddress(self):
|
|
29
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
|
30
|
+
if o != 0:
|
|
31
|
+
return self._tab.String(o + self._tab.Pos)
|
|
32
|
+
return None
|
|
33
|
+
|
|
34
|
+
# VipRange
|
|
35
|
+
def AddressCount(self):
|
|
36
|
+
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
|
37
|
+
if o != 0:
|
|
38
|
+
return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos)
|
|
39
|
+
return 0
|
|
40
|
+
|
|
41
|
+
def Start(builder): builder.StartObject(2)
|
|
42
|
+
def VipRangeStart(builder):
|
|
43
|
+
"""This method is deprecated. Please switch to Start."""
|
|
44
|
+
return Start(builder)
|
|
45
|
+
def AddStartAddress(builder, startAddress): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(startAddress), 0)
|
|
46
|
+
def VipRangeAddStartAddress(builder, startAddress):
|
|
47
|
+
"""This method is deprecated. Please switch to AddStartAddress."""
|
|
48
|
+
return AddStartAddress(builder, startAddress)
|
|
49
|
+
def AddAddressCount(builder, addressCount): builder.PrependUint16Slot(1, addressCount, 0)
|
|
50
|
+
def VipRangeAddAddressCount(builder, addressCount):
|
|
51
|
+
"""This method is deprecated. Please switch to AddAddressCount."""
|
|
52
|
+
return AddAddressCount(builder, addressCount)
|
|
53
|
+
def End(builder): return builder.EndObject()
|
|
54
|
+
def VipRangeEnd(builder):
|
|
55
|
+
"""This method is deprecated. Please switch to End."""
|
|
56
|
+
return End(builder)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
import pyarrow as pa
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
from vastdb import util
|
|
8
|
+
from vastdb.table import ImportConfig, QueryConfig
|
|
9
|
+
|
|
10
|
+
log = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@pytest.mark.benchmark
|
|
14
|
+
def test_bench(session, clean_bucket_name, parquets_path, crater_path):
|
|
15
|
+
files = [str(parquets_path/f) for f in (parquets_path.glob('**/*.pq'))]
|
|
16
|
+
|
|
17
|
+
with session.transaction() as tx:
|
|
18
|
+
b = tx.bucket(clean_bucket_name)
|
|
19
|
+
s = b.create_schema('s1')
|
|
20
|
+
t = util.create_table_from_files(s, 't1', files, config=ImportConfig(import_concurrency=8))
|
|
21
|
+
config = QueryConfig(num_splits=8, num_sub_splits=4)
|
|
22
|
+
s = time.time()
|
|
23
|
+
pa_table = pa.Table.from_batches(t.select(columns=['sid'], predicate=t['sid'] == 10033007, config=config))
|
|
24
|
+
e = time.time()
|
|
25
|
+
log.info("'SELECT sid from TABLE WHERE sid = 10033007' returned in %s seconds.", e-s)
|
|
26
|
+
if crater_path:
|
|
27
|
+
with open(f'{crater_path}/bench_results', 'a') as f:
|
|
28
|
+
f.write(f"'SELECT sid FROM TABLE WHERE sid = 10033007' returned in {e-s} seconds")
|
|
29
|
+
assert pa_table.num_rows == 255_075
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""VAST Database bucket.
|
|
2
|
+
|
|
3
|
+
VAST S3 buckets can be used to create Database schemas and tables.
|
|
4
|
+
It is possible to list and access VAST snapshots generated over a bucket.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import logging
|
|
8
|
+
from dataclasses import dataclass
|
|
9
|
+
|
|
10
|
+
from . import errors, schema, transaction
|
|
11
|
+
|
|
12
|
+
log = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass
|
|
16
|
+
class Snapshot:
|
|
17
|
+
"""VAST bucket-level snapshot."""
|
|
18
|
+
|
|
19
|
+
name: str
|
|
20
|
+
bucket: "Bucket"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass
|
|
24
|
+
class Bucket:
|
|
25
|
+
"""VAST bucket."""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
tx: "transaction.Transaction"
|
|
29
|
+
|
|
30
|
+
def create_schema(self, path: str, fail_if_exists=True) -> "schema.Schema":
|
|
31
|
+
"""Create a new schema (a container of tables) under this bucket."""
|
|
32
|
+
if current := self.schema(path, fail_if_missing=False):
|
|
33
|
+
if fail_if_exists:
|
|
34
|
+
raise errors.SchemaExists(self.name, path)
|
|
35
|
+
else:
|
|
36
|
+
return current
|
|
37
|
+
self.tx._rpc.api.create_schema(self.name, path, txid=self.tx.txid)
|
|
38
|
+
log.info("Created schema: %s", path)
|
|
39
|
+
return self.schema(path)
|
|
40
|
+
|
|
41
|
+
def schema(self, path: str, fail_if_missing=True) -> "schema.Schema":
|
|
42
|
+
"""Get a specific schema (a container of tables) under this bucket."""
|
|
43
|
+
s = self.schemas(path)
|
|
44
|
+
log.debug("schema: %s", s)
|
|
45
|
+
if not s:
|
|
46
|
+
if fail_if_missing:
|
|
47
|
+
raise errors.MissingSchema(self.name, path)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
assert len(s) == 1, f"Expected to receive only a single schema, but got: {len(s)}. ({s})"
|
|
51
|
+
log.debug("Found schema: %s", s[0].name)
|
|
52
|
+
return s[0]
|
|
53
|
+
|
|
54
|
+
def schemas(self, name: str = None) -> ["schema.Schema"]:
|
|
55
|
+
"""List bucket's schemas."""
|
|
56
|
+
schemas = []
|
|
57
|
+
next_key = 0
|
|
58
|
+
exact_match = bool(name)
|
|
59
|
+
log.debug("list schemas param: schema=%s, exact_match=%s", name, exact_match)
|
|
60
|
+
while True:
|
|
61
|
+
bucket_name, curr_schemas, next_key, is_truncated, _ = \
|
|
62
|
+
self.tx._rpc.api.list_schemas(bucket=self.name, next_key=next_key, txid=self.tx.txid,
|
|
63
|
+
name_prefix=name, exact_match=exact_match)
|
|
64
|
+
if not curr_schemas:
|
|
65
|
+
break
|
|
66
|
+
schemas.extend(curr_schemas)
|
|
67
|
+
if not is_truncated:
|
|
68
|
+
break
|
|
69
|
+
|
|
70
|
+
return [schema.Schema(name=name, bucket=self) for name, *_ in schemas]
|
|
71
|
+
|
|
72
|
+
def snapshots(self) -> [Snapshot]:
|
|
73
|
+
"""List bucket's snapshots."""
|
|
74
|
+
snapshots = []
|
|
75
|
+
next_key = 0
|
|
76
|
+
while True:
|
|
77
|
+
curr_snapshots, is_truncated, next_key = \
|
|
78
|
+
self.tx._rpc.api.list_snapshots(bucket=self.name, next_token=next_key)
|
|
79
|
+
if not curr_snapshots:
|
|
80
|
+
break
|
|
81
|
+
snapshots.extend(curr_snapshots)
|
|
82
|
+
if not is_truncated:
|
|
83
|
+
break
|
|
84
|
+
|
|
85
|
+
return [Snapshot(name=snapshot, bucket=self) for snapshot in snapshots]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
import boto3
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
import vastdb
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def pytest_addoption(parser):
|
|
11
|
+
parser.addoption("--tabular-bucket-name", help="Name of the S3 bucket with Tabular enabled", default="vastdb")
|
|
12
|
+
parser.addoption("--tabular-access-key", help="Access key with Tabular permissions (AWS_ACCESS_KEY_ID)", default=os.environ.get("AWS_ACCESS_KEY_ID", None))
|
|
13
|
+
parser.addoption("--tabular-secret-key", help="Secret key with Tabular permissions (AWS_SECRET_ACCESS_KEY)", default=os.environ.get("AWS_SECRET_ACCESS_KEY", None))
|
|
14
|
+
parser.addoption("--tabular-endpoint-url", help="Tabular server endpoint", default="http://localhost:9090")
|
|
15
|
+
parser.addoption("--data-path", help="Data files location", default=None)
|
|
16
|
+
parser.addoption("--crater-path", help="Save benchmark results in a dedicated location", default=None)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@pytest.fixture(scope="session")
|
|
20
|
+
def session(request):
|
|
21
|
+
return vastdb.connect(
|
|
22
|
+
access=request.config.getoption("--tabular-access-key"),
|
|
23
|
+
secret=request.config.getoption("--tabular-secret-key"),
|
|
24
|
+
endpoint=request.config.getoption("--tabular-endpoint-url"),
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@pytest.fixture(scope="session")
|
|
29
|
+
def test_bucket_name(request):
|
|
30
|
+
return request.config.getoption("--tabular-bucket-name")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@pytest.fixture(scope="function")
|
|
34
|
+
def clean_bucket_name(request, test_bucket_name, session):
|
|
35
|
+
with session.transaction() as tx:
|
|
36
|
+
b = tx.bucket(test_bucket_name)
|
|
37
|
+
for s in b.schemas():
|
|
38
|
+
for t in s.tables():
|
|
39
|
+
t.drop()
|
|
40
|
+
s.drop()
|
|
41
|
+
return test_bucket_name
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.fixture(scope="session")
|
|
45
|
+
def s3(request):
|
|
46
|
+
return boto3.client(
|
|
47
|
+
's3',
|
|
48
|
+
aws_access_key_id=request.config.getoption("--tabular-access-key"),
|
|
49
|
+
aws_secret_access_key=request.config.getoption("--tabular-secret-key"),
|
|
50
|
+
endpoint_url=request.config.getoption("--tabular-endpoint-url"))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@pytest.fixture(scope="function")
|
|
54
|
+
def parquets_path(request):
|
|
55
|
+
return Path(request.config.getoption("--data-path"))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@pytest.fixture(scope="function")
|
|
59
|
+
def crater_path(request):
|
|
60
|
+
return request.config.getoption("--crater-path")
|