duckdb 0.7.2-dev2233.0 → 0.7.2-dev2320.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/src/catalog/catalog.cpp +18 -17
- package/src/duckdb/src/catalog/catalog_entry/duck_table_entry.cpp +0 -4
- package/src/duckdb/src/catalog/catalog_entry/table_catalog_entry.cpp +0 -4
- package/src/duckdb/src/catalog/catalog_set.cpp +3 -3
- package/src/duckdb/src/common/adbc/adbc.cpp +441 -0
- package/src/duckdb/src/common/adbc/driver_manager.cpp +749 -0
- package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +1 -1
- package/src/duckdb/src/common/tree_renderer.cpp +3 -3
- package/src/duckdb/src/common/types/conflict_manager.cpp +2 -1
- package/src/duckdb/src/execution/column_binding_resolver.cpp +1 -1
- package/src/duckdb/src/execution/operator/aggregate/physical_ungrouped_aggregate.cpp +1 -1
- package/src/duckdb/src/execution/operator/filter/physical_filter.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_execute.cpp +2 -2
- package/src/duckdb/src/execution/operator/helper/physical_result_collector.cpp +5 -5
- package/src/duckdb/src/execution/operator/join/physical_cross_product.cpp +1 -1
- package/src/duckdb/src/execution/operator/join/physical_delim_join.cpp +11 -10
- package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_iejoin.cpp +9 -9
- package/src/duckdb/src/execution/operator/join/physical_index_join.cpp +4 -4
- package/src/duckdb/src/execution/operator/join/physical_join.cpp +7 -7
- package/src/duckdb/src/execution/operator/join/physical_nested_loop_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_piecewise_merge_join.cpp +3 -3
- package/src/duckdb/src/execution/operator/join/physical_positional_join.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/csv_reader_options.cpp +8 -9
- package/src/duckdb/src/execution/operator/persistent/physical_batch_insert.cpp +20 -19
- package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +3 -3
- package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +25 -24
- package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +1 -1
- package/src/duckdb/src/execution/operator/projection/physical_projection.cpp +2 -2
- package/src/duckdb/src/execution/operator/scan/physical_column_data_scan.cpp +12 -6
- package/src/duckdb/src/execution/operator/set/physical_recursive_cte.cpp +10 -11
- package/src/duckdb/src/execution/operator/set/physical_union.cpp +2 -2
- package/src/duckdb/src/execution/physical_operator.cpp +13 -13
- package/src/duckdb/src/execution/physical_plan/plan_column_data_get.cpp +2 -4
- package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +1 -1
- package/src/duckdb/src/execution/physical_plan/plan_create_table.cpp +5 -5
- package/src/duckdb/src/execution/physical_plan/plan_delete.cpp +3 -3
- package/src/duckdb/src/execution/physical_plan/plan_delim_join.cpp +6 -7
- package/src/duckdb/src/execution/physical_plan/plan_explain.cpp +2 -4
- package/src/duckdb/src/execution/physical_plan/plan_insert.cpp +2 -2
- package/src/duckdb/src/execution/physical_plan/plan_show_select.cpp +2 -4
- package/src/duckdb/src/execution/physical_plan/plan_update.cpp +3 -3
- package/src/duckdb/src/function/compression_config.cpp +9 -9
- package/src/duckdb/src/function/scalar/date/strftime.cpp +1 -1
- package/src/duckdb/src/function/table/copy_csv.cpp +5 -0
- package/src/duckdb/src/function/table/pragma_detailed_profiling_output.cpp +6 -5
- package/src/duckdb/src/function/table/pragma_last_profiling_output.cpp +7 -5
- package/src/duckdb/src/function/table/system/duckdb_databases.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_dependencies.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_extensions.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_indexes.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_keywords.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_schemas.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_sequences.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_settings.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_tables.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_temporary_files.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_types.cpp +1 -1
- package/src/duckdb/src/function/table/system/pragma_collations.cpp +1 -1
- package/src/duckdb/src/function/table/system/pragma_database_size.cpp +1 -1
- package/src/duckdb/src/function/table/system/pragma_storage_info.cpp +5 -5
- package/src/duckdb/src/function/table/system/pragma_table_info.cpp +1 -1
- package/src/duckdb/src/function/table/system/test_all_types.cpp +1 -1
- package/src/duckdb/src/function/table/table_scan.cpp +3 -4
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +3 -3
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/duck_table_entry.hpp +1 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_catalog_entry.hpp +1 -2
- package/src/duckdb/src/include/duckdb/common/adbc/adbc-init.hpp +37 -0
- package/src/duckdb/src/include/duckdb/common/adbc/adbc.h +1088 -0
- package/src/duckdb/src/include/duckdb/common/adbc/adbc.hpp +85 -0
- package/src/duckdb/src/include/duckdb/common/adbc/driver_manager.h +84 -0
- package/src/duckdb/src/include/duckdb/common/helper.hpp +3 -0
- package/src/duckdb/src/include/duckdb/common/types/conflict_manager.hpp +3 -2
- package/src/duckdb/src/include/duckdb/common/types.hpp +0 -1
- package/src/duckdb/src/include/duckdb/execution/executor.hpp +7 -7
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_execute.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_result_collector.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_cross_product.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_delim_join.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_index_join.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_join.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/join/physical_positional_join.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +2 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_batch_insert.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_export.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_insert.hpp +2 -2
- package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_column_data_scan.hpp +3 -4
- package/src/duckdb/src/include/duckdb/execution/operator/set/physical_recursive_cte.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/set/physical_union.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/physical_operator.hpp +3 -3
- package/src/duckdb/src/include/duckdb/execution/physical_operator_states.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/cast/cast_function_set.hpp +1 -1
- package/src/duckdb/src/include/duckdb/main/config.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/query_profiler.hpp +10 -9
- package/src/duckdb/src/include/duckdb/parallel/meta_pipeline.hpp +4 -4
- package/src/duckdb/src/include/duckdb/parallel/pipeline.hpp +18 -17
- package/src/duckdb/src/include/duckdb/parallel/pipeline_executor.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/bind_context.hpp +14 -17
- package/src/duckdb/src/include/duckdb/planner/binder.hpp +6 -6
- package/src/duckdb/src/include/duckdb/planner/expression_binder/index_binder.hpp +4 -4
- package/src/duckdb/src/include/duckdb/planner/expression_binder/where_binder.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create.hpp +3 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_create_table.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_delete.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_insert.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/operator/logical_update.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/parsed_data/bound_create_function_info.hpp +3 -2
- package/src/duckdb/src/include/duckdb/planner/parsed_data/bound_create_table_info.hpp +3 -2
- package/src/duckdb/src/include/duckdb/planner/table_binding.hpp +6 -5
- package/src/duckdb/src/include/duckdb/planner/tableref/bound_basetableref.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/compression/chimp/chimp_compress.hpp +3 -7
- package/src/duckdb/src/include/duckdb/storage/compression/patas/patas_compress.hpp +3 -7
- package/src/duckdb/src/include/duckdb/storage/data_table.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/storage_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/column_data_checkpointer.hpp +2 -1
- package/src/duckdb/src/include/duckdb/storage/table/column_segment.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/row_group_collection.hpp +1 -1
- package/src/duckdb/src/include/duckdb/storage/table/update_segment.hpp +4 -4
- package/src/duckdb/src/include/duckdb/storage/write_ahead_log.hpp +3 -3
- package/src/duckdb/src/include/duckdb/transaction/cleanup_state.hpp +3 -3
- package/src/duckdb/src/include/duckdb/transaction/commit_state.hpp +5 -5
- package/src/duckdb/src/include/duckdb/transaction/duck_transaction.hpp +3 -3
- package/src/duckdb/src/include/duckdb/transaction/local_storage.hpp +31 -30
- package/src/duckdb/src/include/duckdb/transaction/transaction_data.hpp +2 -1
- package/src/duckdb/src/include/duckdb/transaction/undo_buffer.hpp +1 -1
- package/src/duckdb/src/main/client_context.cpp +1 -1
- package/src/duckdb/src/main/query_profiler.cpp +24 -22
- package/src/duckdb/src/parallel/executor.cpp +55 -49
- package/src/duckdb/src/parallel/meta_pipeline.cpp +5 -5
- package/src/duckdb/src/parallel/pipeline.cpp +43 -26
- package/src/duckdb/src/parallel/pipeline_executor.cpp +22 -22
- package/src/duckdb/src/planner/bind_context.cpp +67 -71
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +6 -7
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +6 -8
- package/src/duckdb/src/planner/binder/statement/bind_delete.cpp +3 -4
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +17 -18
- package/src/duckdb/src/planner/binder/statement/bind_update.cpp +16 -17
- package/src/duckdb/src/planner/binder/statement/bind_vacuum.cpp +6 -5
- package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +9 -9
- package/src/duckdb/src/planner/binder/tableref/bind_joinref.cpp +20 -18
- package/src/duckdb/src/planner/binder/tableref/plan_joinref.cpp +1 -1
- package/src/duckdb/src/planner/binder.cpp +4 -4
- package/src/duckdb/src/planner/expression_binder/index_binder.cpp +2 -1
- package/src/duckdb/src/planner/expression_binder/where_binder.cpp +3 -2
- package/src/duckdb/src/planner/operator/logical_create_table.cpp +1 -1
- package/src/duckdb/src/planner/operator/logical_delete.cpp +5 -5
- package/src/duckdb/src/planner/operator/logical_insert.cpp +6 -7
- package/src/duckdb/src/planner/operator/logical_update.cpp +6 -7
- package/src/duckdb/src/planner/parsed_data/bound_create_table_info.cpp +4 -5
- package/src/duckdb/src/planner/table_binding.cpp +6 -5
- package/src/duckdb/src/storage/compression/bitpacking.cpp +5 -6
- package/src/duckdb/src/storage/compression/dictionary_compression.cpp +5 -6
- package/src/duckdb/src/storage/compression/fsst.cpp +3 -5
- package/src/duckdb/src/storage/compression/rle.cpp +4 -6
- package/src/duckdb/src/storage/data_table.cpp +27 -28
- package/src/duckdb/src/storage/local_storage.cpp +70 -68
- package/src/duckdb/src/storage/storage_manager.cpp +12 -13
- package/src/duckdb/src/storage/table/column_checkpoint_state.cpp +2 -2
- package/src/duckdb/src/storage/table/column_data.cpp +2 -2
- package/src/duckdb/src/storage/table/column_data_checkpointer.cpp +18 -6
- package/src/duckdb/src/storage/table/column_segment.cpp +23 -24
- package/src/duckdb/src/storage/table/row_group.cpp +3 -3
- package/src/duckdb/src/storage/table/row_group_collection.cpp +1 -1
- package/src/duckdb/src/storage/table/update_segment.cpp +15 -15
- package/src/duckdb/src/storage/wal_replay.cpp +1 -1
- package/src/duckdb/src/transaction/cleanup_state.cpp +10 -10
- package/src/duckdb/src/transaction/commit_state.cpp +19 -19
- package/src/duckdb/src/transaction/duck_transaction.cpp +7 -7
- package/src/duckdb/src/transaction/rollback_state.cpp +1 -1
- package/src/duckdb/src/transaction/undo_buffer.cpp +2 -1
- package/src/duckdb/ub_src_common_adbc.cpp +4 -0
- package/src/duckdb/src/include/duckdb/common/single_thread_ptr.hpp +0 -185
@@ -42,7 +42,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBDatabasesInit(ClientContext &context,
|
|
42
42
|
}
|
43
43
|
|
44
44
|
void DuckDBDatabasesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
45
|
-
auto &data =
|
45
|
+
auto &data = data_p.global_state->Cast<DuckDBDatabasesData>();
|
46
46
|
if (data.offset >= data.entries.size()) {
|
47
47
|
// finished returning values
|
48
48
|
return;
|
@@ -69,7 +69,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBDependenciesInit(ClientContext &conte
|
|
69
69
|
}
|
70
70
|
|
71
71
|
void DuckDBDependenciesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
72
|
-
auto &data =
|
72
|
+
auto &data = data_p.global_state->Cast<DuckDBDependenciesData>();
|
73
73
|
if (data.offset >= data.entries.size()) {
|
74
74
|
// finished returning values
|
75
75
|
return;
|
@@ -119,7 +119,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBExtensionsInit(ClientContext &context
|
|
119
119
|
}
|
120
120
|
|
121
121
|
void DuckDBExtensionsFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
122
|
-
auto &data =
|
122
|
+
auto &data = data_p.global_state->Cast<DuckDBExtensionsData>();
|
123
123
|
if (data.offset >= data.entries.size()) {
|
124
124
|
// finished returning values
|
125
125
|
return;
|
@@ -72,7 +72,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBIndexesInit(ClientContext &context, T
|
|
72
72
|
}
|
73
73
|
|
74
74
|
void DuckDBIndexesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
75
|
-
auto &data =
|
75
|
+
auto &data = data_p.global_state->Cast<DuckDBIndexesData>();
|
76
76
|
if (data.offset >= data.entries.size()) {
|
77
77
|
// finished returning values
|
78
78
|
return;
|
@@ -32,7 +32,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBKeywordsInit(ClientContext &context,
|
|
32
32
|
}
|
33
33
|
|
34
34
|
void DuckDBKeywordsFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
35
|
-
auto &data =
|
35
|
+
auto &data = data_p.global_state->Cast<DuckDBKeywordsData>();
|
36
36
|
if (data.offset >= data.entries.size()) {
|
37
37
|
// finished returning values
|
38
38
|
return;
|
@@ -49,7 +49,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBSchemasInit(ClientContext &context, T
|
|
49
49
|
}
|
50
50
|
|
51
51
|
void DuckDBSchemasFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
52
|
-
auto &data =
|
52
|
+
auto &data = data_p.global_state->Cast<DuckDBSchemasData>();
|
53
53
|
if (data.offset >= data.entries.size()) {
|
54
54
|
// finished returning values
|
55
55
|
return;
|
@@ -77,7 +77,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBSequencesInit(ClientContext &context,
|
|
77
77
|
}
|
78
78
|
|
79
79
|
void DuckDBSequencesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
80
|
-
auto &data =
|
80
|
+
auto &data = data_p.global_state->Cast<DuckDBSequencesData>();
|
81
81
|
if (data.offset >= data.entries.size()) {
|
82
82
|
// finished returning values
|
83
83
|
return;
|
@@ -71,7 +71,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBSettingsInit(ClientContext &context,
|
|
71
71
|
}
|
72
72
|
|
73
73
|
void DuckDBSettingsFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
74
|
-
auto &data =
|
74
|
+
auto &data = data_p.global_state->Cast<DuckDBSettingsData>();
|
75
75
|
if (data.offset >= data.settings.size()) {
|
76
76
|
// finished returning values
|
77
77
|
return;
|
@@ -102,7 +102,7 @@ static idx_t CheckConstraintCount(TableCatalogEntry &table) {
|
|
102
102
|
}
|
103
103
|
|
104
104
|
void DuckDBTablesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
105
|
-
auto &data =
|
105
|
+
auto &data = data_p.global_state->Cast<DuckDBTablesData>();
|
106
106
|
if (data.offset >= data.entries.size()) {
|
107
107
|
// finished returning values
|
108
108
|
return;
|
@@ -30,7 +30,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBTemporaryFilesInit(ClientContext &con
|
|
30
30
|
}
|
31
31
|
|
32
32
|
void DuckDBTemporaryFilesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
33
|
-
auto &data =
|
33
|
+
auto &data = data_p.global_state->Cast<DuckDBTemporaryFilesData>();
|
34
34
|
if (data.offset >= data.entries.size()) {
|
35
35
|
// finished returning values
|
36
36
|
return;
|
@@ -68,7 +68,7 @@ unique_ptr<GlobalTableFunctionState> DuckDBTypesInit(ClientContext &context, Tab
|
|
68
68
|
}
|
69
69
|
|
70
70
|
void DuckDBTypesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
71
|
-
auto &data =
|
71
|
+
auto &data = data_p.global_state->Cast<DuckDBTypesData>();
|
72
72
|
if (data.offset >= data.entries.size()) {
|
73
73
|
// finished returning values
|
74
74
|
return;
|
@@ -35,7 +35,7 @@ unique_ptr<GlobalTableFunctionState> PragmaCollateInit(ClientContext &context, T
|
|
35
35
|
}
|
36
36
|
|
37
37
|
static void PragmaCollateFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
38
|
-
auto &data =
|
38
|
+
auto &data = data_p.global_state->Cast<PragmaCollateData>();
|
39
39
|
if (data.offset >= data.entries.size()) {
|
40
40
|
// finished returning values
|
41
41
|
return;
|
@@ -65,7 +65,7 @@ unique_ptr<GlobalTableFunctionState> PragmaDatabaseSizeInit(ClientContext &conte
|
|
65
65
|
}
|
66
66
|
|
67
67
|
void PragmaDatabaseSizeFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
68
|
-
auto &data =
|
68
|
+
auto &data = data_p.global_state->Cast<PragmaDatabaseSizeData>();
|
69
69
|
idx_t row = 0;
|
70
70
|
for (; data.index < data.databases.size() && row < STANDARD_VECTOR_SIZE; data.index++) {
|
71
71
|
auto db = data.databases[data.index];
|
@@ -18,10 +18,10 @@
|
|
18
18
|
namespace duckdb {
|
19
19
|
|
20
20
|
struct PragmaStorageFunctionData : public TableFunctionData {
|
21
|
-
explicit PragmaStorageFunctionData(TableCatalogEntry
|
21
|
+
explicit PragmaStorageFunctionData(TableCatalogEntry &table_entry) : table_entry(table_entry) {
|
22
22
|
}
|
23
23
|
|
24
|
-
TableCatalogEntry
|
24
|
+
TableCatalogEntry &table_entry;
|
25
25
|
TableStorageInfo storage_info;
|
26
26
|
};
|
27
27
|
|
@@ -81,7 +81,7 @@ static unique_ptr<FunctionData> PragmaStorageInfoBind(ClientContext &context, Ta
|
|
81
81
|
// look up the table name in the catalog
|
82
82
|
Binder::BindSchemaOrCatalog(context, qname.catalog, qname.schema);
|
83
83
|
auto table_entry = Catalog::GetEntry<TableCatalogEntry>(context, qname.catalog, qname.schema, qname.name);
|
84
|
-
auto result = make_uniq<PragmaStorageFunctionData>(table_entry);
|
84
|
+
auto result = make_uniq<PragmaStorageFunctionData>(*table_entry);
|
85
85
|
result->storage_info = table_entry->GetStorageInfo(context);
|
86
86
|
return std::move(result);
|
87
87
|
}
|
@@ -91,10 +91,10 @@ unique_ptr<GlobalTableFunctionState> PragmaStorageInfoInit(ClientContext &contex
|
|
91
91
|
}
|
92
92
|
|
93
93
|
static void PragmaStorageInfoFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
94
|
-
auto &bind_data =
|
94
|
+
auto &bind_data = data_p.bind_data->Cast<PragmaStorageFunctionData>();
|
95
95
|
auto &data = data_p.global_state->Cast<PragmaStorageOperatorData>();
|
96
96
|
idx_t count = 0;
|
97
|
-
auto &columns = bind_data.table_entry
|
97
|
+
auto &columns = bind_data.table_entry.GetColumns();
|
98
98
|
while (data.offset < bind_data.storage_info.column_segments.size() && count < STANDARD_VECTOR_SIZE) {
|
99
99
|
auto &entry = bind_data.storage_info.column_segments[data.offset++];
|
100
100
|
|
@@ -163,7 +163,7 @@ static void PragmaTableInfoView(PragmaTableOperatorData &data, ViewCatalogEntry
|
|
163
163
|
}
|
164
164
|
|
165
165
|
static void PragmaTableInfoFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
166
|
-
auto &bind_data =
|
166
|
+
auto &bind_data = data_p.bind_data->Cast<PragmaTableFunctionData>();
|
167
167
|
auto &state = data_p.global_state->Cast<PragmaTableOperatorData>();
|
168
168
|
switch (bind_data.entry.type) {
|
169
169
|
case CatalogType::TABLE_ENTRY:
|
@@ -224,7 +224,7 @@ unique_ptr<GlobalTableFunctionState> TestAllTypesInit(ClientContext &context, Ta
|
|
224
224
|
}
|
225
225
|
|
226
226
|
void TestAllTypesFunction(ClientContext &context, TableFunctionInput &data_p, DataChunk &output) {
|
227
|
-
auto &data =
|
227
|
+
auto &data = data_p.global_state->Cast<TestAllTypesData>();
|
228
228
|
if (data.offset >= data.entries.size()) {
|
229
229
|
// finished returning values
|
230
230
|
return;
|
@@ -103,7 +103,7 @@ static unique_ptr<BaseStatistics> TableScanStatistics(ClientContext &context, co
|
|
103
103
|
column_t column_id) {
|
104
104
|
auto &bind_data = bind_data_p->Cast<TableScanBindData>();
|
105
105
|
auto &local_storage = LocalStorage::Get(context, *bind_data.table->catalog);
|
106
|
-
if (local_storage.Find(bind_data.table->
|
106
|
+
if (local_storage.Find(bind_data.table->GetStorage())) {
|
107
107
|
// we don't emit any statistics for tables that have outstanding transaction-local data
|
108
108
|
return nullptr;
|
109
109
|
}
|
@@ -192,7 +192,7 @@ unique_ptr<NodeStatistics> TableScanCardinality(ClientContext &context, const Fu
|
|
192
192
|
auto &bind_data = bind_data_p->Cast<TableScanBindData>();
|
193
193
|
auto &local_storage = LocalStorage::Get(context, *bind_data.table->catalog);
|
194
194
|
auto &storage = bind_data.table->GetStorage();
|
195
|
-
idx_t estimated_cardinality = storage.info->cardinality + local_storage.AddedRows(bind_data.table->
|
195
|
+
idx_t estimated_cardinality = storage.info->cardinality + local_storage.AddedRows(bind_data.table->GetStorage());
|
196
196
|
return make_uniq<NodeStatistics>(storage.info->cardinality, estimated_cardinality);
|
197
197
|
}
|
198
198
|
|
@@ -220,8 +220,7 @@ static unique_ptr<GlobalTableFunctionState> IndexScanInitGlobal(ClientContext &c
|
|
220
220
|
auto &local_storage = LocalStorage::Get(context, *bind_data.table->catalog);
|
221
221
|
result->column_ids = input.column_ids;
|
222
222
|
result->local_storage_state.Initialize(input.column_ids, input.filters);
|
223
|
-
local_storage.InitializeScan(bind_data.table->
|
224
|
-
input.filters);
|
223
|
+
local_storage.InitializeScan(bind_data.table->GetStorage(), result->local_storage_state.local_state, input.filters);
|
225
224
|
|
226
225
|
result->finished = false;
|
227
226
|
return std::move(result);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
2
|
-
#define DUCKDB_VERSION "0.7.2-
|
2
|
+
#define DUCKDB_VERSION "0.7.2-dev2320"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
5
|
+
#define DUCKDB_SOURCE_ID "04b7296af3"
|
6
6
|
#endif
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
8
8
|
#include "duckdb/main/database.hpp"
|
@@ -12,7 +12,7 @@
|
|
12
12
|
#include "duckdb/common/mutex.hpp"
|
13
13
|
#include "duckdb/parser/query_error_context.hpp"
|
14
14
|
#include "duckdb/catalog/catalog_transaction.hpp"
|
15
|
-
#include "duckdb/common/
|
15
|
+
#include "duckdb/common/reference_map.hpp"
|
16
16
|
#include "duckdb/common/atomic.hpp"
|
17
17
|
#include "duckdb/common/optional_ptr.hpp"
|
18
18
|
|
@@ -279,12 +279,12 @@ private:
|
|
279
279
|
//! Return an exception with did-you-mean suggestion.
|
280
280
|
static CatalogException CreateMissingEntryException(ClientContext &context, const string &entry_name,
|
281
281
|
CatalogType type,
|
282
|
-
const
|
282
|
+
const reference_set_t<SchemaCatalogEntry> &schemas,
|
283
283
|
QueryErrorContext error_context);
|
284
284
|
|
285
285
|
//! Return the close entry name, the distance and the belonging schema.
|
286
286
|
static SimilarCatalogEntry SimilarEntryInSchemas(ClientContext &context, const string &entry_name, CatalogType type,
|
287
|
-
const
|
287
|
+
const reference_set_t<SchemaCatalogEntry> &schemas);
|
288
288
|
|
289
289
|
virtual void DropSchema(ClientContext &context, DropInfo *info) = 0;
|
290
290
|
|
@@ -24,7 +24,6 @@ public:
|
|
24
24
|
void UndoAlter(ClientContext &context, AlterInfo *info) override;
|
25
25
|
//! Returns the underlying storage of the table
|
26
26
|
DataTable &GetStorage() override;
|
27
|
-
DataTable *GetStoragePtr() override;
|
28
27
|
//! Returns a list of the bound constraints of the table
|
29
28
|
const vector<unique_ptr<BoundConstraint>> &GetBoundConstraints() override;
|
30
29
|
|
@@ -42,7 +41,7 @@ public:
|
|
42
41
|
|
43
42
|
TableStorageInfo GetStorageInfo(ClientContext &context) override;
|
44
43
|
|
45
|
-
bool IsDuckTable() override {
|
44
|
+
bool IsDuckTable() const override {
|
46
45
|
return true;
|
47
46
|
}
|
48
47
|
|
@@ -69,7 +69,6 @@ public:
|
|
69
69
|
DUCKDB_API ColumnList &GetColumnsMutable();
|
70
70
|
//! Returns the underlying storage of the table
|
71
71
|
virtual DataTable &GetStorage();
|
72
|
-
virtual DataTable *GetStoragePtr();
|
73
72
|
//! Returns a list of the bound constraints of the table
|
74
73
|
virtual const vector<unique_ptr<BoundConstraint>> &GetBoundConstraints();
|
75
74
|
|
@@ -94,7 +93,7 @@ public:
|
|
94
93
|
//! Returns the scan function that can be used to scan the given table
|
95
94
|
virtual TableFunction GetScanFunction(ClientContext &context, unique_ptr<FunctionData> &bind_data) = 0;
|
96
95
|
|
97
|
-
virtual bool IsDuckTable() {
|
96
|
+
virtual bool IsDuckTable() const {
|
98
97
|
return false;
|
99
98
|
}
|
100
99
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Licensed to the Apache Software Foundation (ASF) under one
|
2
|
+
// or more contributor license agreements. See the NOTICE file
|
3
|
+
// distributed with this work for additional information
|
4
|
+
// regarding copyright ownership. The ASF licenses this file
|
5
|
+
// to you under the Apache License, Version 2.0 (the
|
6
|
+
// "License"); you may not use this file except in compliance
|
7
|
+
// with the License. You may obtain a copy of the License at
|
8
|
+
//
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
//
|
11
|
+
// Unless required by applicable law or agreed to in writing,
|
12
|
+
// software distributed under the License is distributed on an
|
13
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
// KIND, either express or implied. See the License for the
|
15
|
+
// specific language governing permissions and limitations
|
16
|
+
// under the License.
|
17
|
+
|
18
|
+
#pragma once
|
19
|
+
|
20
|
+
#ifndef DUCKDB_ADBC_INIT
|
21
|
+
#define DUCKDB_ADBC_INIT
|
22
|
+
|
23
|
+
#include "duckdb/common/adbc/adbc.hpp"
|
24
|
+
|
25
|
+
#ifdef __cplusplus
|
26
|
+
extern "C" {
|
27
|
+
#endif
|
28
|
+
|
29
|
+
//! We gotta leak the symbols of the init function
|
30
|
+
duckdb_adbc::AdbcStatusCode duckdb_adbc_init(size_t count, struct duckdb_adbc::AdbcDriver *driver,
|
31
|
+
struct duckdb_adbc::AdbcError *error);
|
32
|
+
|
33
|
+
#ifdef __cplusplus
|
34
|
+
}
|
35
|
+
#endif
|
36
|
+
|
37
|
+
#endif
|