forked from duckdb/duckdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge with feature and implement PR feedback
- Loading branch information
Showing
508 changed files
with
20,445 additions
and
16,509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
.github/patches/extensions/delta/multifilereader_tablefunction_param.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/src/functions/delta_scan.cpp b/src/functions/delta_scan.cpp | ||
index a3e4f11..23482f1 100644 | ||
--- a/src/functions/delta_scan.cpp | ||
+++ b/src/functions/delta_scan.cpp | ||
@@ -510,7 +510,7 @@ unique_ptr<NodeStatistics> DeltaSnapshot::GetCardinality(ClientContext &context) | ||
return make_uniq<NodeStatistics>(total_tuple_count,total_tuple_count); | ||
} | ||
|
||
-unique_ptr<MultiFileReader> DeltaMultiFileReader::CreateInstance() { | ||
+unique_ptr<MultiFileReader> DeltaMultiFileReader::CreateInstance(const TableFunction &table_function) { | ||
return std::move(make_uniq<DeltaMultiFileReader>()); | ||
} | ||
|
||
diff --git a/src/include/functions/delta_scan.hpp b/src/include/functions/delta_scan.hpp | ||
index aac35cc..23c937d 100644 | ||
--- a/src/include/functions/delta_scan.hpp | ||
+++ b/src/include/functions/delta_scan.hpp | ||
@@ -103,7 +103,7 @@ struct DeltaMultiFileReaderGlobalState : public MultiFileReaderGlobalState { | ||
}; | ||
|
||
struct DeltaMultiFileReader : public MultiFileReader { | ||
- static unique_ptr<MultiFileReader> CreateInstance(); | ||
+ static unique_ptr<MultiFileReader> CreateInstance(const TableFunction &table_function); | ||
//! Return a DeltaSnapshot | ||
unique_ptr<MultiFileList> CreateFileList(ClientContext &context, const vector<string> &paths, | ||
FileGlobOptions options) override; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/iceberg_functions/iceberg_scan.cpp b/src/iceberg_functions/iceberg_scan.cpp | ||
index 4e0b5cc..b6aa8dd 100644 | ||
--- a/src/iceberg_functions/iceberg_scan.cpp | ||
+++ b/src/iceberg_functions/iceberg_scan.cpp | ||
@@ -194,7 +194,7 @@ static unique_ptr<TableRef> MakeScanExpression(vector<Value> &data_file_values, | ||
auto select_node = make_uniq<SelectNode>(); | ||
select_node->from_table = std::move(join_node); | ||
auto select_expr = make_uniq<StarExpression>(); | ||
- select_expr->exclude_list = {"filename", "file_row_number"}; | ||
+ select_expr->exclude_list = {QualifiedColumnName("filename"), QualifiedColumnName("file_row_number")}; | ||
vector<unique_ptr<ParsedExpression>> select_exprs; | ||
select_exprs.push_back(std::move(select_expr)); | ||
select_node->select_list = std::move(select_exprs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/spatial/src/spatial/core/functions/table/st_generatepoints.cpp b/spatial/src/spatial/core/functions/table/st_generatepoints.cpp | ||
index 007d386..8754619 100644 | ||
--- a/spatial/src/spatial/core/functions/table/st_generatepoints.cpp | ||
+++ b/spatial/src/spatial/core/functions/table/st_generatepoints.cpp | ||
@@ -79,8 +79,8 @@ static void Execute(ClientContext &context, TableFunctionInput &data_p, DataChun | ||
const auto chunk_size = MinValue<idx_t>(STANDARD_VECTOR_SIZE, bind_data.count - state.current_idx); | ||
for (idx_t i = 0; i < chunk_size; i++) { | ||
|
||
- x_data[i] = state.rng.NextRandom(bind_data.bbox.min.x, bind_data.bbox.max.x); | ||
- y_data[i] = state.rng.NextRandom(bind_data.bbox.min.y, bind_data.bbox.max.y); | ||
+ x_data[i] = state.rng.NextRandom32(bind_data.bbox.min.x, bind_data.bbox.max.x); | ||
+ y_data[i] = state.rng.NextRandom32(bind_data.bbox.min.y, bind_data.bbox.max.y); | ||
|
||
state.current_idx++; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
diff --git a/src/include/sqlite_scanner.hpp b/src/include/sqlite_scanner.hpp | ||
index c6230a5..f79006e 100644 | ||
--- a/src/include/sqlite_scanner.hpp | ||
+++ b/src/include/sqlite_scanner.hpp | ||
@@ -13,6 +13,7 @@ | ||
|
||
namespace duckdb { | ||
class SQLiteDB; | ||
+class TableCatalogEntry; | ||
|
||
struct SqliteBindData : public TableFunctionData { | ||
string file_name; | ||
@@ -26,6 +27,8 @@ struct SqliteBindData : public TableFunctionData { | ||
|
||
optional_idx rows_per_group = 122880; | ||
SQLiteDB *global_db; | ||
+ | ||
+ optional_ptr<TableCatalogEntry> table; | ||
}; | ||
|
||
class SqliteScanFunction : public TableFunction { | ||
diff --git a/src/sqlite_scanner.cpp b/src/sqlite_scanner.cpp | ||
index 391d821..b4ac571 100644 | ||
--- a/src/sqlite_scanner.cpp | ||
+++ b/src/sqlite_scanner.cpp | ||
@@ -283,6 +283,13 @@ static string SqliteToString(const FunctionData *bind_data_p) { | ||
return StringUtil::Format("%s:%s", bind_data.file_name, bind_data.table_name); | ||
} | ||
|
||
+BindInfo SqliteBindInfo(const optional_ptr<FunctionData> bind_data_p) { | ||
+ BindInfo info(ScanType::EXTERNAL); | ||
+ auto &bind_data = bind_data_p->Cast<SqliteBindData>(); | ||
+ info.table = bind_data.table; | ||
+ return info; | ||
+} | ||
+ | ||
/* | ||
static unique_ptr<BaseStatistics> | ||
SqliteStatistics(ClientContext &context, const FunctionData *bind_data_p, | ||
@@ -300,6 +307,7 @@ SqliteScanFunction::SqliteScanFunction() | ||
SqliteInitGlobalState, SqliteInitLocalState) { | ||
cardinality = SqliteCardinality; | ||
to_string = SqliteToString; | ||
+ get_bind_info = SqliteBindInfo; | ||
projection_pushdown = true; | ||
} | ||
|
||
diff --git a/src/storage/sqlite_table_entry.cpp b/src/storage/sqlite_table_entry.cpp | ||
index 0a9f850..fd17c2d 100644 | ||
--- a/src/storage/sqlite_table_entry.cpp | ||
+++ b/src/storage/sqlite_table_entry.cpp | ||
@@ -44,6 +44,7 @@ TableFunction SQLiteTableEntry::GetScanFunction(ClientContext &context, unique_p | ||
result->global_db = &db; | ||
result->rows_per_group = optional_idx(); | ||
} | ||
+ result->table = this; | ||
|
||
bind_data = std::move(result); | ||
return static_cast<TableFunction>(SqliteScanFunction()); |
13 changes: 13 additions & 0 deletions
13
.github/patches/extensions/sqlsmith/insert_statement_to_string.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/test/sql/sql_reduce.test b/test/sql/sql_reduce.test | ||
index 428ae92..af0530f 100644 | ||
--- a/test/sql/sql_reduce.test | ||
+++ b/test/sql/sql_reduce.test | ||
@@ -48,7 +48,7 @@ INSERT INTO tbl (VALUES (1)) | ||
INSERT INTO tbl (VALUES (1, 2)) | ||
INSERT INTO tbl (VALUES (2)) | ||
INSERT INTO tbl SELECT * | ||
-INSERT INTO tbl SELECT NULL FROM (VALUES (1, 2)) | ||
+INSERT INTO tbl SELECT NULL FROM (VALUES (1, 2)) AS valueslist | ||
INSERT INTO tbl SELECT NULL FROM (VALUES (1, 2)) AS valueslist | ||
|
||
query I |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
benchmark/realnest/01_aggregate-first-level-struct-members.benchmark | ||
benchmark/realnest/02_list_sort.benchmark | ||
benchmark/realnest/03_create_table_from_unnested_structs.benchmark | ||
benchmark/realnest/04_list_transform_and_list_aggregate.benchmark | ||
benchmark/realnest/05_list_filter.benchmark | ||
benchmark/realnest/06_list_filter_on_unnested_structure.benchmark | ||
benchmark/realnest/07_list_unique_on_transformed_and_aggregated_list.benchmark | ||
benchmark/realnest/08_count_map_keys.benchmark | ||
benchmark/realnest/09_array_agg.benchmark | ||
benchmark/realnest/11_list_sort_reduce_transform.benchmark | ||
benchmark/realnest/12_map_list_values.benchmark | ||
benchmark/realnest/13_multi_join_nested_data_with_filtering.benchmark | ||
benchmark/realnest/14_list_slice.benchmark | ||
benchmark/realnest/15_list_sort.benchmark | ||
benchmark/realnest/16_most_common_list_aggregates.benchmark | ||
benchmark/realnest/17_list_aggregates_histogram_stddev_mode.benchmark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.