Skip to content

Commit

Permalink
Merge branch 'type_support_tests' into array_type_support
Browse files Browse the repository at this point in the history
  • Loading branch information
Tishj committed May 29, 2024
2 parents 5847943 + 759d0d8 commit 150fd77
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ third_party/duckdb/Makefile:
git submodule update --init --recursive

third_party/duckdb/build/$(QUACK_BUILD_DUCKDB)/src/$(DUCKDB_LIB):
$(MAKE) -C third_party/duckdb $(QUACK_BUILD_DUCKDB) DISABLE_SANITIZER=1 ENABLE_UBSAN=0 BUILD_UNITTESTS=OFF BUILD_HTTPFS=1 CMAKE_EXPORT_COMPILE_COMMANDS=1 -j8
$(MAKE) -C third_party/duckdb \
$(QUACK_BUILD_DUCKDB) \
DISABLE_SANITIZER=1 \
ENABLE_UBSAN=0 \
BUILD_UNITTESTS=OFF \
BUILD_HTTPFS=1 \
BUILD_JSON=1 \
CMAKE_EXPORT_COMPILE_COMMANDS=1 \
-j8

install-duckdb:
$(install_bin) -m 755 third_party/duckdb/build/$(QUACK_BUILD_DUCKDB)/src/$(DUCKDB_LIB) $(DESTDIR)$(PG_LIB)
Expand Down
1 change: 1 addition & 0 deletions include/quack/types/decimal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
(weight) >= NUMERIC_SHORT_WEIGHT_MIN)

#include "duckdb.hpp"
#include <cmath>

extern "C" {
#include "postgres.h"
Expand Down
8 changes: 8 additions & 0 deletions test/regression/expected/array_type_support.out
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ INSERT INTO char_array_1d SELECT CAST(a as CHAR[]) FROM (VALUES
('{}')
) t(a);
SELECT * FROM char_array_1d;
a
-----------
{a,b,c}

{t,f,Z,A}
{}
(4 rows)

DROP TABLE int_array_1d;
DROP TABLE bool_array_1d;
DROP TABLE char_array_1d;
2 changes: 0 additions & 2 deletions test/regression/expected/type_support.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
drop extension if exists quack;
create extension quack;
-- CHAR
CREATE TABLE chr(a CHAR);
INSERT INTO chr SELECT CAST(a AS CHAR) from (VALUES (-128), (0), (127)) t(a);
Expand Down
4 changes: 3 additions & 1 deletion test/regression/schedule
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
test: basic
test: search_path
test: search_path
test: type_support
test: array_type_support
3 changes: 0 additions & 3 deletions test/regression/sql/type_support.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
drop extension if exists quack;
create extension quack;

-- CHAR
CREATE TABLE chr(a CHAR);
INSERT INTO chr SELECT CAST(a AS CHAR) from (VALUES (-128), (0), (127)) t(a);
Expand Down

0 comments on commit 150fd77

Please sign in to comment.