diff --git a/.gitignore b/.gitignore index 79de523..935812d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ /sqlite-autoconf* /cmds.txt /sqlite-with-parquet +/testcase-out.txt +/testcase-err.txt diff --git a/parquet-generator/parquets.py b/parquet-generator/parquets.py index b164e4e..af12105 100644 --- a/parquet-generator/parquets.py +++ b/parquet-generator/parquets.py @@ -79,7 +79,9 @@ def write_unsupported_parquets(): pa.null(), pa.uint8(), pa.uint16(), - pa.uint32(), + # per https://issues.apache.org/jira/browse/ARROW-436, I think + # Parquet v1.0 can't serialize UINT32 + #pa.uint32(), pa.uint64(), # pa.float16() <-- not supported by us, but also not by pyarrow # TODO: list_, struct, dict diff --git a/parquet-generator/unsupported-uint32.parquet b/parquet-generator/unsupported-uint32.parquet deleted file mode 100644 index b9dc0b1..0000000 Binary files a/parquet-generator/unsupported-uint32.parquet and /dev/null differ diff --git a/tests/test-unsupported b/tests/test-unsupported new file mode 100755 index 0000000..1e538df --- /dev/null +++ b/tests/test-unsupported @@ -0,0 +1,37 @@ +#!/bin/bash +set -euo pipefail + +# Verify that all the unsupported.*parquet files result in an error when creating the virtual table, +# but don't segfault. + +load_unsupported() { + file=${1:?must provide file to load} + basename=$(basename "$file") + cat < /dev/null 2> testcase-err.txt + # We expect the 'SELECT 123' command to NOT have been run + if grep -q 123 testcase-out.txt; then + echo "...FAILED" >&2 + exit 1 + fi + done < <(echo "$unsupported_files") +} + +main "$@"