Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e5d5fa

Browse files
committed
vendor: Update vendored sources toduckdb/duckdb@bbdc794
Merge v1.2.2 into main (duckdb/duckdb#17037)
1 parent7fb5840 commit3e5d5fa

File tree

13 files changed

+84
-34
lines changed

13 files changed

+84
-34
lines changed

‎src/duckdb/src/common/exception.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ FatalException::FatalException(ExceptionType type, const string &msg) : Exceptio
334334

335335
InternalException::InternalException(const string &msg) : Exception(ExceptionType::INTERNAL, msg) {
336336
#ifdef DUCKDB_CRASH_ON_ASSERT
337-
Printer::Print("ABORT THROWN BY INTERNAL EXCEPTION:" + msg);
338-
Printer::Print(StackTrace::GetStackTrace());
337+
Printer::Print("ABORT THROWN BY INTERNAL EXCEPTION:" + msg +"\n" +StackTrace::GetStackTrace());
339338
abort();
340339
#endif
341340
}

‎src/duckdb/src/common/printer.cpp‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,17 @@ void Printer::RawPrint(OutputStream stream, const string &str) {
3030
#endif
3131
}
3232

33-
// LCOV_EXCL_START
34-
voidPrinter::Print(OutputStream stream,const string &str) {
33+
voidPrinter::DefaultLinePrint(OutputStream stream,const string &str) {
3534
Printer::RawPrint(stream, str);
3635
Printer::RawPrint(stream,"\n");
3736
}
37+
38+
line_printer_f Printer::line_printer = Printer::DefaultLinePrint;
39+
40+
// LCOV_EXCL_START
41+
voidPrinter::Print(OutputStream stream,const string &str) {
42+
Printer::line_printer(stream, str);
43+
}
3844
voidPrinter::Flush(OutputStream stream) {
3945
#ifndef DUCKDB_DISABLE_PRINT
4046
fflush(stream == OutputStream::STREAM_STDERR ? stderr : stdout);

‎src/duckdb/src/execution/operator/persistent/physical_insert.cpp‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static idx_t PerformOnConflictAction(InsertLocalState &lstate, InsertGlobalState
276276
}
277277
auto &local_storage =LocalStorage::Get(context.client, data_table.db);
278278
if (gstate.initialized) {
279-
// Flushthe data first, it might be referenced by theUpdate
279+
// Flushany local appends that could be referenced by theUPDATE.
280280
data_table.FinalizeLocalAppend(gstate.append_state);
281281
gstate.initialized =false;
282282
}
@@ -289,6 +289,11 @@ static idx_t PerformOnConflictAction(InsertLocalState &lstate, InsertGlobalState
289289
data_table.Delete(delete_state, context.client, row_ids, update_chunk.size());
290290
}else {
291291
auto &local_storage =LocalStorage::Get(context.client, data_table.db);
292+
if (gstate.initialized) {
293+
// Flush any local appends that could be referenced by the DELETE.
294+
data_table.FinalizeLocalAppend(gstate.append_state);
295+
gstate.initialized =false;
296+
}
292297
local_storage.Delete(data_table, row_ids, update_chunk.size());
293298
}
294299

‎src/duckdb/src/function/table/version/pragma_version.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef DUCKDB_PATCH_VERSION
2-
#defineDUCKDB_PATCH_VERSION"0-dev2271"
2+
#defineDUCKDB_PATCH_VERSION"0-dev2337"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#defineDUCKDB_MINOR_VERSION3
@@ -8,10 +8,10 @@
88
#defineDUCKDB_MAJOR_VERSION1
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#defineDUCKDB_VERSION"v1.3.0-dev2271"
11+
#defineDUCKDB_VERSION"v1.3.0-dev2337"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#defineDUCKDB_SOURCE_ID"5141aa4560"
14+
#defineDUCKDB_SOURCE_ID"bbdc794b99"
1515
#endif
1616
#include"duckdb/function/table/system_functions.hpp"
1717
#include"duckdb/main/database.hpp"

‎src/duckdb/src/include/duckdb/common/printer.hpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ namespace duckdb {
1515

1616
enumclassOutputStream :uint8_t { STREAM_STDOUT =1, STREAM_STDERR =2 };
1717

18+
typedefvoid (*line_printer_f)(OutputStream stream,const string &str);
19+
1820
//! Printer is a static class that allows printing to logs or stdout/stderr
1921
classPrinter {
2022
public:
@@ -40,5 +42,11 @@ class Printer {
4042
DUCKDB_APIstaticboolIsTerminal(OutputStream stream);
4143
//! The terminal width
4244
DUCKDB_APIstaticidx_tTerminalWidth();
45+
46+
// hook to allow capturing the output and routing it somewhere else / reformat it};
47+
static line_printer_f line_printer;
48+
49+
private:
50+
staticvoidDefaultLinePrint(OutputStream stream,const string &str);
4351
};
4452
}// namespace duckdb

‎src/duckdb/src/include/duckdb/main/client_context_state.hpp‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include"duckdb/common/optional_ptr.hpp"
1414
#include"duckdb/main/config.hpp"
1515
#include"duckdb/main/valid_checker.hpp"
16+
#include"duckdb/planner/expression/bound_parameter_data.hpp"
1617
#include"duckdb/transaction/meta_transaction.hpp"
1718
#include"duckdb/transaction/transaction_manager.hpp"
1819
#include"duckdb/main/database_manager.hpp"
@@ -39,6 +40,11 @@ struct PreparedStatementCallbackInfo {
3940
const PendingQueryParameters &parameters;
4041
};
4142

43+
structBindPreparedStatementCallbackInfo {
44+
PreparedStatementData &prepared_statement;
45+
optional_ptr<case_insensitive_map_t<BoundParameterData>> parameters;
46+
};
47+
4248
//! ClientContextState is virtual base class for ClientContext-local (or Query-Local, using QueryEnd callback) state
4349
//! e.g. caches that need to live as long as a ClientContext or Query.
4450
classClientContextState {
@@ -78,6 +84,10 @@ class ClientContextState {
7884
RebindQueryInfo current_rebind) {
7985
return RebindQueryInfo::DO_NOT_REBIND;
8086
}
87+
virtual RebindQueryInfoOnRebindPreparedStatement(ClientContext &context, BindPreparedStatementCallbackInfo &info,
88+
RebindQueryInfo current_rebind) {
89+
return RebindQueryInfo::DO_NOT_REBIND;
90+
}
8191
virtualvoidWriteProfilingInformation(std::ostream &ss) {
8292
}
8393
virtualvoidOnTaskStart(ClientContext &context) {

‎src/duckdb/src/include/duckdb/main/extension_entries.hpp‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
527527
{"sqlite_scan","sqlite_scanner", CatalogType::TABLE_FUNCTION_ENTRY},
528528
{"sqlsmith","sqlsmith", CatalogType::TABLE_FUNCTION_ENTRY},
529529
{"sqrt","core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
530+
{"st_affine","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
530531
{"st_area","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
531532
{"st_area_spheroid","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
532533
{"st_asgeojson","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
@@ -536,13 +537,20 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
536537
{"st_aswkb","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
537538
{"st_boundary","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
538539
{"st_buffer","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
540+
{"st_buildarea","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
539541
{"st_centroid","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
540542
{"st_collect","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
541543
{"st_collectionextract","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
542544
{"st_concavehull","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
543545
{"st_contains","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
544546
{"st_containsproperly","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
545547
{"st_convexhull","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
548+
{"st_coverageinvalidedges","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
549+
{"st_coverageinvalidedges_agg","spatial", CatalogType::AGGREGATE_FUNCTION_ENTRY},
550+
{"st_coveragesimplify","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
551+
{"st_coveragesimplify_agg","spatial", CatalogType::AGGREGATE_FUNCTION_ENTRY},
552+
{"st_coverageunion","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
553+
{"st_coverageunion_agg","spatial", CatalogType::AGGREGATE_FUNCTION_ENTRY},
546554
{"st_coveredby","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
547555
{"st_covers","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
548556
{"st_crosses","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
@@ -600,12 +608,14 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
600608
{"st_makeline","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
601609
{"st_makepolygon","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
602610
{"st_makevalid","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
611+
{"st_maximuminscribedcircle","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
603612
{"st_minimumrotatedrectangle","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
604613
{"st_mmax","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
605614
{"st_mmin","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
606615
{"st_multi","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
607616
{"st_ngeometries","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
608617
{"st_ninteriorrings","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
618+
{"st_node","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
609619
{"st_normalize","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
610620
{"st_npoints","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
611621
{"st_numgeometries","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
@@ -623,6 +633,7 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
623633
{"st_pointonsurface","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
624634
{"st_points","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
625635
{"st_polygon2dfromwkb","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
636+
{"st_polygonize","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
626637
{"st_quadkey","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
627638
{"st_read","spatial", CatalogType::TABLE_FUNCTION_ENTRY},
628639
{"st_read_meta","spatial", CatalogType::TABLE_FUNCTION_ENTRY},
@@ -631,12 +642,19 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
631642
{"st_reduceprecision","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
632643
{"st_removerepeatedpoints","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
633644
{"st_reverse","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
645+
{"st_rotate","spatial", CatalogType::MACRO_ENTRY},
646+
{"st_rotatex","spatial", CatalogType::MACRO_ENTRY},
647+
{"st_rotatey","spatial", CatalogType::MACRO_ENTRY},
648+
{"st_rotatez","spatial", CatalogType::MACRO_ENTRY},
649+
{"st_scale","spatial", CatalogType::MACRO_ENTRY},
634650
{"st_shortestline","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
635651
{"st_simplify","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
636652
{"st_simplifypreservetopology","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
637653
{"st_startpoint","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
638654
{"st_touches","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
639655
{"st_transform","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
656+
{"st_translate","spatial", CatalogType::MACRO_ENTRY},
657+
{"st_transscale","spatial", CatalogType::MACRO_ENTRY},
640658
{"st_union","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
641659
{"st_union_agg","spatial", CatalogType::AGGREGATE_FUNCTION_ENTRY},
642660
{"st_voronoidiagram","spatial", CatalogType::SCALAR_FUNCTION_ENTRY},
@@ -1075,6 +1093,7 @@ static constexpr ExtensionEntry EXTENSION_SECRET_PROVIDERS[] = {
10751093
{"s3/credential_chain","aws"},
10761094
{"gcs/credential_chain","aws"},
10771095
{"r2/credential_chain","aws"},
1096+
{"aws/credential_chain","aws"},
10781097
{"azure/access_token","azure"},
10791098
{"azure/config","azure"},
10801099
{"azure/credential_chain","azure"},

‎src/duckdb/src/include/duckdb/parser/constraints/unique_constraint.hpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class UniqueConstraint : public Constraint {
2222

2323
public:
2424
DUCKDB_APIUniqueConstraint(const LogicalIndex index,constbool is_primary_key);
25+
DUCKDB_APIUniqueConstraint(const LogicalIndex index, string column_name,constbool is_primary_key);
2526
DUCKDB_APIUniqueConstraint(vector<string> columns,constbool is_primary_key);
2627

2728
public:
@@ -46,8 +47,6 @@ class UniqueConstraint : public Constraint {
4647
vector<LogicalIndex>GetLogicalIndexes(const ColumnList &columns)const;
4748
//! Get the name of the constraint.
4849
stringGetName(const string &table_name)const;
49-
//! Sets a single column name. Does nothing, if the name is already set.
50-
voidSetColumnName(const string &name);
5150

5251
private:
5352
UniqueConstraint();

‎src/duckdb/src/include/duckdb/planner/binder.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ class Binder : public enable_shared_from_this<Binder> {
143143
vector<unique_ptr<BoundConstraint>>BindConstraints(const TableCatalogEntry &table);
144144
vector<unique_ptr<BoundConstraint>>BindNewConstraints(vector<unique_ptr<Constraint>> &constraints,
145145
const string &table_name,const ColumnList &columns);
146-
unique_ptr<BoundConstraint>BindConstraint(Constraint &constraint,const string &table,const ColumnList &columns);
147-
unique_ptr<BoundConstraint>BindUniqueConstraint(Constraint &constraint,const string &table,
146+
unique_ptr<BoundConstraint>BindConstraint(const Constraint &constraint,const string &table,
147+
const ColumnList &columns);
148+
unique_ptr<BoundConstraint>BindUniqueConstraint(const Constraint &constraint,const string &table,
148149
const ColumnList &columns);
149150

150151
BoundStatementBindAlterAddIndex(BoundStatement &result, CatalogEntry &entry, unique_ptr<AlterInfo> alter_info);

‎src/duckdb/src/parser/constraints/unique_constraint.cpp‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ UniqueConstraint::UniqueConstraint() : Constraint(ConstraintType::UNIQUE), index
1010
UniqueConstraint::UniqueConstraint(const LogicalIndex index,constbool is_primary_key)
1111
: Constraint(ConstraintType::UNIQUE), index(index), is_primary_key(is_primary_key) {
1212
}
13+
UniqueConstraint::UniqueConstraint(const LogicalIndex index, string column_name_p,constbool is_primary_key)
14+
: UniqueConstraint(index, is_primary_key) {
15+
columns.push_back(std::move(column_name_p));
16+
}
1317

1418
UniqueConstraint::UniqueConstraint(vector<string> columns,constbool is_primary_key)
1519
: Constraint(ConstraintType::UNIQUE), index(DConstants::INVALID_INDEX), columns(std::move(columns)),
@@ -32,10 +36,7 @@ unique_ptr<Constraint> UniqueConstraint::Copy() const {
3236
return make_uniq<UniqueConstraint>(columns, is_primary_key);
3337
}
3438

35-
auto result = make_uniq<UniqueConstraint>(index, is_primary_key);
36-
if (!columns.empty()) {
37-
result->columns.push_back(columns[0]);
38-
}
39+
auto result = make_uniq<UniqueConstraint>(index, columns.empty() ?string() : columns[0], is_primary_key);
3940
returnstd::move(result);
4041
}
4142

@@ -95,11 +96,4 @@ string UniqueConstraint::GetName(const string &table_name) const {
9596
return type_name +"_" + table_name + name;
9697
}
9798

98-
voidUniqueConstraint::SetColumnName(const string &column_name) {
99-
if (!columns.empty()) {
100-
return;
101-
}
102-
columns.push_back(column_name);
103-
}
104-
10599
}// namespace duckdb

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp