-
Notifications
You must be signed in to change notification settings - Fork 90
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
Ongoing fixes #356
Ongoing fixes #356
Conversation
…on is fixed in upstream" This reverts commit 21bf870.
Silence Disconnect logging
Some refactoring
Add Date/DateTime/DateTime64 testing
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.
There are some minor questions, but overall looks good.
driver/connection.cpp
Outdated
void Connection::verifyConnection() { | ||
LOG("Verifying connection and credentials..."); | ||
auto & statement = allocateChild<Statement>(); | ||
statement.executeQuery("SELECT 1"); |
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.
Can executeQuery()
throw an exception? If yes, will the statement be successfully deallocated later?
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.
Yeah, I should have added a proper cleanup there. Will fix.
|
||
const auto tmp_type_without_parameters_id = convertUnparametrizedTypeNameToTypeId(tmp_type_name_without_parameters); | ||
|
||
if (huge_int_as_string && tmp_type_without_parameters_id == DataSourceTypeId::UInt64) { |
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.
What about other wide types, like Int128
, UInt128
, Decimal128
and wider?
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.
Int128
/UInt128
are not supported in the driver yet. Decimal128
is extracted as string or double anyway (there is no standard Decimal C type), so no need to alter the way it is reported to the ODBC clients.
void RowBinaryWithNamesAndTypesResultSet::readValue(DataSourceType<DataSourceTypeId::Date> & dest, ColumnInfo & column_info) { | ||
WireTypeDateAsInt dest_raw; | ||
WireTypeDateAsInt dest_raw(column_info.timezone); |
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.
Date
has no timezone in CH: https://clickhouse.tech/docs/en/sql-reference/data-types/date/
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.
Yeah, but the timezone (of the data/server) might be used when it is converted (read by the user) to some DateTime structures.
@@ -152,14 +153,24 @@ void RowBinaryWithNamesAndTypesResultSet::readValue(WireTypeDateTimeAsInt & dest | |||
readPOD(dest.value); | |||
} | |||
|
|||
void RowBinaryWithNamesAndTypesResultSet::readValue(WireTypeDateTime64AsInt & dest, ColumnInfo & column_info) { | |||
readPOD(dest.value); |
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.
Did you forget to use\convert value according to a timezone?
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.
It should be done later on the call stack (TODO
yet, not the goal of this PR):
driver/test/datetime_it.cpp
Outdated
|
||
class DateTime | ||
: public ClientTestWithParamBase< | ||
std::tuple< |
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.
IMO it is better to use named struct here, it is easier to read and reason about.
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.
Changed.
* master: Bump submodules Rewrite workflows Test action
…tion string parameter values
GCC builds in macOS are failing due to nanodbc - a fix for that was proposed in their repo, once (and if) it is merged and submodule here is bumped, these failures will be gone. For now, it is fairly safe to merge with those builds failing. |
README.md
VerifyConnectionEarly
functionality to enable extra check onSQLConnect()
HugeIntAsString
functionality