test case for nulls

This commit is contained in:
Colin Dellow 2018-03-04 22:48:39 -05:00
parent 67005623df
commit 56245c1d3d
3 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,3 @@
100-rows-nulls.parquet
SELECT SUM(CASE WHEN bool_0 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int8_1 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int16_2 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int32_3 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int64_4 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN ts_5 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN double_6 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN string_7 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN string_8 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN binary_9 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN fixed_size_binary IS NULL THEN 1 ELSE 0 END) from test;
50|50|50|50|50|50|50|50|50|50|50

View File

@ -26,7 +26,7 @@ main() {
supported_files=$(find . -type f -name '*.parquet' -not -name 'unsupported*.parquet') supported_files=$(find . -type f -name '*.parquet' -not -name 'unsupported*.parquet')
while read -r supported; do while read -r supported; do
echo "Testing: $supported" echo "Testing: $supported"
if ! "$root"/sqlite/sqlite3 -init <(load_supported "$supported") < /dev/null > /dev/null 2> testcase-err.txt; then if ! "$root"/sqlite/sqlite3 -init <(load_supported "$supported") < /dev/null > /dev/null 2> testcase-stderr.txt; then
echo "...FAILED; check testcase-{out,err}.txt" >&2 echo "...FAILED; check testcase-{out,err}.txt" >&2
exit 1 exit 1
fi fi

View File

@ -25,7 +25,7 @@ main() {
unsupported_files=$(find . -type f -name 'unsupported*.parquet') unsupported_files=$(find . -type f -name 'unsupported*.parquet')
while read -r unsupported; do while read -r unsupported; do
echo "Testing: $unsupported" echo "Testing: $unsupported"
"$root"/sqlite/sqlite3 -init <(load_unsupported "$unsupported") < /dev/null > /dev/null 2> testcase-err.txt "$root"/sqlite/sqlite3 -init <(load_unsupported "$unsupported") < /dev/null > /dev/null 2> testcase-stderr.txt
# We expect the 'SELECT 123' command to NOT have been run # We expect the 'SELECT 123' command to NOT have been run
if grep -q 123 testcase-out.txt; then if grep -q 123 testcase-out.txt; then
echo "...FAILED; expected an error message. Check testcase-{out,err}.txt" >&2 echo "...FAILED; expected an error message. Check testcase-{out,err}.txt" >&2