duckdb 0.7.2-dev2675.0 → 0.7.2-dev2699.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb/src/common/adbc/adbc.cpp +5 -2
- package/src/duckdb/src/execution/operator/persistent/parallel_csv_reader.cpp +4 -0
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/main/query_result.hpp +1 -1
- package/src/duckdb/src/main/client_context.cpp +1 -1
- package/src/duckdb/src/main/query_result.cpp +1 -1
package/package.json
CHANGED
@@ -72,7 +72,10 @@ AdbcStatusCode DatabaseNew(struct AdbcDatabase *database, struct AdbcError *erro
|
|
72
72
|
CHECK_TRUE(database, error, "Missing database object");
|
73
73
|
|
74
74
|
database->private_data = nullptr;
|
75
|
-
|
75
|
+
// you can't malloc a struct with a non-trivial C++ constructor
|
76
|
+
// and std::string has a non-trivial constructor. so we need
|
77
|
+
// to use new and delete rather than malloc and free.
|
78
|
+
auto wrapper = new DuckDBAdbcDatabaseWrapper;
|
76
79
|
CHECK_TRUE(wrapper, error, "Allocation error");
|
77
80
|
|
78
81
|
database->private_data = wrapper;
|
@@ -112,7 +115,7 @@ AdbcStatusCode DatabaseRelease(struct AdbcDatabase *database, struct AdbcError *
|
|
112
115
|
|
113
116
|
duckdb_close(&wrapper->database);
|
114
117
|
duckdb_destroy_config(&wrapper->config);
|
115
|
-
|
118
|
+
delete wrapper;
|
116
119
|
database->private_data = nullptr;
|
117
120
|
}
|
118
121
|
return ADBC_STATUS_OK;
|
@@ -124,6 +124,8 @@ bool ParallelCSVReader::SetPosition(DataChunk &insert_chunk) {
|
|
124
124
|
while (!successfully_read_first_line) {
|
125
125
|
DataChunk first_line_chunk;
|
126
126
|
first_line_chunk.Initialize(allocator, return_types);
|
127
|
+
// Ensure that parse_chunk has no gunk when trying to figure new line
|
128
|
+
parse_chunk.Reset();
|
127
129
|
for (; position_buffer < end_buffer; position_buffer++) {
|
128
130
|
if (StringUtil::CharacterIsNewline((*buffer)[position_buffer])) {
|
129
131
|
bool carriage_return = (*buffer)[position_buffer] == '\r';
|
@@ -183,6 +185,8 @@ bool ParallelCSVReader::SetPosition(DataChunk &insert_chunk) {
|
|
183
185
|
if (verification_positions.beginning_of_first_line == 0) {
|
184
186
|
verification_positions.beginning_of_first_line = position_buffer;
|
185
187
|
}
|
188
|
+
// Ensure that parse_chunk has no gunk when trying to figure new line
|
189
|
+
parse_chunk.Reset();
|
186
190
|
|
187
191
|
verification_positions.end_of_last_line = position_buffer;
|
188
192
|
finished = false;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
2
|
-
#define DUCKDB_VERSION "0.7.2-
|
2
|
+
#define DUCKDB_VERSION "0.7.2-dev2699"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
5
|
+
#define DUCKDB_SOURCE_ID "199c0211c7"
|
6
6
|
#endif
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
8
8
|
#include "duckdb/main/database.hpp"
|
@@ -20,7 +20,7 @@ enum class QueryResultType : uint8_t { MATERIALIZED_RESULT, STREAM_RESULT, PENDI
|
|
20
20
|
|
21
21
|
//! A set of properties from the client context that can be used to interpret the query result
|
22
22
|
struct ClientProperties {
|
23
|
-
string
|
23
|
+
string time_zone;
|
24
24
|
};
|
25
25
|
|
26
26
|
class BaseQueryResult {
|
@@ -1156,7 +1156,7 @@ ParserOptions ClientContext::GetParserOptions() const {
|
|
1156
1156
|
|
1157
1157
|
ClientProperties ClientContext::GetClientProperties() const {
|
1158
1158
|
ClientProperties properties;
|
1159
|
-
properties.
|
1159
|
+
properties.time_zone = ClientConfig::GetConfig(*this).ExtractTimezone();
|
1160
1160
|
return properties;
|
1161
1161
|
}
|
1162
1162
|
|
@@ -165,7 +165,7 @@ string QueryResult::HeaderToString() {
|
|
165
165
|
}
|
166
166
|
|
167
167
|
string QueryResult::GetConfigTimezone(QueryResult &query_result) {
|
168
|
-
return query_result.client_properties.
|
168
|
+
return query_result.client_properties.time_zone;
|
169
169
|
}
|
170
170
|
|
171
171
|
} // namespace duckdb
|