duckdb 0.5.2-dev648.0 → 0.5.2-dev656.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.cpp +32 -5
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +37627 -37627
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -66815,6 +66815,8 @@ public:
|
|
|
66815
66815
|
DUCKDB_API void Bind(vector<Value> values);
|
|
66816
66816
|
//! Get the expected SQL Type of the bound parameter
|
|
66817
66817
|
DUCKDB_API LogicalType GetType(idx_t param_index);
|
|
66818
|
+
//! Try to get the expected SQL Type of the bound parameter
|
|
66819
|
+
DUCKDB_API bool TryGetType(idx_t param_idx, LogicalType &result);
|
|
66818
66820
|
};
|
|
66819
66821
|
|
|
66820
66822
|
} // namespace duckdb
|
|
@@ -77451,6 +77453,9 @@ bool BufferedCSVReader::AddRow(DataChunk &insert_chunk, idx_t &column) {
|
|
|
77451
77453
|
if (row_empty) {
|
|
77452
77454
|
row_empty = false;
|
|
77453
77455
|
if (sql_types.size() != 1) {
|
|
77456
|
+
if (mode == ParserMode::PARSING) {
|
|
77457
|
+
FlatVector::SetNull(parse_chunk.data[0], parse_chunk.size(), false);
|
|
77458
|
+
}
|
|
77454
77459
|
column = 0;
|
|
77455
77460
|
return false;
|
|
77456
77461
|
}
|
|
@@ -126192,6 +126197,7 @@ using duckdb::Connection;
|
|
|
126192
126197
|
using duckdb::date_t;
|
|
126193
126198
|
using duckdb::dtime_t;
|
|
126194
126199
|
using duckdb::hugeint_t;
|
|
126200
|
+
using duckdb::LogicalType;
|
|
126195
126201
|
using duckdb::MaterializedQueryResult;
|
|
126196
126202
|
using duckdb::PreparedStatementWrapper;
|
|
126197
126203
|
using duckdb::QueryResultType;
|
|
@@ -126231,11 +126237,11 @@ duckdb_type duckdb_param_type(duckdb_prepared_statement prepared_statement, idx_
|
|
|
126231
126237
|
if (!wrapper || !wrapper->statement || wrapper->statement->HasError()) {
|
|
126232
126238
|
return DUCKDB_TYPE_INVALID;
|
|
126233
126239
|
}
|
|
126234
|
-
|
|
126235
|
-
if (
|
|
126240
|
+
LogicalType param_type;
|
|
126241
|
+
if (!wrapper->statement->data->TryGetType(param_idx, param_type)) {
|
|
126236
126242
|
return DUCKDB_TYPE_INVALID;
|
|
126237
126243
|
}
|
|
126238
|
-
return ConvertCPPTypeToC(
|
|
126244
|
+
return ConvertCPPTypeToC(param_type);
|
|
126239
126245
|
}
|
|
126240
126246
|
|
|
126241
126247
|
duckdb_state duckdb_clear_bindings(duckdb_prepared_statement prepared_statement) {
|
|
@@ -140402,12 +140408,25 @@ void PreparedStatementData::Bind(vector<Value> values) {
|
|
|
140402
140408
|
}
|
|
140403
140409
|
}
|
|
140404
140410
|
|
|
140405
|
-
|
|
140411
|
+
bool PreparedStatementData::TryGetType(idx_t param_idx, LogicalType &result) {
|
|
140406
140412
|
auto it = value_map.find(param_idx);
|
|
140407
140413
|
if (it == value_map.end()) {
|
|
140414
|
+
return false;
|
|
140415
|
+
}
|
|
140416
|
+
if (it->second->return_type.id() != LogicalTypeId::INVALID) {
|
|
140417
|
+
result = it->second->return_type;
|
|
140418
|
+
} else {
|
|
140419
|
+
result = it->second->value.type();
|
|
140420
|
+
}
|
|
140421
|
+
return true;
|
|
140422
|
+
}
|
|
140423
|
+
|
|
140424
|
+
LogicalType PreparedStatementData::GetType(idx_t param_idx) {
|
|
140425
|
+
LogicalType result;
|
|
140426
|
+
if (!TryGetType(param_idx, result)) {
|
|
140408
140427
|
throw BinderException("Could not find parameter with index %llu", param_idx);
|
|
140409
140428
|
}
|
|
140410
|
-
return
|
|
140429
|
+
return result;
|
|
140411
140430
|
}
|
|
140412
140431
|
|
|
140413
140432
|
} // namespace duckdb
|
|
@@ -148719,6 +148738,9 @@ unique_ptr<JoinNode> JoinOrderOptimizer::CreateJoinTree(JoinRelationSet *set,
|
|
|
148719
148738
|
return CreateJoinTree(set, possible_connections, right, left);
|
|
148720
148739
|
}
|
|
148721
148740
|
if (plan != plans.end()) {
|
|
148741
|
+
if (!plan->second) {
|
|
148742
|
+
throw InternalException("No plan: internal error in join order optimizer");
|
|
148743
|
+
}
|
|
148722
148744
|
expected_cardinality = plan->second->GetCardinality();
|
|
148723
148745
|
best_connection = possible_connections.back();
|
|
148724
148746
|
} else if (possible_connections.empty()) {
|
|
@@ -148755,6 +148777,9 @@ JoinNode *JoinOrderOptimizer::EmitPair(JoinRelationSet *left, JoinRelationSet *r
|
|
|
148755
148777
|
// get the left and right join plans
|
|
148756
148778
|
auto &left_plan = plans[left];
|
|
148757
148779
|
auto &right_plan = plans[right];
|
|
148780
|
+
if (!left_plan || !right_plan) {
|
|
148781
|
+
throw InternalException("No left or right plan: internal error in join order optimizer");
|
|
148782
|
+
}
|
|
148758
148783
|
auto new_set = set_manager.Union(left, right);
|
|
148759
148784
|
// create the join tree based on combining the two plans
|
|
148760
148785
|
auto new_plan = CreateJoinTree(new_set, info, left_plan.get(), right_plan.get());
|
|
@@ -148787,6 +148812,7 @@ JoinNode *JoinOrderOptimizer::EmitPair(JoinRelationSet *left, JoinRelationSet *r
|
|
|
148787
148812
|
}
|
|
148788
148813
|
}
|
|
148789
148814
|
|
|
148815
|
+
D_ASSERT(new_plan);
|
|
148790
148816
|
plans[new_set] = move(new_plan);
|
|
148791
148817
|
return result;
|
|
148792
148818
|
}
|
|
@@ -149437,6 +149463,7 @@ unique_ptr<LogicalOperator> JoinOrderOptimizer::Optimize(unique_ptr<LogicalOpera
|
|
|
149437
149463
|
cardinality_estimator.InitCardinalityEstimatorProps(&nodes_ops, &filter_infos);
|
|
149438
149464
|
|
|
149439
149465
|
for (auto &node_op : nodes_ops) {
|
|
149466
|
+
D_ASSERT(node_op.node);
|
|
149440
149467
|
plans[node_op.node->set] = move(node_op.node);
|
|
149441
149468
|
}
|
|
149442
149469
|
// now we perform the actual dynamic programming to compute the final result
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.5.2-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "673868e0d"
|
|
15
|
+
#define DUCKDB_VERSION "v0.5.2-dev656"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|