duckdb 0.6.1-dev17.0 → 0.6.1-dev187.0
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.
- package/package.json +1 -1
- package/src/connection.cpp +100 -99
- package/src/duckdb.cpp +666 -174
- package/src/duckdb.hpp +1880 -1685
- package/src/duckdb_node.hpp +0 -1
- package/src/parquet-amalgamation.cpp +37186 -37184
- package/src/parquet-amalgamation.hpp +0 -2
- package/test/arrow.test.js +36 -45
|
@@ -799,7 +799,6 @@ protected:
|
|
|
799
799
|
#ifndef _DUCKDB_THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_
|
|
800
800
|
#define _DUCKDB_THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ 1
|
|
801
801
|
|
|
802
|
-
// FUCK OFF #include <boost/numeric/conversion/cast.hpp>
|
|
803
802
|
#include <string>
|
|
804
803
|
|
|
805
804
|
|
|
@@ -6297,7 +6296,6 @@ TType TCompactProtocolT<Transport_>::getTType(int8_t type) {
|
|
|
6297
6296
|
#include <cstddef>
|
|
6298
6297
|
#include <cstring>
|
|
6299
6298
|
#include <limits>
|
|
6300
|
-
//#include <boost/scoped_array.hpp> // FUCK OFF
|
|
6301
6299
|
|
|
6302
6300
|
|
|
6303
6301
|
|
package/test/arrow.test.js
CHANGED
|
@@ -1,60 +1,51 @@
|
|
|
1
|
-
var
|
|
1
|
+
var duckdb = require('..');
|
|
2
2
|
var assert = require('assert');
|
|
3
3
|
var fs = require('fs');
|
|
4
4
|
|
|
5
|
-
describe('
|
|
6
|
-
var db;
|
|
7
|
-
before(function(done) {
|
|
8
|
-
db = new sqlite3.Database(':memory:', done);
|
|
9
|
-
});
|
|
10
|
-
|
|
5
|
+
describe('arrow IPC API fails neatly when extension not loaded', function() {
|
|
11
6
|
// Note: arrow IPC api requires the arrow extension to be loaded. The tests for this functionality reside in:
|
|
12
7
|
// https://github.com/duckdblabs/arrow
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
done();
|
|
19
|
-
});
|
|
8
|
+
let db;
|
|
9
|
+
let conn;
|
|
10
|
+
before((done) => {
|
|
11
|
+
db = new duckdb.Database(':memory:', {"allow_unsigned_extensions": "true"}, () => {
|
|
12
|
+
done();
|
|
20
13
|
});
|
|
14
|
+
});
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
db.arrowIPCStream(query).then(
|
|
27
|
-
() => Promise.reject(new Error('Expected method to reject.')),
|
|
28
|
-
err => {
|
|
29
|
-
assert(err.message.includes("Catalog Error: Function with name to_arrow_ipc is not on the catalog, but it exists in the arrow extension. To Install and Load the extension, run: INSTALL arrow; LOAD arrow;"))
|
|
30
|
-
}
|
|
31
|
-
);
|
|
16
|
+
it(`basic examples`, async () => {
|
|
17
|
+
const range_size = 130000;
|
|
18
|
+
const query = `SELECT * FROM range(0,${range_size}) tbl(i)`;
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
20
|
+
db.arrowIPCStream(query).then(
|
|
21
|
+
() => Promise.reject(new Error('Expected method to reject.')),
|
|
22
|
+
err => {
|
|
23
|
+
assert(err.message.includes("Catalog Error: Function with name to_arrow_ipc is not on the catalog, but it exists in the arrow extension. To Install and Load the extension, run: INSTALL arrow; LOAD arrow;"))
|
|
24
|
+
}
|
|
25
|
+
);
|
|
40
26
|
|
|
41
|
-
|
|
27
|
+
db.arrowIPCAll(`SELECT * FROM ipc_table`, function (err, result) {
|
|
28
|
+
if (err) {
|
|
29
|
+
assert(err.message.includes("Catalog Error: Function with name to_arrow_ipc is not on the catalog, but it exists in the arrow extension. To Install and Load the extension, run: INSTALL arrow; LOAD arrow;"))
|
|
30
|
+
} else {
|
|
31
|
+
assert.fail("Expected error");
|
|
32
|
+
}
|
|
42
33
|
});
|
|
43
34
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
db.register_buffer();
|
|
47
|
-
assert(0);
|
|
48
|
-
} catch (error) {
|
|
49
|
-
assert(error.message.includes('Register buffer currently not implemented'))
|
|
50
|
-
}
|
|
35
|
+
assert.throws(() => db.register_buffer("ipc_table", [1,'a',1], true), TypeError, "Incorrect parameters");
|
|
36
|
+
});
|
|
51
37
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
it('register buffer should be disabled currently', function(done) {
|
|
39
|
+
db.register_buffer("test", [new Uint8Array(new ArrayBuffer(10))], true, (err) => {
|
|
40
|
+
assert(err)
|
|
41
|
+
assert(err.includes("Function with name scan_arrow_ipc is not on the catalog, but it exists in the arrow extension. To Install and Load the extension, run: INSTALL arrow; LOAD arrow;"));
|
|
42
|
+
done()
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('unregister will silently do nothing', function(done) {
|
|
47
|
+
db.unregister_buffer("test", (err) => {
|
|
48
|
+
assert(!err)
|
|
58
49
|
done()
|
|
59
50
|
});
|
|
60
51
|
});
|