duckdb 0.7.2-dev2867.0 → 0.7.2-dev2995.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/binding.gyp +1 -0
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-datepart.cpp +5 -1
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +18 -7
- package/src/duckdb/src/catalog/default/default_functions.cpp +2 -0
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +3 -3
- package/src/duckdb/src/common/arrow/arrow_converter.cpp +2 -2
- package/src/duckdb/src/common/sort/partition_state.cpp +1 -1
- package/src/duckdb/src/common/string_util.cpp +6 -1
- package/src/duckdb/src/core_functions/function_list.cpp +2 -0
- package/src/duckdb/src/core_functions/scalar/string/format_bytes.cpp +29 -0
- package/src/duckdb/src/execution/index/art/art.cpp +5 -1
- package/src/duckdb/src/execution/operator/aggregate/physical_hash_aggregate.cpp +62 -43
- package/src/duckdb/src/execution/operator/aggregate/physical_perfecthash_aggregate.cpp +17 -11
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +32 -39
- package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +10 -9
- package/src/duckdb/src/execution/operator/helper/physical_batch_collector.cpp +4 -4
- package/src/duckdb/src/execution/operator/helper/physical_explain_analyze.cpp +6 -21
- package/src/duckdb/src/execution/operator/helper/physical_limit.cpp +13 -13
- package/src/duckdb/src/execution/operator/helper/physical_limit_percent.cpp +15 -14
- package/src/duckdb/src/execution/operator/helper/physical_load.cpp +3 -2
- package/src/duckdb/src/execution/operator/helper/physical_materialized_collector.cpp +4 -4
- package/src/duckdb/src/execution/operator/helper/physical_pragma.cpp +4 -2
- package/src/duckdb/src/execution/operator/helper/physical_prepare.cpp +4 -2
- package/src/duckdb/src/execution/operator/helper/physical_reservoir_sample.cpp +10 -8
- package/src/duckdb/src/execution/operator/helper/physical_reset.cpp +4 -3
- package/src/duckdb/src/execution/operator/helper/physical_set.cpp +7 -6
- package/src/duckdb/src/execution/operator/helper/physical_transaction.cpp +4 -2
- package/src/duckdb/src/execution/operator/helper/physical_vacuum.cpp +8 -8
- package/src/duckdb/src/execution/operator/join/physical_asof_join.cpp +17 -16
- package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +10 -8
- package/src/duckdb/src/execution/operator/join/physical_cross_product.cpp +3 -4
- package/src/duckdb/src/execution/operator/join/physical_delim_join.cpp +5 -5
- package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +16 -15
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +13 -12
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +12 -10
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +13 -11
- package/src/duckdb/src/execution/operator/join/physical_positional_join.cpp +8 -6
- package/src/duckdb/src/execution/operator/join/physical_range_join.cpp +1 -1
- package/src/duckdb/src/execution/operator/order/physical_order.cpp +13 -13
- package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +8 -8
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +160 -145
- package/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +10 -25
- package/src/duckdb/src/execution/operator/persistent/physical_delete.cpp +14 -19
- package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +7 -6
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +18 -30
- package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +14 -18
- package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +6 -4
- package/src/duckdb/src/execution/operator/scan/physical_dummy_scan.cpp +4 -19
- package/src/duckdb/src/execution/operator/scan/physical_empty_result.cpp +3 -2
- package/src/duckdb/src/execution/operator/scan/physical_positional_scan.cpp +14 -5
- package/src/duckdb/src/execution/operator/scan/physical_table_scan.cpp +6 -4
- package/src/duckdb/src/execution/operator/schema/physical_alter.cpp +3 -19
- package/src/duckdb/src/execution/operator/schema/physical_attach.cpp +4 -18
- package/src/duckdb/src/execution/operator/schema/physical_create_function.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +8 -9
- package/src/duckdb/src/execution/operator/schema/physical_create_schema.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_sequence.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_table.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +9 -26
- package/src/duckdb/src/execution/operator/schema/physical_create_view.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_detach.cpp +4 -19
- package/src/duckdb/src/execution/operator/schema/physical_drop.cpp +3 -19
- package/src/duckdb/src/execution/operator/set/physical_recursive_cte.cpp +9 -8
- package/src/duckdb/src/execution/operator/set/physical_union.cpp +1 -1
- package/src/duckdb/src/execution/physical_operator.cpp +11 -5
- package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +16 -16
- package/src/duckdb/src/function/table/arrow_conversion.cpp +3 -3
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +7 -1
- package/src/duckdb/src/include/duckdb/common/enums/operator_result_type.hpp +16 -4
- package/src/duckdb/src/include/duckdb/common/optional_idx.hpp +45 -0
- package/src/duckdb/src/include/duckdb/common/set.hpp +2 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +15 -0
- package/src/duckdb/src/include/duckdb/execution/executor.hpp +10 -1
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_hash_aggregate.hpp +5 -8
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_perfecthash_aggregate.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_ungrouped_aggregate.hpp +3 -7
- package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_window.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_batch_collector.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_explain_analyze.hpp +2 -5
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_limit_percent.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_load.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_materialized_collector.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_pragma.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_prepare.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_reservoir_sample.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_reset.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_set.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_transaction.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_asof_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_blockwise_nl_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_cross_product.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_delim_join.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_hash_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_iejoin.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_nested_loop_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_piecewise_merge_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_positional_join.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_order.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/order/physical_top_n.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_insert.hpp +3 -5
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_copy_to_file.hpp +2 -5
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_delete.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_export.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_update.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_column_data_scan.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_dummy_scan.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_empty_result.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_positional_scan.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_table_scan.hpp +1 -2
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_alter.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_attach.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_function.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_index.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_schema.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_sequence.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_table.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_type.hpp +2 -5
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_view.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_detach.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_drop.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/set/physical_recursive_cte.hpp +2 -4
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +7 -4
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +26 -6
- package/src/duckdb/src/include/duckdb/execution/radix_partitioned_hashtable.hpp +5 -5
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +2 -1
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +0 -1
- package/src/duckdb/src/include/duckdb/main/client_config.hpp +2 -0
- package/src/duckdb/src/include/duckdb/main/config.hpp +2 -0
- package/src/duckdb/src/include/duckdb/parallel/event.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parallel/interrupt.hpp +63 -0
- package/src/duckdb/src/include/duckdb/parallel/pipeline.hpp +16 -3
- package/src/duckdb/src/include/duckdb/parallel/pipeline_executor.hpp +51 -7
- package/src/duckdb/src/include/duckdb/parallel/task.hpp +21 -2
- package/src/duckdb/src/include/duckdb/parallel/task_counter.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parallel/task_scheduler.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/column_binding.hpp +6 -0
- package/src/duckdb/src/include/duckdb/planner/expression/bound_columnref_expression.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_aggregate.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_cteref.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delim_get.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_dummy_scan.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_expression_get.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_pivot.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_projection.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_recursive_cte.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_set_operation.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_unnest.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_window.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/data_table.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/optimistic_data_writer.hpp +46 -0
- package/src/duckdb/src/include/duckdb/storage/partial_block_manager.hpp +24 -3
- package/src/duckdb/src/include/duckdb/storage/table/column_checkpoint_state.hpp +46 -1
- package/src/duckdb/src/include/duckdb/storage/table/column_data.hpp +9 -10
- package/src/duckdb/src/include/duckdb/storage/table/column_segment.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/list_column_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/table/row_group_collection.hpp +1 -0
- package/src/duckdb/src/include/duckdb/storage/table/segment_base.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/segment_tree.hpp +22 -0
- package/src/duckdb/src/include/duckdb/storage/table/standard_column_data.hpp +3 -3
- package/src/duckdb/src/include/duckdb/storage/table/struct_column_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/update_segment.hpp +0 -2
- package/src/duckdb/src/include/duckdb/storage/table/validity_column_data.hpp +1 -2
- package/src/duckdb/src/include/duckdb/transaction/local_storage.hpp +9 -34
- package/src/duckdb/src/include/duckdb/verification/no_operator_caching_verifier.hpp +25 -0
- package/src/duckdb/src/include/duckdb/verification/statement_verifier.hpp +5 -0
- package/src/duckdb/src/main/client_verify.cpp +4 -0
- package/src/duckdb/src/main/config.cpp +4 -0
- package/src/duckdb/src/main/database.cpp +11 -11
- package/src/duckdb/src/main/extension/extension_load.cpp +19 -15
- package/src/duckdb/src/parallel/event.cpp +1 -1
- package/src/duckdb/src/parallel/executor.cpp +39 -3
- package/src/duckdb/src/parallel/executor_task.cpp +11 -0
- package/src/duckdb/src/parallel/interrupt.cpp +57 -0
- package/src/duckdb/src/parallel/pipeline.cpp +49 -6
- package/src/duckdb/src/parallel/pipeline_executor.cpp +248 -69
- package/src/duckdb/src/parallel/pipeline_initialize_event.cpp +1 -1
- package/src/duckdb/src/parallel/task_scheduler.cpp +57 -22
- package/src/duckdb/src/parser/base_expression.cpp +6 -0
- package/src/duckdb/src/planner/expression/bound_columnref_expression.cpp +17 -3
- package/src/duckdb/src/planner/expression/bound_reference_expression.cpp +8 -2
- package/src/duckdb/src/planner/operator/logical_aggregate.cpp +13 -1
- package/src/duckdb/src/planner/operator/logical_column_data_get.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_cteref.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_delete.cpp +10 -0
- package/src/duckdb/src/planner/operator/logical_delim_get.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_dummy_scan.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_expression_get.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_get.cpp +10 -4
- package/src/duckdb/src/planner/operator/logical_insert.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_pivot.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_projection.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_recursive_cte.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_set_operation.cpp +11 -0
- package/src/duckdb/src/planner/operator/logical_unnest.cpp +12 -1
- package/src/duckdb/src/planner/operator/logical_update.cpp +10 -0
- package/src/duckdb/src/planner/operator/logical_window.cpp +11 -0
- package/src/duckdb/src/storage/checkpoint_manager.cpp +1 -1
- package/src/duckdb/src/storage/data_table.cpp +5 -0
- package/src/duckdb/src/storage/local_storage.cpp +40 -110
- package/src/duckdb/src/storage/optimistic_data_writer.cpp +96 -0
- package/src/duckdb/src/storage/partial_block_manager.cpp +73 -9
- package/src/duckdb/src/storage/single_file_block_manager.cpp +3 -1
- package/src/duckdb/src/storage/standard_buffer_manager.cpp +17 -12
- package/src/duckdb/src/storage/statistics/base_statistics.cpp +3 -0
- package/src/duckdb/src/storage/table/column_checkpoint_state.cpp +90 -82
- package/src/duckdb/src/storage/table/column_data.cpp +19 -45
- package/src/duckdb/src/storage/table/column_data_checkpointer.cpp +7 -7
- package/src/duckdb/src/storage/table/column_segment.cpp +1 -1
- package/src/duckdb/src/storage/table/list_column_data.cpp +6 -11
- package/src/duckdb/src/storage/table/row_group.cpp +13 -14
- package/src/duckdb/src/storage/table/row_group_collection.cpp +10 -4
- package/src/duckdb/src/storage/table/standard_column_data.cpp +6 -10
- package/src/duckdb/src/storage/table/struct_column_data.cpp +7 -13
- package/src/duckdb/src/storage/table/update_segment.cpp +0 -25
- package/src/duckdb/src/storage/table/validity_column_data.cpp +2 -6
- package/src/duckdb/src/transaction/commit_state.cpp +4 -4
- package/src/duckdb/src/verification/no_operator_caching_verifier.cpp +13 -0
- package/src/duckdb/src/verification/statement_verifier.cpp +4 -0
- package/src/duckdb/ub_src_core_functions_scalar_string.cpp +2 -0
- package/src/duckdb/ub_src_parallel.cpp +2 -0
- package/src/duckdb/ub_src_storage.cpp +2 -0
@@ -6,27 +6,12 @@ namespace duckdb {
|
|
6
6
|
//===--------------------------------------------------------------------===//
|
7
7
|
// Source
|
8
8
|
//===--------------------------------------------------------------------===//
|
9
|
-
|
10
|
-
|
11
|
-
CreateViewSourceState() : finished(false) {
|
12
|
-
}
|
13
|
-
|
14
|
-
bool finished;
|
15
|
-
};
|
16
|
-
|
17
|
-
unique_ptr<GlobalSourceState> PhysicalCreateView::GetGlobalSourceState(ClientContext &context) const {
|
18
|
-
return make_uniq<CreateViewSourceState>();
|
19
|
-
}
|
20
|
-
|
21
|
-
void PhysicalCreateView::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
22
|
-
LocalSourceState &lstate) const {
|
23
|
-
auto &state = gstate.Cast<CreateViewSourceState>();
|
24
|
-
if (state.finished) {
|
25
|
-
return;
|
26
|
-
}
|
9
|
+
SourceResultType PhysicalCreateView::GetData(ExecutionContext &context, DataChunk &chunk,
|
10
|
+
OperatorSourceInput &input) const {
|
27
11
|
auto &catalog = Catalog::GetCatalog(context.client, info->catalog);
|
28
12
|
catalog.CreateView(context.client, *info);
|
29
|
-
|
13
|
+
|
14
|
+
return SourceResultType::FINISHED;
|
30
15
|
}
|
31
16
|
|
32
17
|
} // namespace duckdb
|
@@ -11,27 +11,12 @@ namespace duckdb {
|
|
11
11
|
//===--------------------------------------------------------------------===//
|
12
12
|
// Source
|
13
13
|
//===--------------------------------------------------------------------===//
|
14
|
-
|
15
|
-
|
16
|
-
DetachSourceState() : finished(false) {
|
17
|
-
}
|
18
|
-
|
19
|
-
bool finished;
|
20
|
-
};
|
21
|
-
|
22
|
-
unique_ptr<GlobalSourceState> PhysicalDetach::GetGlobalSourceState(ClientContext &context) const {
|
23
|
-
return make_uniq<DetachSourceState>();
|
24
|
-
}
|
25
|
-
|
26
|
-
void PhysicalDetach::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
27
|
-
LocalSourceState &lstate) const {
|
28
|
-
auto &state = gstate.Cast<DetachSourceState>();
|
29
|
-
if (state.finished) {
|
30
|
-
return;
|
31
|
-
}
|
14
|
+
SourceResultType PhysicalDetach::GetData(ExecutionContext &context, DataChunk &chunk,
|
15
|
+
OperatorSourceInput &input) const {
|
32
16
|
auto &db_manager = DatabaseManager::Get(context.client);
|
33
17
|
db_manager.DetachDatabase(context.client, info->name, info->if_not_found);
|
34
|
-
|
18
|
+
|
19
|
+
return SourceResultType::FINISHED;
|
35
20
|
}
|
36
21
|
|
37
22
|
} // namespace duckdb
|
@@ -11,24 +11,7 @@ namespace duckdb {
|
|
11
11
|
//===--------------------------------------------------------------------===//
|
12
12
|
// Source
|
13
13
|
//===--------------------------------------------------------------------===//
|
14
|
-
|
15
|
-
public:
|
16
|
-
DropSourceState() : finished(false) {
|
17
|
-
}
|
18
|
-
|
19
|
-
bool finished;
|
20
|
-
};
|
21
|
-
|
22
|
-
unique_ptr<GlobalSourceState> PhysicalDrop::GetGlobalSourceState(ClientContext &context) const {
|
23
|
-
return make_uniq<DropSourceState>();
|
24
|
-
}
|
25
|
-
|
26
|
-
void PhysicalDrop::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
27
|
-
LocalSourceState &lstate) const {
|
28
|
-
auto &state = gstate.Cast<DropSourceState>();
|
29
|
-
if (state.finished) {
|
30
|
-
return;
|
31
|
-
}
|
14
|
+
SourceResultType PhysicalDrop::GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const {
|
32
15
|
switch (info->type) {
|
33
16
|
case CatalogType::PREPARED_STATEMENT: {
|
34
17
|
// DEALLOCATE silently ignores errors
|
@@ -62,7 +45,8 @@ void PhysicalDrop::GetData(ExecutionContext &context, DataChunk &chunk, GlobalSo
|
|
62
45
|
break;
|
63
46
|
}
|
64
47
|
}
|
65
|
-
|
48
|
+
|
49
|
+
return SourceResultType::FINISHED;
|
66
50
|
}
|
67
51
|
|
68
52
|
} // namespace duckdb
|
@@ -61,16 +61,15 @@ idx_t PhysicalRecursiveCTE::ProbeHT(DataChunk &chunk, RecursiveCTEState &state)
|
|
61
61
|
return new_group_count;
|
62
62
|
}
|
63
63
|
|
64
|
-
SinkResultType PhysicalRecursiveCTE::Sink(ExecutionContext &context,
|
65
|
-
|
66
|
-
auto &gstate = state.Cast<RecursiveCTEState>();
|
64
|
+
SinkResultType PhysicalRecursiveCTE::Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const {
|
65
|
+
auto &gstate = input.global_state.Cast<RecursiveCTEState>();
|
67
66
|
if (!union_all) {
|
68
|
-
idx_t match_count = ProbeHT(
|
67
|
+
idx_t match_count = ProbeHT(chunk, gstate);
|
69
68
|
if (match_count > 0) {
|
70
|
-
gstate.intermediate_table.Append(
|
69
|
+
gstate.intermediate_table.Append(chunk);
|
71
70
|
}
|
72
71
|
} else {
|
73
|
-
gstate.intermediate_table.Append(
|
72
|
+
gstate.intermediate_table.Append(chunk);
|
74
73
|
}
|
75
74
|
return SinkResultType::NEED_MORE_INPUT;
|
76
75
|
}
|
@@ -78,8 +77,8 @@ SinkResultType PhysicalRecursiveCTE::Sink(ExecutionContext &context, GlobalSinkS
|
|
78
77
|
//===--------------------------------------------------------------------===//
|
79
78
|
// Source
|
80
79
|
//===--------------------------------------------------------------------===//
|
81
|
-
|
82
|
-
|
80
|
+
SourceResultType PhysicalRecursiveCTE::GetData(ExecutionContext &context, DataChunk &chunk,
|
81
|
+
OperatorSourceInput &input) const {
|
83
82
|
auto &gstate = sink_state->Cast<RecursiveCTEState>();
|
84
83
|
if (!gstate.initialized) {
|
85
84
|
gstate.intermediate_table.InitializeScan(gstate.scan_state);
|
@@ -117,6 +116,8 @@ void PhysicalRecursiveCTE::GetData(ExecutionContext &context, DataChunk &chunk,
|
|
117
116
|
gstate.intermediate_table.InitializeScan(gstate.scan_state);
|
118
117
|
}
|
119
118
|
}
|
119
|
+
|
120
|
+
return chunk.size() == 0 ? SourceResultType::FINISHED : SourceResultType::HAVE_MORE_OUTPUT;
|
120
121
|
}
|
121
122
|
|
122
123
|
void PhysicalRecursiveCTE::ExecuteRecursivePipelines(ExecutionContext &context) const {
|
@@ -28,7 +28,7 @@ void PhysicalUnion::BuildPipelines(Pipeline ¤t, MetaPipeline &meta_pipelin
|
|
28
28
|
order_matters = true;
|
29
29
|
}
|
30
30
|
if (sink) {
|
31
|
-
if (sink->SinkOrderDependent()
|
31
|
+
if (sink->SinkOrderDependent() || sink->RequiresBatchIndex()) {
|
32
32
|
order_matters = true;
|
33
33
|
}
|
34
34
|
if (!sink->ParallelSink()) {
|
@@ -72,8 +72,8 @@ unique_ptr<GlobalSourceState> PhysicalOperator::GetGlobalSourceState(ClientConte
|
|
72
72
|
}
|
73
73
|
|
74
74
|
// LCOV_EXCL_START
|
75
|
-
|
76
|
-
|
75
|
+
SourceResultType PhysicalOperator::GetData(ExecutionContext &context, DataChunk &chunk,
|
76
|
+
OperatorSourceInput &input) const {
|
77
77
|
throw InternalException("Calling GetData on a node that is not a source!");
|
78
78
|
}
|
79
79
|
|
@@ -91,10 +91,10 @@ double PhysicalOperator::GetProgress(ClientContext &context, GlobalSourceState &
|
|
91
91
|
// Sink
|
92
92
|
//===--------------------------------------------------------------------===//
|
93
93
|
// LCOV_EXCL_START
|
94
|
-
SinkResultType PhysicalOperator::Sink(ExecutionContext &context,
|
95
|
-
DataChunk &input) const {
|
94
|
+
SinkResultType PhysicalOperator::Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const {
|
96
95
|
throw InternalException("Calling Sink on a node that is not a sink!");
|
97
96
|
}
|
97
|
+
|
98
98
|
// LCOV_EXCL_STOP
|
99
99
|
|
100
100
|
void PhysicalOperator::Combine(ExecutionContext &context, GlobalSinkState &gstate, LocalSinkState &lstate) const {
|
@@ -105,6 +105,9 @@ SinkFinalizeType PhysicalOperator::Finalize(Pipeline &pipeline, Event &event, Cl
|
|
105
105
|
return SinkFinalizeType::READY;
|
106
106
|
}
|
107
107
|
|
108
|
+
void PhysicalOperator::NextBatch(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate_p) const {
|
109
|
+
}
|
110
|
+
|
108
111
|
unique_ptr<LocalSinkState> PhysicalOperator::GetLocalSinkState(ExecutionContext &context) const {
|
109
112
|
return make_uniq<LocalSinkState>();
|
110
113
|
}
|
@@ -238,7 +241,9 @@ OperatorResultType CachingPhysicalOperator::Execute(ExecutionContext &context, D
|
|
238
241
|
state.initialized = true;
|
239
242
|
state.can_cache_chunk = true;
|
240
243
|
|
241
|
-
if (!context.
|
244
|
+
if (!context.client.config.enable_caching_operators) {
|
245
|
+
state.can_cache_chunk = false;
|
246
|
+
} else if (!context.pipeline || !caching_supported) {
|
242
247
|
state.can_cache_chunk = false;
|
243
248
|
} else if (!context.pipeline->GetSink()) {
|
244
249
|
// Disabling for pipelines without Sink, i.e. when pulling
|
@@ -252,6 +257,7 @@ OperatorResultType CachingPhysicalOperator::Execute(ExecutionContext &context, D
|
|
252
257
|
if (!state.can_cache_chunk) {
|
253
258
|
return child_result;
|
254
259
|
}
|
260
|
+
// TODO chunk size of 0 should not result in a cache being created!
|
255
261
|
if (chunk.size() < CACHE_THRESHOLD) {
|
256
262
|
// we have filtered out a significant amount of tuples
|
257
263
|
// add this chunk to the cache and continue
|
@@ -130,19 +130,18 @@ void RadixPartitionedHashTable::PopulateGroupChunk(DataChunk &group_chunk, DataC
|
|
130
130
|
group_chunk.Verify();
|
131
131
|
}
|
132
132
|
|
133
|
-
void RadixPartitionedHashTable::Sink(ExecutionContext &context,
|
134
|
-
DataChunk &
|
135
|
-
|
136
|
-
auto &
|
137
|
-
auto &gstate = state.Cast<RadixHTGlobalState>();
|
133
|
+
void RadixPartitionedHashTable::Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input,
|
134
|
+
DataChunk &payload_input, const vector<idx_t> &filter) const {
|
135
|
+
auto &llstate = input.local_state.Cast<RadixHTLocalState>();
|
136
|
+
auto &gstate = input.global_state.Cast<RadixHTGlobalState>();
|
138
137
|
D_ASSERT(!gstate.is_finalized);
|
139
138
|
|
140
139
|
DataChunk &group_chunk = llstate.group_chunk;
|
141
|
-
PopulateGroupChunk(group_chunk,
|
140
|
+
PopulateGroupChunk(group_chunk, chunk);
|
142
141
|
|
143
142
|
// if we have non-combinable aggregates (e.g. string_agg) we cannot keep parallel hash
|
144
143
|
// tables
|
145
|
-
if (ForceSingleHT(
|
144
|
+
if (ForceSingleHT(input.global_state)) {
|
146
145
|
lock_guard<mutex> glock(gstate.lock);
|
147
146
|
gstate.is_empty = gstate.is_empty && group_chunk.size() == 0;
|
148
147
|
if (gstate.finalized_hts.empty()) {
|
@@ -304,7 +303,7 @@ private:
|
|
304
303
|
};
|
305
304
|
|
306
305
|
void RadixPartitionedHashTable::ScheduleTasks(Executor &executor, const shared_ptr<Event> &event,
|
307
|
-
GlobalSinkState &state, vector<
|
306
|
+
GlobalSinkState &state, vector<shared_ptr<Task>> &tasks) const {
|
308
307
|
auto &gstate = state.Cast<RadixHTGlobalState>();
|
309
308
|
if (!gstate.is_partitioned) {
|
310
309
|
return;
|
@@ -382,14 +381,14 @@ idx_t RadixPartitionedHashTable::Size(GlobalSinkState &sink_state) const {
|
|
382
381
|
return count;
|
383
382
|
}
|
384
383
|
|
385
|
-
|
386
|
-
|
384
|
+
SourceResultType RadixPartitionedHashTable::GetData(ExecutionContext &context, DataChunk &chunk,
|
385
|
+
GlobalSinkState &sink_state, OperatorSourceInput &input) const {
|
387
386
|
auto &gstate = sink_state.Cast<RadixHTGlobalState>();
|
388
|
-
auto &state =
|
389
|
-
auto &lstate =
|
387
|
+
auto &state = input.global_state.Cast<RadixHTGlobalSourceState>();
|
388
|
+
auto &lstate = input.local_state.Cast<RadixHTLocalSourceState>();
|
390
389
|
D_ASSERT(gstate.is_finalized);
|
391
390
|
if (state.finished) {
|
392
|
-
return;
|
391
|
+
return SourceResultType::FINISHED;
|
393
392
|
}
|
394
393
|
|
395
394
|
// special case hack to sort out aggregating from empty intermediates
|
@@ -421,11 +420,11 @@ void RadixPartitionedHashTable::GetData(ExecutionContext &context, DataChunk &ch
|
|
421
420
|
chunk.data[null_groups.size() + op.aggregates.size() + i].Reference(grouping_values[i]);
|
422
421
|
}
|
423
422
|
state.finished = true;
|
424
|
-
return;
|
423
|
+
return chunk.size() == 0 ? SourceResultType::FINISHED : SourceResultType::HAVE_MORE_OUTPUT;
|
425
424
|
}
|
426
425
|
if (gstate.is_empty) {
|
427
426
|
state.finished = true;
|
428
|
-
return;
|
427
|
+
return chunk.size() == 0 ? SourceResultType::FINISHED : SourceResultType::HAVE_MORE_OUTPUT;
|
429
428
|
}
|
430
429
|
idx_t elements_found = 0;
|
431
430
|
|
@@ -461,7 +460,7 @@ void RadixPartitionedHashTable::GetData(ExecutionContext &context, DataChunk &ch
|
|
461
460
|
ht_index = state.ht_index;
|
462
461
|
if (ht_index >= gstate.finalized_hts.size()) {
|
463
462
|
state.finished = true;
|
464
|
-
return;
|
463
|
+
return chunk.size() == 0 ? SourceResultType::FINISHED : SourceResultType::HAVE_MORE_OUTPUT;
|
465
464
|
}
|
466
465
|
}
|
467
466
|
D_ASSERT(ht_index < gstate.finalized_hts.size());
|
@@ -511,6 +510,7 @@ void RadixPartitionedHashTable::GetData(ExecutionContext &context, DataChunk &ch
|
|
511
510
|
for (idx_t i = 0; i < op.grouping_functions.size(); i++) {
|
512
511
|
chunk.data[op.GroupCount() + op.aggregates.size() + i].Reference(grouping_values[i]);
|
513
512
|
}
|
513
|
+
return chunk.size() == 0 ? SourceResultType::FINISHED : SourceResultType::HAVE_MORE_OUTPUT;
|
514
514
|
}
|
515
515
|
|
516
516
|
} // namespace duckdb
|
@@ -253,6 +253,9 @@ static void SetVectorString(Vector &vector, idx_t size, char *cdata, T *offsets)
|
|
253
253
|
}
|
254
254
|
auto cptr = cdata + offsets[row_idx];
|
255
255
|
auto str_len = offsets[row_idx + 1] - offsets[row_idx];
|
256
|
+
if (str_len > NumericLimits<uint32_t>::Maximum()) { // LCOV_EXCL_START
|
257
|
+
throw ConversionException("DuckDB does not support Strings over 4GB");
|
258
|
+
} // LCOV_EXCL_STOP
|
256
259
|
strings[row_idx] = string_t(cptr, str_len);
|
257
260
|
}
|
258
261
|
}
|
@@ -406,9 +409,6 @@ static void ColumnArrowToDuckDB(Vector &vector, ArrowArray &array, ArrowScanLoca
|
|
406
409
|
auto original_type = arrow_convert_data[col_idx]->variable_sz_type[arrow_convert_idx.variable_sized_index++];
|
407
410
|
auto cdata = (char *)array.buffers[2];
|
408
411
|
if (original_type.first == ArrowVariableSizeType::SUPER_SIZE) {
|
409
|
-
if (((uint64_t *)array.buffers[1])[array.length] > NumericLimits<uint32_t>::Maximum()) { // LCOV_EXCL_START
|
410
|
-
throw ConversionException("DuckDB does not support Strings over 4GB");
|
411
|
-
} // LCOV_EXCL_STOP
|
412
412
|
auto offsets = (uint64_t *)array.buffers[1] + array.offset + scan_state.chunk_offset;
|
413
413
|
if (nested_offset != -1) {
|
414
414
|
offsets = (uint64_t *)array.buffers[1] + array.offset + nested_offset;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
2
|
-
#define DUCKDB_VERSION "0.7.2-
|
2
|
+
#define DUCKDB_VERSION "0.7.2-dev2995"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
5
|
+
#define DUCKDB_SOURCE_ID "9b1d80a9ee"
|
6
6
|
#endif
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
8
8
|
#include "duckdb/main/database.hpp"
|
@@ -80,7 +80,7 @@ public:
|
|
80
80
|
virtual unique_ptr<BaseStatistics> GetStatistics(ClientContext &context, column_t column_id) = 0;
|
81
81
|
|
82
82
|
//! Serialize the meta information of the TableCatalogEntry a serializer
|
83
|
-
|
83
|
+
void Serialize(Serializer &serializer) const;
|
84
84
|
//! Deserializes to a CreateTableInfo
|
85
85
|
static unique_ptr<CreateTableInfo> Deserialize(Deserializer &source, ClientContext &context);
|
86
86
|
|
@@ -103,6 +103,12 @@ public:
|
|
103
103
|
virtual TableStorageInfo GetStorageInfo(ClientContext &context) = 0;
|
104
104
|
|
105
105
|
protected:
|
106
|
+
// This is used to serialize the entry by #Serialize(Serializer& ). It is virtual to allow
|
107
|
+
// Custom catalog implementations to override the default implementation. We can not make
|
108
|
+
// The Serialize method itself virtual as the logic is tightly coupled to the static
|
109
|
+
// Deserialize method.
|
110
|
+
virtual CreateTableInfo GetTableInfoForSerialization() const;
|
111
|
+
|
106
112
|
//! A list of columns that are part of this table
|
107
113
|
ColumnList columns;
|
108
114
|
//! A list of constraints that are part of this table
|
@@ -14,25 +14,37 @@ namespace duckdb {
|
|
14
14
|
|
15
15
|
//! The OperatorResultType is used to indicate how data should flow around a regular (i.e. non-sink and non-source)
|
16
16
|
//! physical operator
|
17
|
-
//! There are
|
17
|
+
//! There are four possible results:
|
18
18
|
//! NEED_MORE_INPUT means the operator is done with the current input and can consume more input if available
|
19
19
|
//! If there is more input the operator will be called with more input, otherwise the operator will not be called again.
|
20
20
|
//! HAVE_MORE_OUTPUT means the operator is not finished yet with the current input.
|
21
21
|
//! The operator will be called again with the same input.
|
22
22
|
//! FINISHED means the operator has finished the entire pipeline and no more processing is necessary.
|
23
23
|
//! The operator will not be called again, and neither will any other operators in this pipeline.
|
24
|
-
|
24
|
+
//! BLOCKED means the operator does not want to be called right now. e.g. because its currently doing async I/O. The
|
25
|
+
//! operator has set the interrupt state and the caller is expected to handle it. Note that intermediate operators
|
26
|
+
//! should currently not emit this state.
|
27
|
+
enum class OperatorResultType : uint8_t { NEED_MORE_INPUT, HAVE_MORE_OUTPUT, FINISHED, BLOCKED };
|
25
28
|
|
26
29
|
//! OperatorFinalizeResultType is used to indicate whether operators have finished flushing their cached results.
|
27
30
|
//! FINISHED means the operator has flushed all cached data.
|
28
31
|
//! HAVE_MORE_OUTPUT means the operator contains more results.
|
29
32
|
enum class OperatorFinalizeResultType : uint8_t { HAVE_MORE_OUTPUT, FINISHED };
|
30
33
|
|
34
|
+
//! SourceResultType is used to indicate the result of data being pulled out of a source.
|
35
|
+
//! There are three possible results:
|
36
|
+
//! HAVE_MORE_OUTPUT means the source has more output, this flag should only be set when data is returned, empty results
|
37
|
+
//! should only occur for the FINISHED and BLOCKED flags
|
38
|
+
//! FINISHED means the source is exhausted
|
39
|
+
//! BLOCKED means the source is currently blocked, e.g. by some async I/O
|
40
|
+
enum class SourceResultType : uint8_t { HAVE_MORE_OUTPUT, FINISHED, BLOCKED };
|
41
|
+
|
31
42
|
//! The SinkResultType is used to indicate the result of data flowing into a sink
|
32
|
-
//! There are
|
43
|
+
//! There are three possible results:
|
33
44
|
//! NEED_MORE_INPUT means the sink needs more input
|
34
45
|
//! FINISHED means the sink is finished executing, and more input will not change the result any further
|
35
|
-
|
46
|
+
//! BLOCKED means the sink is currently blocked, e.g. by some async I/O.
|
47
|
+
enum class SinkResultType : uint8_t { NEED_MORE_INPUT, FINISHED, BLOCKED };
|
36
48
|
|
37
49
|
//! The SinkFinalizeType is used to indicate the result of a Finalize call on a sink
|
38
50
|
//! There are two possible results:
|
@@ -0,0 +1,45 @@
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
2
|
+
// DuckDB
|
3
|
+
//
|
4
|
+
// duckdb/common/optional_idx.hpp
|
5
|
+
//
|
6
|
+
//
|
7
|
+
//===----------------------------------------------------------------------===//
|
8
|
+
|
9
|
+
#pragma once
|
10
|
+
|
11
|
+
#include "duckdb/common/exception.hpp"
|
12
|
+
|
13
|
+
namespace duckdb {
|
14
|
+
|
15
|
+
class optional_idx {
|
16
|
+
static constexpr const idx_t INVALID_INDEX = idx_t(-1);
|
17
|
+
|
18
|
+
public:
|
19
|
+
optional_idx() : index(INVALID_INDEX) {
|
20
|
+
}
|
21
|
+
optional_idx(idx_t index) : index(index) { // NOLINT: allow implicit conversion from idx_t
|
22
|
+
if (index == INVALID_INDEX) {
|
23
|
+
throw InternalException("optional_idx cannot be initialized with an invalid index");
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
static optional_idx Invalid() {
|
28
|
+
return INVALID_INDEX;
|
29
|
+
}
|
30
|
+
|
31
|
+
bool IsValid() const {
|
32
|
+
return index != DConstants::INVALID_INDEX;
|
33
|
+
}
|
34
|
+
idx_t GetIndex() {
|
35
|
+
if (index == INVALID_INDEX) {
|
36
|
+
throw InternalException("Attempting to get the index of an optional_idx that is not set");
|
37
|
+
}
|
38
|
+
return index;
|
39
|
+
}
|
40
|
+
|
41
|
+
private:
|
42
|
+
idx_t index;
|
43
|
+
};
|
44
|
+
|
45
|
+
} // namespace duckdb
|
@@ -88,6 +88,21 @@ struct FormatFun {
|
|
88
88
|
static ScalarFunction GetFunction();
|
89
89
|
};
|
90
90
|
|
91
|
+
struct FormatBytesFun {
|
92
|
+
static constexpr const char *Name = "format_bytes";
|
93
|
+
static constexpr const char *Parameters = "bytes";
|
94
|
+
static constexpr const char *Description = "Converts bytes to a human-readable presentation (e.g. 16000 -> 16KB)";
|
95
|
+
static constexpr const char *Example = "format_bytes(1000 * 16)";
|
96
|
+
|
97
|
+
static ScalarFunction GetFunction();
|
98
|
+
};
|
99
|
+
|
100
|
+
struct FormatreadabledecimalsizeFun {
|
101
|
+
using ALIAS = FormatBytesFun;
|
102
|
+
|
103
|
+
static constexpr const char *Name = "formatReadableDecimalSize";
|
104
|
+
};
|
105
|
+
|
91
106
|
struct HammingFun {
|
92
107
|
static constexpr const char *Name = "hamming";
|
93
108
|
static constexpr const char *Parameters = "str1,str2";
|
@@ -70,6 +70,12 @@ public:
|
|
70
70
|
//! Flush a thread context into the client context
|
71
71
|
void Flush(ThreadContext &context);
|
72
72
|
|
73
|
+
//! Reschedules a task that was blocked
|
74
|
+
void RescheduleTask(shared_ptr<Task> &task);
|
75
|
+
|
76
|
+
//! Add the task to be rescheduled
|
77
|
+
void AddToBeRescheduled(shared_ptr<Task> &task);
|
78
|
+
|
73
79
|
//! Returns the progress of the pipelines
|
74
80
|
bool GetPipelinesProgress(double ¤t_progress);
|
75
81
|
|
@@ -146,6 +152,9 @@ private:
|
|
146
152
|
//! The last pending execution result (if any)
|
147
153
|
PendingExecutionResult execution_result;
|
148
154
|
//! The current task in process (if any)
|
149
|
-
|
155
|
+
shared_ptr<Task> task;
|
156
|
+
|
157
|
+
//! Task that have been descheduled
|
158
|
+
unordered_map<Task *, shared_ptr<Task>> to_be_rescheduled_tasks;
|
150
159
|
};
|
151
160
|
} // namespace duckdb
|
package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_hash_aggregate.hpp
CHANGED
@@ -90,8 +90,7 @@ public:
|
|
90
90
|
unique_ptr<GlobalSourceState> GetGlobalSourceState(ClientContext &context) const override;
|
91
91
|
unique_ptr<LocalSourceState> GetLocalSourceState(ExecutionContext &context,
|
92
92
|
GlobalSourceState &gstate) const override;
|
93
|
-
|
94
|
-
LocalSourceState &lstate) const override;
|
93
|
+
SourceResultType GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override;
|
95
94
|
|
96
95
|
bool IsSource() const override {
|
97
96
|
return true;
|
@@ -106,8 +105,7 @@ public:
|
|
106
105
|
|
107
106
|
public:
|
108
107
|
// Sink interface
|
109
|
-
SinkResultType Sink(ExecutionContext &context,
|
110
|
-
DataChunk &input) const override;
|
108
|
+
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
|
111
109
|
void Combine(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const override;
|
112
110
|
SinkFinalizeType Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
113
111
|
GlobalSinkState &gstate) const override;
|
@@ -145,11 +143,10 @@ private:
|
|
145
143
|
//! Combine the distinct aggregates
|
146
144
|
void CombineDistinct(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const;
|
147
145
|
//! Sink the distinct aggregates for a single grouping
|
148
|
-
void SinkDistinctGrouping(ExecutionContext &context,
|
149
|
-
|
146
|
+
void SinkDistinctGrouping(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input,
|
147
|
+
idx_t grouping_idx) const;
|
150
148
|
//! Sink the distinct aggregates
|
151
|
-
void SinkDistinct(ExecutionContext &context,
|
152
|
-
DataChunk &input) const;
|
149
|
+
void SinkDistinct(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const;
|
153
150
|
//! Create groups in the main ht for groups that would otherwise get filtered out completely
|
154
151
|
SinkResultType SinkGroupsOnly(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate,
|
155
152
|
DataChunk &input) const;
|
@@ -34,8 +34,7 @@ public:
|
|
34
34
|
public:
|
35
35
|
// Source interface
|
36
36
|
unique_ptr<GlobalSourceState> GetGlobalSourceState(ClientContext &context) const override;
|
37
|
-
|
38
|
-
LocalSourceState &lstate) const override;
|
37
|
+
SourceResultType GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override;
|
39
38
|
|
40
39
|
bool IsSource() const override {
|
41
40
|
return true;
|
@@ -46,8 +45,7 @@ public:
|
|
46
45
|
|
47
46
|
public:
|
48
47
|
// Sink interface
|
49
|
-
SinkResultType Sink(ExecutionContext &context,
|
50
|
-
DataChunk &input) const override;
|
48
|
+
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
|
51
49
|
void Combine(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const override;
|
52
50
|
|
53
51
|
unique_ptr<LocalSinkState> GetLocalSinkState(ExecutionContext &context) const override;
|
package/src/duckdb/src/include/duckdb/execution/operator/aggregate/physical_ungrouped_aggregate.hpp
CHANGED
@@ -35,9 +35,7 @@ public:
|
|
35
35
|
|
36
36
|
public:
|
37
37
|
// Source interface
|
38
|
-
|
39
|
-
void GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
40
|
-
LocalSourceState &lstate) const override;
|
38
|
+
SourceResultType GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override;
|
41
39
|
|
42
40
|
bool IsSource() const override {
|
43
41
|
return true;
|
@@ -45,8 +43,7 @@ public:
|
|
45
43
|
|
46
44
|
public:
|
47
45
|
// Sink interface
|
48
|
-
SinkResultType Sink(ExecutionContext &context,
|
49
|
-
DataChunk &input) const override;
|
46
|
+
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
|
50
47
|
void Combine(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const override;
|
51
48
|
SinkFinalizeType Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
52
49
|
GlobalSinkState &gstate) const override;
|
@@ -73,8 +70,7 @@ private:
|
|
73
70
|
//! Combine the distinct aggregates
|
74
71
|
void CombineDistinct(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const;
|
75
72
|
//! Sink the distinct aggregates
|
76
|
-
void SinkDistinct(ExecutionContext &context,
|
77
|
-
DataChunk &input) const;
|
73
|
+
void SinkDistinct(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const;
|
78
74
|
};
|
79
75
|
|
80
76
|
} // namespace duckdb
|
@@ -35,8 +35,7 @@ public:
|
|
35
35
|
unique_ptr<LocalSourceState> GetLocalSourceState(ExecutionContext &context,
|
36
36
|
GlobalSourceState &gstate) const override;
|
37
37
|
unique_ptr<GlobalSourceState> GetGlobalSourceState(ClientContext &context) const override;
|
38
|
-
|
39
|
-
LocalSourceState &lstate) const override;
|
38
|
+
SourceResultType GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override;
|
40
39
|
|
41
40
|
bool IsSource() const override {
|
42
41
|
return true;
|
@@ -51,8 +50,7 @@ public:
|
|
51
50
|
|
52
51
|
public:
|
53
52
|
// Sink interface
|
54
|
-
SinkResultType Sink(ExecutionContext &context,
|
55
|
-
DataChunk &input) const override;
|
53
|
+
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
|
56
54
|
void Combine(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const override;
|
57
55
|
SinkFinalizeType Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
58
56
|
GlobalSinkState &gstate) const override;
|
package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_batch_collector.hpp
CHANGED
@@ -21,8 +21,7 @@ public:
|
|
21
21
|
|
22
22
|
public:
|
23
23
|
// Sink interface
|
24
|
-
SinkResultType Sink(ExecutionContext &context,
|
25
|
-
DataChunk &input) const override;
|
24
|
+
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
|
26
25
|
void Combine(ExecutionContext &context, GlobalSinkState &state, LocalSinkState &lstate) const override;
|
27
26
|
SinkFinalizeType Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
28
27
|
GlobalSinkState &gstate) const override;
|
package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_explain_analyze.hpp
CHANGED
@@ -24,9 +24,7 @@ public:
|
|
24
24
|
|
25
25
|
public:
|
26
26
|
// Source interface
|
27
|
-
|
28
|
-
void GetData(ExecutionContext &context, DataChunk &chunk, GlobalSourceState &gstate,
|
29
|
-
LocalSourceState &lstate) const override;
|
27
|
+
SourceResultType GetData(ExecutionContext &context, DataChunk &chunk, OperatorSourceInput &input) const override;
|
30
28
|
|
31
29
|
bool IsSource() const override {
|
32
30
|
return true;
|
@@ -34,8 +32,7 @@ public:
|
|
34
32
|
|
35
33
|
public:
|
36
34
|
// Sink Interface
|
37
|
-
SinkResultType Sink(ExecutionContext &context,
|
38
|
-
DataChunk &input) const override;
|
35
|
+
SinkResultType Sink(ExecutionContext &context, DataChunk &chunk, OperatorSinkInput &input) const override;
|
39
36
|
SinkFinalizeType Finalize(Pipeline &pipeline, Event &event, ClientContext &context,
|
40
37
|
GlobalSinkState &gstate) const override;
|
41
38
|
|