Skip to content

Commit 6d83ac3

Browse files
authored
Merge pull request #265 from TileDB-Inc/upgrade-to-tiledb2.16
Upgrade to tiledb2.16
2 parents e84a864 + 7d298f5 commit 6d83ac3

10 files changed

+58
-20
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set -e -x
2-
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.15.3/tiledb-linux-x86_64-2.15.3-689bea0.tar.gz \
2+
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.16.0/tiledb-linux-x86_64-2.16.0-d682dd0.tar.gz \
33
&& sudo tar -C /usr/local -xf tiledb.tar.gz
44
sudo ldconfig /usr/local/lib
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
set -e -x
2-
git clone https://github.com/TileDB-Inc/TileDB.git -b 2.15.3
2+
git clone https://github.com/TileDB-Inc/TileDB.git -b 2.16.0
33
cd TileDB
44
mkdir build && cd build
5-
cmake -DSANITIZER=leak -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local ..
5+
cmake -DTILEDB_WERROR=OFF -DTILEDB_VCPKG=ON -DSANITIZER=leak -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local ..
66
make -j4
77
sudo make -C tiledb install
88
sudo ldconfig /usr/local/lib
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set -e -x
2-
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.15.3/tiledb-macos-x86_64-2.15.3-689bea0.tar.gz \
2+
curl --location -o tiledb.tar.gz https://github.com/TileDB-Inc/TileDB/releases/download/2.16.0/tiledb-macos-x86_64-2.16.0-d682dd0.tar.gz \
33
&& sudo tar -C /usr/local -xf tiledb.tar.gz
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
set -e -x
2-
git clone https://github.com/TileDB-Inc/TileDB.git -b 2.15.3
2+
git clone https://github.com/TileDB-Inc/TileDB.git -b 2.16.0
33
cd TileDB
44
mkdir build && cd build
5-
cmake -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
5+
cmake -DTILEDB_WERROR=OFF -DTILEDB_VCPKG=ON -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
66
make -j$(nproc)
77
sudo make -C tiledb install
88
sudo ldconfig
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set -e -x
2-
git clone https://github.com/TileDB-Inc/TileDB.git -b 2.15.3
2+
git clone https://github.com/TileDB-Inc/TileDB.git -b 2.16.0
33
cd TileDB
44
mkdir build && cd build
5-
cmake -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
5+
cmake -DTILEDB_WERROR=OFF -DTILEDB_VCPKG=ON -DTILEDB_VERBOSE=OFF -DTILEDB_S3=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
66
make -j$(sysctl -n hw.ncpu)
77
sudo make -C tiledb install

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ as such the below table reference which versions are compatible.
7777
| 0.19.0 | 2.13.X |
7878
| 0.20.0 | 2.14.X |
7979
| 0.21.0 | 2.15.X |
80+
| 0.22.0 | 2.16.X |
8081

8182

8283
## Missing Functionality

enums.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ const (
507507
TILEDB_FILTER_POSITIVE_DELTA FilterType = C.TILEDB_FILTER_POSITIVE_DELTA
508508
// TILEDB_FILTER_SCALE_FLOAT FILTER_SCALE_FLOAT float scaling filter.
509509
TILEDB_FILTER_SCALE_FLOAT FilterType = C.TILEDB_FILTER_SCALE_FLOAT
510+
// TILEDB_FILTER_DELTA Delta encoding filter.
511+
TILEDB_FILTER_DELTA FilterType = C.TILEDB_FILTER_DELTA
510512
)
511513

512514
// FilterOption for a given filter
@@ -562,6 +564,8 @@ const (
562564
TILEDB_INCOMPLETE QueryStatus = C.TILEDB_INCOMPLETE
563565
// TILEDB_UNINITIALIZED Query not initialized.
564566
TILEDB_UNINITIALIZED QueryStatus = C.TILEDB_UNINITIALIZED
567+
// TILEDB_INITIALIZED Query initialized.
568+
TILEDB_INITIALIZED QueryStatus = C.TILEDB_INITIALIZED
565569
)
566570

567571
// String returns string representation

group_test.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,6 @@ func TestGroupDelete(t *testing.T) {
276276
return []string{outerGroupURI, outerArrayURI, innerGroupURI, innerArrayURI}
277277
}
278278

279-
// TileDB core versions 2.15.2, 2.15.3 and the upcoming 2.15.4
280-
// are slightly different on the files they leave behind after delete
281-
// To be compatible with all we check that a deleted group misses the `group.tdb` file
282-
// and a delete array has an empty `__schema` dir
283-
284279
t.Run("recursive", func(t *testing.T) {
285280
uris := setup(t)
286281

@@ -304,12 +299,12 @@ func TestGroupDelete(t *testing.T) {
304299
require.NoError(t, err)
305300
require.False(t, exists)
306301

307-
dirSize, err := vfs.DirSize(uris[1] + "/__schema")
302+
exists, err = vfs.IsDir(uris[1] + "/__schema")
308303
require.NoError(t, err)
309-
require.Equal(t, uint64(0), dirSize)
310-
dirSize, err = vfs.DirSize(uris[1] + "/__schema")
304+
require.False(t, exists)
305+
exists, err = vfs.IsDir(uris[1] + "/__schema")
311306
require.NoError(t, err)
312-
require.Equal(t, uint64(0), dirSize)
307+
require.False(t, exists)
313308
})
314309

315310
t.Run("nonrecursive", func(t *testing.T) {

query_condition.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ func NewQueryConditionCombination(tdbCtx *Context, left *QueryCondition, op Quer
4646
return &qc, nil
4747
}
4848

49+
// NewQueryConditionNegated return the negation of the query condition. The initial condition
50+
// is unchanged
51+
func NewQueryConditionNegated(tdbCtx *Context, qc *QueryCondition) (*QueryCondition, error) {
52+
nqc := QueryCondition{context: tdbCtx}
53+
if ret := C.tiledb_query_condition_negate(qc.context.tiledbContext, qc.cond, &nqc.cond); ret != C.TILEDB_OK {
54+
return nil, fmt.Errorf("Error allocating tiledb query condition: %s", qc.context.LastError())
55+
}
56+
freeOnGC(&nqc)
57+
58+
return &nqc, nil
59+
}
60+
4961
// Free releases the internal TileDB core data that was allocated on the C heap.
5062
// It is automatically called when this object is garbage collected, but can be
5163
// called earlier to manually release memory if needed. Free is idempotent and

query_condition_test.go

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@ func testQueryConditionInt32(t *testing.T, array *Array) {
4747
name string
4848
opValue int32
4949
op QueryConditionOp
50+
negate bool
5051
expectedValues []int32
5152
}{
52-
{"GreaterThan1", 1, TILEDB_QUERY_CONDITION_GT, []int32{2, 3}},
53-
{"LessThan3", 3, TILEDB_QUERY_CONDITION_LT, []int32{1, 2}},
54-
{"EqualTo2", 2, TILEDB_QUERY_CONDITION_EQ, []int32{2}},
53+
{"GreaterThan1", 1, TILEDB_QUERY_CONDITION_GT, false, []int32{2, 3}},
54+
{"NotGreaterThan1", 1, TILEDB_QUERY_CONDITION_GT, true, []int32{1}},
55+
{"LessThan3", 3, TILEDB_QUERY_CONDITION_LT, false, []int32{1, 2}},
56+
{"NotLessThan3", 3, TILEDB_QUERY_CONDITION_LT, true, []int32{3}},
57+
{"EqualTo2", 2, TILEDB_QUERY_CONDITION_EQ, false, []int32{2}},
58+
{"NotEqualTo2", 2, TILEDB_QUERY_CONDITION_EQ, true, []int32{1, 3}},
5559
}
5660
for _, c := range a1Cases {
5761
c := c
@@ -69,6 +73,11 @@ func testQueryConditionInt32(t *testing.T, array *Array) {
6973
qc, err := NewQueryCondition(array.context, "a1", c.op, c.opValue)
7074
require.NoError(t, err)
7175

76+
if c.negate {
77+
qc, err = NewQueryConditionNegated(array.context, qc)
78+
require.NoError(t, err)
79+
}
80+
7281
err = query.SetQueryCondition(qc)
7382
require.NoError(t, err)
7483

@@ -96,6 +105,7 @@ func testQueryConditionInt32(t *testing.T, array *Array) {
96105
op2 QueryConditionOp
97106
op2Value int32
98107
combinationCondition QueryConditionCombinationOp
108+
negate bool
99109
expectedValues []int32
100110
}{
101111
{
@@ -105,8 +115,19 @@ func testQueryConditionInt32(t *testing.T, array *Array) {
105115
op2: TILEDB_QUERY_CONDITION_LT,
106116
op2Value: 3,
107117
combinationCondition: TILEDB_QUERY_CONDITION_AND,
118+
negate: false,
108119
expectedValues: []int32{2},
109120
},
121+
{
122+
name: "NotGreaterThan1AndLessThan3",
123+
op1: TILEDB_QUERY_CONDITION_GT,
124+
op1Value: 1,
125+
op2: TILEDB_QUERY_CONDITION_LT,
126+
op2Value: 3,
127+
combinationCondition: TILEDB_QUERY_CONDITION_AND,
128+
negate: true,
129+
expectedValues: []int32{1, 3},
130+
},
110131
}
111132
for _, c := range a1CombinationCases {
112133
c := c
@@ -130,6 +151,11 @@ func testQueryConditionInt32(t *testing.T, array *Array) {
130151
qc, err := NewQueryConditionCombination(array.context, qc1, c.combinationCondition, qc2)
131152
require.NoError(t, err)
132153

154+
if c.negate {
155+
qc, err = NewQueryConditionNegated(array.context, qc)
156+
require.NoError(t, err)
157+
}
158+
133159
err = query.SetQueryCondition(qc)
134160
require.NoError(t, err)
135161

0 commit comments

Comments
 (0)