Skip to content

Commit

Permalink
fix up tests and compilation (uint64 -> uint64_t)
Browse files Browse the repository at this point in the history
Tishj committed May 27, 2024
1 parent 238aa20 commit 78d66cf
Showing 3 changed files with 19 additions and 3 deletions.
19 changes: 18 additions & 1 deletion expected/type_support.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
drop extension if exists quack;
create extension quack;
-- CHAR
CREATE TABLE chr(a CHAR);
@@ -221,6 +220,23 @@ SELECT * FROM uuid_tbl;
00000000-0000-0000-0000-000000000000
(3 rows)

-- JSON
CREATE TABLE json_tbl(a JSON);
INSERT INTO json_tbl SELECT CAST(a as JSON) FROM (VALUES
('{"key1": "value1", "key2": "value2"}'),
('["item1", "item2", "item3"]'),
(NULL),
('{}')
) t(a);
SELECT * FROM json_tbl;
a
--------------------------------------
{"key1": "value1", "key2": "value2"}
["item1", "item2", "item3"]

{}
(4 rows)

DROP TABLE chr;
DROP TABLE small;
DROP TABLE intgr;
@@ -236,3 +252,4 @@ DROP TABLE integer_numeric;
DROP TABLE bigint_numeric;
DROP TABLE hugeint_numeric;
DROP TABLE uuid_tbl;
DROP TABLE json_tbl;
1 change: 0 additions & 1 deletion sql/type_support.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
drop extension if exists quack;
create extension quack;

-- CHAR
2 changes: 1 addition & 1 deletion src/utility/copy.cpp
Original file line number Diff line number Diff line change
@@ -129,6 +129,6 @@ quack_copy(PlannedStmt *pstmt, const char *queryString, struct QueryEnvironment
}

auto chunk = res->Fetch();
*processed = chunk->GetValue(0, 0).GetValue<uint64>();
*processed = chunk->GetValue(0, 0).GetValue<uint64_t>();
return true;
}

0 comments on commit 78d66cf

Please sign in to comment.