mirror of
https://github.com/cldellow/sqlite-parquet-vtable.git
synced 2025-10-25 01:49:56 +00:00
All-in-one build command
`./make-linux` clones and builds: - arrow - brotli - lz4 - parquet - snappy - zlib - zstd - this project as a statically linked binary. Two Boost libs are still pulled in as shared libs, should probably fix that, too, for ultimate portability.
This commit is contained in:
@@ -6,7 +6,7 @@ set -euo pipefail
|
||||
load_nonexistent() {
|
||||
cat <<EOF
|
||||
.echo on
|
||||
.load parquet/libparquet
|
||||
.load build/linux/libparquet
|
||||
.testcase notfound
|
||||
.bail on
|
||||
CREATE VIRTUAL TABLE test USING parquet('$root/doesnotexist.parquet');
|
||||
|
||||
@@ -9,7 +9,7 @@ run_query() {
|
||||
query=${2:?must provide query to run}
|
||||
basename=$(basename "$file")
|
||||
cat <<EOF
|
||||
.load parquet/libparquet
|
||||
.load build/linux/libparquet
|
||||
.testcase $basename
|
||||
.bail on
|
||||
CREATE VIRTUAL TABLE IF NOT EXISTS nulls1 USING parquet('$root/parquet-generator/99-rows-nulls-1.parquet');
|
||||
|
||||
@@ -69,7 +69,7 @@ def test_statement(conn, table, column_values, all_values):
|
||||
rv = [row for row in conn.execute(new_query)]
|
||||
if gold != rv:
|
||||
with open('testcase-cmds.txt', 'w') as f:
|
||||
f.write('.load parquet/libparquet\n.testcase query\n.bail on\n{};\n.output\n'.format(new_query))
|
||||
f.write('.load build/linux/libparquet\n.testcase query\n.bail on\n{};\n.output\n'.format(new_query))
|
||||
with open('testcase-expected.txt', 'w') as f:
|
||||
for row in gold:
|
||||
f.write('{}\n'.format(row))
|
||||
@@ -105,5 +105,5 @@ def test_db(db_file, extension_file, tables):
|
||||
|
||||
if __name__ == '__main__':
|
||||
db_file = os.path.abspath(os.path.join(__file__, '..', '..', 'test.db'))
|
||||
extension_file = os.path.abspath(os.path.join(__file__, '..', '..', 'parquet', 'libparquet.so'))
|
||||
extension_file = os.path.abspath(os.path.join(__file__, '..', '..', 'build', 'linux', 'libparquet.so'))
|
||||
test_db(db_file, extension_file, ['nulls', 'no_nulls'])
|
||||
|
||||
@@ -9,7 +9,7 @@ load_supported() {
|
||||
basename=$(basename "$file")
|
||||
cat <<EOF
|
||||
.echo on
|
||||
.load parquet/libparquet
|
||||
.load build/linux/libparquet
|
||||
.testcase $basename
|
||||
.bail on
|
||||
CREATE VIRTUAL TABLE test USING parquet('$file');
|
||||
@@ -23,7 +23,7 @@ main() {
|
||||
root=$(readlink -f "$root")
|
||||
cd "$root"
|
||||
|
||||
supported_files=$(find . -type f -name '*.parquet' -not -name 'unsupported*.parquet')
|
||||
supported_files=$(find ./parquet-generator/ -type f -name '*.parquet' -not -name 'unsupported*.parquet')
|
||||
while read -r supported; do
|
||||
echo "Testing: $supported"
|
||||
if ! "$root"/sqlite/sqlite3 -init <(load_supported "$supported") < /dev/null > /dev/null 2> testcase-stderr.txt; then
|
||||
|
||||
@@ -9,7 +9,7 @@ load_unsupported() {
|
||||
basename=$(basename "$file")
|
||||
cat <<EOF
|
||||
.echo on
|
||||
.load parquet/libparquet
|
||||
.load build/linux/libparquet
|
||||
.testcase $basename
|
||||
.bail on
|
||||
CREATE VIRTUAL TABLE test USING parquet('$file');
|
||||
|
||||
Reference in New Issue
Block a user