-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(c/driver/postgresql): Duration support #907
Changes from 2 commits
537edfe
8a0f3df
45223e7
1c790d8
ba468c3
b70e00e
c6cbc30
719c3d5
6a93b23
52f55ab
bd39fc9
9b662a8
22936f2
233132c
c74f2f0
dac8ff8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,6 +230,7 @@ class StatementTest { | |
void TestSqlIngestBinary(); | ||
|
||
// Temporal | ||
void TestSqlIngestDuration(); | ||
void TestSqlIngestTimestamp(); | ||
void TestSqlIngestTimestampTz(); | ||
|
||
|
@@ -274,8 +275,8 @@ class StatementTest { | |
template <typename CType> | ||
void TestSqlIngestNumericType(ArrowType type); | ||
|
||
template <enum ArrowTimeUnit TU> | ||
void TestSqlIngestTemporalType(const char* timezone); | ||
template <enum ArrowType T> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Originally I tried to provide ArrowType and ArrowTimeUnit as template parameters, but that kept yielding errors like /home/willayd/clones/arrow-adbc/c/validation/adbc_validation.cc:1173:114: error: macro "ASSERT_NO_FATAL_FAILURE" passed 2 arguments, but takes just 1
1173 | ASSERT_NO_FATAL_FAILURE(TestSqlIngestTemporalType<NANOARROW_TYPE_DURATION, NANOARROW_TIME_UNIT_SECOND>(nullptr));
| ^
In file included from /home/willayd/clones/arrow-adbc/c/validation/adbc_validation.h:26,
from /home/willayd/clones/arrow-adbc/c/validation/adbc_validation.cc:18:
/usr/local/include/gtest/gtest.h:2216: note: macro "ASSERT_NO_FATAL_FAILURE" defined here
2216 | #define ASSERT_NO_FATAL_FAILURE(statement) \ I'm not sure if that is a bug with gtest or my lack of C++ template knowledge, but figured changing the template around like this wasn't a huge deal There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh for future reference, I think you just need |
||
void TestSqlIngestTemporalType(enum ArrowTimeUnit, const char* timezone); | ||
|
||
virtual void ValidateIngestedTemporalData(struct ArrowArrayView* values, | ||
enum ArrowTimeUnit unit, | ||
|
@@ -299,6 +300,7 @@ class StatementTest { | |
TEST_F(FIXTURE, SqlIngestFloat64) { TestSqlIngestFloat64(); } \ | ||
TEST_F(FIXTURE, SqlIngestString) { TestSqlIngestString(); } \ | ||
TEST_F(FIXTURE, SqlIngestBinary) { TestSqlIngestBinary(); } \ | ||
TEST_F(FIXTURE, SqlIngestDuration) { TestSqlIngestDuration(); } \ | ||
TEST_F(FIXTURE, SqlIngestTimestamp) { TestSqlIngestTimestamp(); } \ | ||
TEST_F(FIXTURE, SqlIngestTimestampTz) { TestSqlIngestTimestampTz(); } \ | ||
TEST_F(FIXTURE, SqlIngestAppend) { TestSqlIngestAppend(); } \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought probably want to raise if these are non-zero