├── src ├── duckdb │ ├── third_party │ │ ├── thrift │ │ │ └── thrift │ │ │ │ ├── stdcxx.h │ │ │ │ └── thrift_export.h │ │ ├── mbedtls │ │ │ ├── include │ │ │ │ ├── mbedtls │ │ │ │ │ ├── entropy.h │ │ │ │ │ ├── aria.h │ │ │ │ │ ├── sha512.h │ │ │ │ │ ├── camellia.h │ │ │ │ │ ├── cmac.h │ │ │ │ │ ├── md5.h │ │ │ │ │ ├── sha3.h │ │ │ │ │ ├── aes_alt.h │ │ │ │ │ ├── aria_alt.h │ │ │ │ │ ├── ccm_alt.h │ │ │ │ │ ├── chacha20.h │ │ │ │ │ ├── ecdsa.h │ │ │ │ │ ├── gcm_alt.h │ │ │ │ │ ├── nist_kw.h │ │ │ │ │ ├── pkcs12.h │ │ │ │ │ ├── pkcs5.h │ │ │ │ │ ├── psa_util.h │ │ │ │ │ ├── ripemd160.h │ │ │ │ │ ├── threading.h │ │ │ │ │ ├── timing.h │ │ │ │ │ ├── block_cipher.h │ │ │ │ │ ├── camellia_alt.h │ │ │ │ │ ├── chachapoly.h │ │ │ │ │ ├── config_psa.h │ │ │ │ │ ├── config_adjust_ssl.h │ │ │ │ │ ├── config_adjust_x509.h │ │ │ │ │ ├── config_adjust_legacy_crypto.h │ │ │ │ │ └── private_access.h │ │ │ │ ├── psa │ │ │ │ │ ├── crypto_se_driver.h │ │ │ │ │ ├── crypto.h │ │ │ │ │ ├── crypto_config.h │ │ │ │ │ └── build_info.h │ │ │ │ ├── des_alt.h │ │ │ │ ├── rsa_alt.h │ │ │ │ ├── platform_alt.h │ │ │ │ ├── sha1_alt.h │ │ │ │ ├── sha256_alt.h │ │ │ │ ├── sha512_alt.h │ │ │ │ └── ssl_misc.h │ │ │ └── library │ │ │ │ ├── aes_alt.h │ │ │ │ ├── ecp_alt.h │ │ │ │ ├── ccm_alt.h │ │ │ │ ├── gcm_alt.h │ │ │ │ ├── cipher_invasive.h │ │ │ │ └── md_psa.h │ │ ├── parquet │ │ │ └── windows_compatibility.h │ │ ├── snappy │ │ │ └── snappy_version.hpp │ │ ├── re2 │ │ │ └── util │ │ │ │ └── strutil.h │ │ └── brotli │ │ │ ├── enc │ │ │ └── dictionary_hash.h │ │ │ └── common │ │ │ └── platform.cpp │ ├── extension │ │ ├── icu │ │ │ ├── third_party │ │ │ │ └── icu │ │ │ │ │ └── common │ │ │ │ │ ├── ucnv_bld.h │ │ │ │ │ ├── ucnv_cnv.h │ │ │ │ │ ├── ucnv_ext.h │ │ │ │ │ ├── ucnv_imp.h │ │ │ │ │ ├── ucnvhz.cpp │ │ │ │ │ ├── ucnvmbcs.h │ │ │ │ │ ├── ucnv_ct.cpp │ │ │ │ │ ├── ucnv_err.cpp │ │ │ │ │ ├── ucnv_ext.cpp │ │ │ │ │ ├── ucnv_lmb.cpp │ │ │ │ │ ├── ucnv_u7.cpp │ │ │ │ │ ├── ucnvbocu.cpp │ │ │ │ │ ├── ucnvisci.cpp │ │ │ │ │ ├── unicode │ │ │ │ │ └── ucnv.h │ │ │ │ │ ├── ubrkimpl.h │ │ │ │ │ ├── ustrfmt.h │ │ │ │ │ └── resource.cpp │ │ │ └── include │ │ │ │ ├── icu-current.hpp │ │ │ │ ├── icu-dateadd.hpp │ │ │ │ ├── icu-datepart.hpp │ │ │ │ ├── icu-datesub.hpp │ │ │ │ ├── icu-makedate.hpp │ │ │ │ ├── icu-strptime.hpp │ │ │ │ ├── icu-timezone.hpp │ │ │ │ ├── icu-datetrunc.hpp │ │ │ │ ├── icu-list-range.hpp │ │ │ │ ├── icu-timebucket.hpp │ │ │ │ ├── icu-table-range.hpp │ │ │ │ └── icu_extension.hpp │ │ ├── jemalloc │ │ │ ├── jemalloc │ │ │ │ ├── include │ │ │ │ │ ├── msvc_compat │ │ │ │ │ │ ├── windows_extra.h │ │ │ │ │ │ └── C99 │ │ │ │ │ │ │ └── stdbool.h │ │ │ │ │ └── jemalloc │ │ │ │ │ │ └── internal │ │ │ │ │ │ ├── tsd_types.h │ │ │ │ │ │ ├── slab_data.h │ │ │ │ │ │ ├── extent_mmap.h │ │ │ │ │ │ └── bin_types.h │ │ │ │ └── src │ │ │ │ │ ├── edata.c │ │ │ │ │ ├── exp_grow.c │ │ │ │ │ └── test_hooks.c │ │ │ └── include │ │ │ │ └── malloc_ncpus.h │ │ ├── parquet │ │ │ └── include │ │ │ │ ├── parquet_float16.hpp │ │ │ │ └── parquet_extension.hpp │ │ ├── core_functions │ │ │ ├── include │ │ │ │ ├── core_functions │ │ │ │ │ └── function_list.hpp │ │ │ │ └── core_functions_extension.hpp │ │ │ ├── aggregate │ │ │ │ └── algebraic │ │ │ │ │ └── corr.cpp │ │ │ └── scalar │ │ │ │ └── generic │ │ │ │ └── hash.cpp │ │ └── json │ │ │ └── include │ │ │ └── json_extension.hpp │ ├── ub_src_common_crypto.cpp │ ├── ub_src_main_http.cpp │ ├── ub_src_function_cast_union.cpp │ ├── ub_src_function_scalar_date.cpp │ ├── ub_src_function_scalar_map.cpp │ ├── ub_src_function_scalar_sequence.cpp │ ├── ub_src_optimizer_matcher.cpp │ ├── ub_src_function_aggregate.cpp │ ├── ub_src_function_table_version.cpp │ ├── ub_src_execution_operator_filter.cpp │ ├── ub_extension_core_functions_scalar_bit.cpp │ ├── ub_extension_core_functions_scalar_math.cpp │ ├── ub_src_common_value_operations.cpp │ ├── ub_src_parser_transform_constraint.cpp │ ├── ub_extension_core_functions_scalar_debug.cpp │ ├── ub_extension_core_functions_scalar_enum.cpp │ ├── ub_extension_core_functions_scalar_operators.cpp │ ├── ub_src_common_adbc.cpp │ ├── ub_src_execution_operator_csv_scanner_encode.cpp │ ├── ub_src_main_capi_cast.cpp │ ├── ub_src_function_pragma.cpp │ ├── ub_src_main_settings.cpp │ ├── ub_src_execution_sample.cpp │ ├── ub_src_storage_compression_alp.cpp │ ├── ub_src_execution_operator_order.cpp │ ├── ub_src_main_chunk_scan_state.cpp │ ├── ub_extension_core_functions_scalar_blob.cpp │ ├── ub_extension_core_functions_scalar_random.cpp │ ├── ub_src_function_scalar_string_regexp.cpp │ ├── ub_src_execution_nested_loop_join.cpp │ ├── ub_extension_core_functions_scalar_array.cpp │ ├── ub_extension_core_functions_scalar_struct.cpp │ ├── ub_src_common_operator.cpp │ ├── ub_src_storage_metadata.cpp │ ├── src │ │ ├── function │ │ │ ├── aggregate_function.cpp │ │ │ ├── scalar │ │ │ │ └── pragma_functions.cpp │ │ │ └── cast │ │ │ │ └── pointer_cast.cpp │ │ ├── include │ │ │ ├── duckdb │ │ │ │ ├── function │ │ │ │ │ ├── cast │ │ │ │ │ │ └── nested_to_varchar_cast.hpp │ │ │ │ │ ├── table │ │ │ │ │ │ ├── arrow │ │ │ │ │ │ │ └── enum │ │ │ │ │ │ │ │ ├── arrow_type_info_type.hpp │ │ │ │ │ │ │ │ ├── arrow_variable_size_type.hpp │ │ │ │ │ │ │ │ └── arrow_datetime_type.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ └── summary.hpp │ │ │ │ │ └── cast_rules.hpp │ │ │ │ ├── original │ │ │ │ │ └── std │ │ │ │ │ │ ├── locale.hpp │ │ │ │ │ │ ├── sstream.hpp │ │ │ │ │ │ └── memory.hpp │ │ │ │ ├── parser │ │ │ │ │ ├── query_node │ │ │ │ │ │ └── list.hpp │ │ │ │ │ ├── constraints │ │ │ │ │ │ └── list.hpp │ │ │ │ │ ├── tableref │ │ │ │ │ │ └── list.hpp │ │ │ │ │ └── parser_options.hpp │ │ │ │ ├── planner │ │ │ │ │ ├── query_node │ │ │ │ │ │ └── list.hpp │ │ │ │ │ ├── constraints │ │ │ │ │ │ └── list.hpp │ │ │ │ │ ├── filter │ │ │ │ │ │ └── list.hpp │ │ │ │ │ ├── bound_statement.hpp │ │ │ │ │ └── tableref │ │ │ │ │ │ └── list.hpp │ │ │ │ ├── common │ │ │ │ │ ├── windows.hpp │ │ │ │ │ ├── memory_safety.hpp │ │ │ │ │ ├── algorithm.hpp │ │ │ │ │ ├── to_string.hpp │ │ │ │ │ ├── exception │ │ │ │ │ │ └── list.hpp │ │ │ │ │ ├── list.hpp │ │ │ │ │ ├── array.hpp │ │ │ │ │ ├── deque.hpp │ │ │ │ │ ├── stack.hpp │ │ │ │ │ ├── swap.hpp │ │ │ │ │ ├── bitset.hpp │ │ │ │ │ ├── thread.hpp │ │ │ │ │ ├── queue.hpp │ │ │ │ │ ├── unordered_map.hpp │ │ │ │ │ ├── unordered_set.hpp │ │ │ │ │ ├── map.hpp │ │ │ │ │ ├── set.hpp │ │ │ │ │ ├── common.hpp │ │ │ │ │ ├── pair.hpp │ │ │ │ │ ├── enums │ │ │ │ │ │ ├── set_type.hpp │ │ │ │ │ │ ├── collation_type.hpp │ │ │ │ │ │ ├── copy_option_mode.hpp │ │ │ │ │ │ ├── thread_pin_mode.hpp │ │ │ │ │ │ ├── explain_format.hpp │ │ │ │ │ │ ├── output_type.hpp │ │ │ │ │ │ ├── access_mode.hpp │ │ │ │ │ │ ├── on_entry_not_found.hpp │ │ │ │ │ │ ├── ordinality_request_type.hpp │ │ │ │ │ │ ├── preserve_order.hpp │ │ │ │ │ │ ├── profiler_format.hpp │ │ │ │ │ │ ├── debug_initialize.hpp │ │ │ │ │ │ ├── prepared_statement_mode.hpp │ │ │ │ │ │ ├── set_operation_type.hpp │ │ │ │ │ │ ├── storage_block_prefetch.hpp │ │ │ │ │ │ ├── set_scope.hpp │ │ │ │ │ │ ├── function_errors.hpp │ │ │ │ │ │ ├── quantile_enum.hpp │ │ │ │ │ │ ├── scan_vector_type.hpp │ │ │ │ │ │ ├── checkpoint_abort.hpp │ │ │ │ │ │ ├── pending_execution_result.hpp │ │ │ │ │ │ ├── copy_overwrite_mode.hpp │ │ │ │ │ │ ├── cte_materialize.hpp │ │ │ │ │ │ ├── filter_propagate_result.hpp │ │ │ │ │ │ ├── stream_execution_result.hpp │ │ │ │ │ │ ├── debug_vector_verification.hpp │ │ │ │ │ │ ├── undo_flags.hpp │ │ │ │ │ │ ├── merge_action_type.hpp │ │ │ │ │ │ └── tuple_data_layout_enums.hpp │ │ │ │ │ ├── mutex.hpp │ │ │ │ │ ├── arrow │ │ │ │ │ │ └── nanoarrow │ │ │ │ │ │ │ └── nanoarrow.hpp │ │ │ │ │ ├── checksum.hpp │ │ │ │ │ ├── fstream.hpp │ │ │ │ │ ├── sorting │ │ │ │ │ │ └── sort_projection_column.hpp │ │ │ │ │ ├── adbc │ │ │ │ │ │ └── wrappers.hpp │ │ │ │ │ ├── named_parameter_map.hpp │ │ │ │ │ ├── types │ │ │ │ │ │ └── sel_cache.hpp │ │ │ │ │ ├── likely.hpp │ │ │ │ │ ├── progress_bar │ │ │ │ │ │ └── progress_bar_display.hpp │ │ │ │ │ ├── cgroups.hpp │ │ │ │ │ ├── enum_class_hash.hpp │ │ │ │ │ └── chrono.hpp │ │ │ │ ├── main │ │ │ │ │ └── extension_util.hpp │ │ │ │ ├── storage │ │ │ │ │ ├── compression │ │ │ │ │ │ ├── patas │ │ │ │ │ │ │ └── shared.hpp │ │ │ │ │ │ ├── bitpacking.hpp │ │ │ │ │ │ └── chimp │ │ │ │ │ │ │ └── algorithm │ │ │ │ │ │ │ └── bit_utils.hpp │ │ │ │ │ └── table │ │ │ │ │ │ ├── update_state.hpp │ │ │ │ │ │ ├── column_segment_tree.hpp │ │ │ │ │ │ └── delete_state.hpp │ │ │ │ ├── catalog │ │ │ │ │ └── catalog_entry │ │ │ │ │ │ └── table_column_type.hpp │ │ │ │ ├── transaction │ │ │ │ │ └── append_info.hpp │ │ │ │ ├── optimizer │ │ │ │ │ └── regex_range_filter.hpp │ │ │ │ └── parallel │ │ │ │ │ ├── pipeline_finish_event.hpp │ │ │ │ │ ├── pipeline_initialize_event.hpp │ │ │ │ │ └── pipeline_event.hpp │ │ │ └── duckdb.hpp │ │ ├── planner │ │ │ ├── operator │ │ │ │ ├── logical_set.cpp │ │ │ │ ├── logical_reset.cpp │ │ │ │ ├── logical_pragma.cpp │ │ │ │ ├── logical_prepare.cpp │ │ │ │ ├── logical_any_join.cpp │ │ │ │ ├── logical_delim_get.cpp │ │ │ │ ├── logical_dummy_scan.cpp │ │ │ │ ├── logical_expression_get.cpp │ │ │ │ ├── logical_materialized_cte.cpp │ │ │ │ ├── logical_simple.cpp │ │ │ │ └── logical_top_n.cpp │ │ │ └── binder │ │ │ │ ├── tableref │ │ │ │ ├── plan_basetableref.cpp │ │ │ │ ├── bind_emptytableref.cpp │ │ │ │ ├── plan_dummytableref.cpp │ │ │ │ ├── plan_cteref.cpp │ │ │ │ ├── bind_bound_table_ref.cpp │ │ │ │ ├── plan_delimgetref.cpp │ │ │ │ ├── plan_pivotref.cpp │ │ │ │ ├── bind_delimgetref.cpp │ │ │ │ ├── plan_subqueryref.cpp │ │ │ │ └── plan_column_data_ref.cpp │ │ │ │ ├── expression │ │ │ │ └── bind_constant_expression.cpp │ │ │ │ └── statement │ │ │ │ ├── bind_select.cpp │ │ │ │ └── bind_relation.cpp │ │ ├── storage │ │ │ ├── compression │ │ │ │ ├── chimp │ │ │ │ │ ├── bit_reader.cpp │ │ │ │ │ ├── flag_buffer.cpp │ │ │ │ │ ├── leading_zero_buffer.cpp │ │ │ │ │ └── chimp_constants.cpp │ │ │ │ ├── alp │ │ │ │ │ └── alp_constants.cpp │ │ │ │ └── empty_validity.cpp │ │ │ ├── table │ │ │ │ └── persistent_table_data.cpp │ │ │ ├── statistics │ │ │ │ └── segment_statistics.cpp │ │ │ └── index.cpp │ │ ├── transaction │ │ │ ├── transaction_manager.cpp │ │ │ └── transaction.cpp │ │ ├── common │ │ │ ├── tree_renderer │ │ │ │ └── tree_renderer.cpp │ │ │ ├── assert.cpp │ │ │ ├── types │ │ │ │ ├── conflict_info.cpp │ │ │ │ └── vector_constants.cpp │ │ │ └── arrow │ │ │ │ └── appender │ │ │ │ └── null_data.cpp │ │ ├── execution │ │ │ ├── operator │ │ │ │ ├── scan │ │ │ │ │ ├── physical_empty_result.cpp │ │ │ │ │ └── physical_dummy_scan.cpp │ │ │ │ └── helper │ │ │ │ │ ├── physical_pragma.cpp │ │ │ │ │ ├── physical_prepare.cpp │ │ │ │ │ └── physical_execute.cpp │ │ │ └── physical_plan │ │ │ │ ├── plan_reset.cpp │ │ │ │ ├── plan_pragma.cpp │ │ │ │ ├── plan_create_secret.cpp │ │ │ │ ├── plan_dummy_scan.cpp │ │ │ │ ├── plan_copy_database.cpp │ │ │ │ ├── plan_empty_result.cpp │ │ │ │ ├── plan_pivot.cpp │ │ │ │ ├── plan_cross_product.cpp │ │ │ │ ├── plan_unnest.cpp │ │ │ │ ├── plan_delim_get.cpp │ │ │ │ ├── plan_column_data_get.cpp │ │ │ │ └── plan_top_n.cpp │ │ ├── parser │ │ │ ├── constraint.cpp │ │ │ ├── tableref │ │ │ │ └── emptytableref.cpp │ │ │ ├── transform │ │ │ │ ├── statement │ │ │ │ │ ├── transform_call.cpp │ │ │ │ │ ├── transform_import.cpp │ │ │ │ │ ├── transform_detach.cpp │ │ │ │ │ └── transform_export.cpp │ │ │ │ └── expression │ │ │ │ │ ├── transform_positional_reference.cpp │ │ │ │ │ └── transform_grouping_function.cpp │ │ │ ├── constraints │ │ │ │ ├── not_null_constraint.cpp │ │ │ │ └── check_constraint.cpp │ │ │ ├── statement │ │ │ │ ├── load_statement.cpp │ │ │ │ ├── alter_statement.cpp │ │ │ │ ├── attach_statement.cpp │ │ │ │ ├── create_statement.cpp │ │ │ │ ├── detach_statement.cpp │ │ │ │ ├── copy_statement.cpp │ │ │ │ ├── drop_statement.cpp │ │ │ │ ├── pragma_statement.cpp │ │ │ │ ├── extension_statement.cpp │ │ │ │ ├── vacuum_statement.cpp │ │ │ │ ├── call_statement.cpp │ │ │ │ └── transaction_statement.cpp │ │ │ ├── parsed_data │ │ │ │ ├── create_copy_function_info.cpp │ │ │ │ └── extra_drop_info.cpp │ │ │ └── expression │ │ │ │ └── default_expression.cpp │ │ ├── parallel │ │ │ ├── base_pipeline_event.cpp │ │ │ ├── pipeline_complete_event.cpp │ │ │ └── task_notifier.cpp │ │ ├── catalog │ │ │ ├── catalog_entry │ │ │ │ ├── copy_function_catalog_entry.cpp │ │ │ │ └── pragma_function_catalog_entry.cpp │ │ │ └── similar_catalog_entry.cpp │ │ ├── optimizer │ │ │ ├── statistics │ │ │ │ └── expression │ │ │ │ │ └── propagate_columnref.cpp │ │ │ ├── join_order │ │ │ │ └── join_node.cpp │ │ │ └── pushdown │ │ │ │ └── pushdown_distinct.cpp │ │ └── verification │ │ │ └── fetch_row_verifier.cpp │ ├── ub_src_function_cast_variant.cpp │ ├── ub_src_function_scalar_generic.cpp │ ├── ub_src_main_buffered_data.cpp │ ├── ub_src_function_scalar_compressed_materialization.cpp │ ├── ub_src_execution_operator_set.cpp │ ├── ub_src_function_scalar_variant.cpp │ ├── ub_src_function_table_arrow.cpp │ ├── ub_src_main_secret.cpp │ ├── ub_src_common_progress_bar.cpp │ ├── ub_src_common_sorting.cpp │ ├── ub_src_execution_operator_csv_scanner_state_machine.cpp │ ├── ub_src_function_aggregate_distributive.cpp │ ├── ub_src_storage_compression_dict_fsst.cpp │ ├── ub_src_logging.cpp │ ├── ub_extension_core_functions_scalar_union.cpp │ ├── ub_src_parser_query_node.cpp │ ├── ub_extension_parquet_reader_variant.cpp │ ├── ub_extension_core_functions_aggregate_nested.cpp │ ├── ub_src_common_exception.cpp │ ├── ub_src_execution_operator_csv_scanner_util.cpp │ ├── ub_src_function_scalar_operator.cpp │ ├── ub_src_common_adbc_nanoarrow.cpp │ ├── ub_src_catalog_catalog_entry_dependency.cpp │ ├── ub_src_parser_constraints.cpp │ ├── ub_src_storage_checkpoint.cpp │ ├── ub_src_planner_subquery.cpp │ ├── ub_src_storage_compression_dictionary.cpp │ ├── ub_src_execution_operator_csv_scanner_buffer_manager.cpp │ ├── ub_src_execution_operator_csv_scanner_table_function.cpp │ ├── ub_src_storage_buffer.cpp │ ├── ub_src_execution_index.cpp │ ├── ub_extension_core_functions_aggregate_algebraic.cpp │ ├── ub_src_common_sort.cpp │ ├── ub_src_execution_operator_projection.cpp │ ├── ub_src_optimizer_pullup.cpp │ ├── ub_src_function_scalar.cpp │ ├── ub_src_function_scalar_list.cpp │ ├── ub_src_storage_compression_roaring.cpp │ ├── ub_src_function_scalar_struct.cpp │ ├── ub_src_storage_compression_chimp.cpp │ ├── ub_src_optimizer_compressed_materialization.cpp │ ├── ub_src_common_types_column.cpp │ ├── ub_src_catalog_default.cpp │ ├── ub_src_common_arrow_appender.cpp │ ├── ub_src_common_serializer.cpp │ ├── ub_src_common_multi_file.cpp │ ├── ub_src_common_tree_renderer.cpp │ ├── ub_src_function_scalar_system.cpp │ ├── ub_extension_parquet_decoder.cpp │ ├── ub_src_execution_operator_scan.cpp │ ├── ub_src_planner_filter.cpp │ ├── ub_extension_parquet_writer.cpp │ ├── ub_extension_core_functions_aggregate_holistic.cpp │ ├── ub_src_parser_transform_helpers.cpp │ ├── ub_extension_parquet_reader.cpp │ ├── ub_extension_core_functions_scalar_map.cpp │ ├── ub_src_common_row_operations.cpp │ ├── ub_src_execution_operator_csv_scanner_scanner.cpp │ ├── ub_src_parser_transform_tableref.cpp │ ├── ub_src_storage_statistics.cpp │ ├── ub_extension_core_functions_aggregate_regression.cpp │ ├── ub_src_common_arrow.cpp │ ├── ub_src_execution_operator_csv_scanner_sniffer.cpp │ ├── ub_src_catalog.cpp │ ├── ub_src_execution.cpp │ ├── ub_src_optimizer_join_order.cpp │ ├── ub_src_parser_tableref.cpp │ ├── ub_src_transaction.cpp │ └── ub_extension_core_functions_scalar_date.cpp ├── test │ ├── java │ │ └── org │ │ │ └── duckdb │ │ │ └── test │ │ │ ├── Thrower.java │ │ │ └── Helpers.java │ ├── external │ │ ├── spark-session-init.sql │ │ └── spark-test.sql │ └── test.iml ├── jni │ ├── config.hpp │ ├── bindings.hpp │ ├── types.hpp │ ├── bindings_common.cpp │ └── functions.hpp.template └── main │ └── java │ └── org │ └── duckdb │ ├── ProfilerPrintFormat.java │ ├── package-info.java │ ├── StatementReturnType.java │ ├── DuckDBTimestampTZ.java │ ├── DuckDBDate.java │ ├── user │ └── DuckDBMap.java │ └── DuckDBColumnType.java ├── .gitignore ├── META-INF ├── services │ └── java.sql.Driver └── MANIFEST.MF ├── data └── parquet-testing │ └── userdata1.parquet ├── header2whatever.yaml ├── duckdb_extension_config.cmake └── .github └── composite-actions └── linux-tests-host └── action.yml /src/duckdb/third_party/thrift/thrift/stdcxx.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .idea 3 | cmake-build-debug 4 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_bld.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_cnv.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_ext.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_imp.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnvhz.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnvmbcs.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/entropy.h: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/library/aes_alt.h: -------------------------------------------------------------------------------- 1 | // dummy -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/library/ecp_alt.h: -------------------------------------------------------------------------------- 1 | // dummy -------------------------------------------------------------------------------- /META-INF/services/java.sql.Driver: -------------------------------------------------------------------------------- 1 | org.duckdb.DuckDBDriver 2 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_ct.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_err.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_ext.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_lmb.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnv_u7.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnvbocu.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ucnvisci.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/unicode/ucnv.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/aria.h: -------------------------------------------------------------------------------- 1 | // dummy -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/sha512.h: -------------------------------------------------------------------------------- 1 | // dummy -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/library/ccm_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/library/gcm_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/camellia.h: -------------------------------------------------------------------------------- 1 | // dummy -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/library/cipher_invasive.h: -------------------------------------------------------------------------------- 1 | // dummy file -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/psa/crypto_se_driver.h: -------------------------------------------------------------------------------- 1 | // dummy file 2 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_crypto.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/crypto/md5.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_main_http.cpp: -------------------------------------------------------------------------------- 1 | #include "src/main/http/http_util.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/des_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/rsa_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/library/md_psa.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/cmac.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/md5.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/sha3.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/platform_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/psa/crypto.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/sha1_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/sha256_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/sha512_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/ssl_misc.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/aes_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/aria_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/ccm_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/chacha20.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/ecdsa.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/gcm_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/nist_kw.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/pkcs12.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/pkcs5.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/psa_util.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/ripemd160.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/threading.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/timing.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/psa/crypto_config.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_cast_union.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/cast/union/from_struct.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_date.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/date/strftime.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_map.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/map/map_contains.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/block_cipher.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/camellia_alt.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/chachapoly.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/config_psa.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_sequence.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/sequence/nextval.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_optimizer_matcher.cpp: -------------------------------------------------------------------------------- 1 | #include "src/optimizer/matcher/expression_matcher.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/config_adjust_ssl.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/config_adjust_x509.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_aggregate.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/aggregate/sorted_aggregate_function.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_table_version.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/table/version/pragma_version.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_filter.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/filter/physical_filter.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h: -------------------------------------------------------------------------------- 1 | // dummy file to make amalgamation happy 2 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_bit.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/bit/bitstring.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_math.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/math/numeric.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_value_operations.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/value_operations/comparison_operations.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_parser_transform_constraint.cpp: -------------------------------------------------------------------------------- 1 | #include "src/parser/transform/constraint/transform_constraint.cpp" 2 | 3 | -------------------------------------------------------------------------------- /data/parquet-testing/userdata1.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duckdb/duckdb-java/HEAD/data/parquet-testing/userdata1.parquet -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_debug.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/debug/vector_type.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_enum.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/enum/enum_functions.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_operators.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/operators/bitwise.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_adbc.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/adbc/adbc.cpp" 2 | 3 | #include "src/common/adbc/driver_manager.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_encode.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/encode/csv_encoder.cpp" 2 | 3 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_main_capi_cast.cpp: -------------------------------------------------------------------------------- 1 | #include "src/main/capi/cast/from_decimal-c.cpp" 2 | 3 | #include "src/main/capi/cast/utils-c.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/test/java/org/duckdb/test/Thrower.java: -------------------------------------------------------------------------------- 1 | package org.duckdb.test; 2 | 3 | public interface Thrower { 4 | void run() throws Exception; 5 | } 6 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_pragma.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/pragma/pragma_functions.cpp" 2 | 3 | #include "src/function/pragma/pragma_queries.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_main_settings.cpp: -------------------------------------------------------------------------------- 1 | #include "src/main/settings/custom_settings.cpp" 2 | 3 | #include "src/main/settings/autogenerated_settings.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_sample.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/sample/base_reservoir_sample.cpp" 2 | 3 | #include "src/execution/sample/reservoir_sample.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_compression_alp.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/compression/alp/alp_constants.cpp" 2 | 3 | #include "src/storage/compression/alp/alp.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_order.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/order/physical_order.cpp" 2 | 3 | #include "src/execution/operator/order/physical_top_n.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_main_chunk_scan_state.cpp: -------------------------------------------------------------------------------- 1 | #include "src/main/chunk_scan_state/query_result.cpp" 2 | 3 | #include "src/main/chunk_scan_state/batched_data_collection.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_blob.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/blob/base64.cpp" 2 | 3 | #include "extension/core_functions/scalar/blob/encode.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_random.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/random/random.cpp" 2 | 3 | #include "extension/core_functions/scalar/random/setseed.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_string_regexp.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/string/regexp/regexp_util.cpp" 2 | 3 | #include "src/function/scalar/string/regexp/regexp_extract_all.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_nested_loop_join.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/nested_loop_join/nested_loop_join_inner.cpp" 2 | 3 | #include "src/execution/nested_loop_join/nested_loop_join_mark.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/third_party/parquet/windows_compatibility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #undef CREATE_NEW 5 | #undef OPTIONAL 6 | #undef Realloc 7 | #undef min 8 | #undef max 9 | #endif 10 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_array.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/array/array_functions.cpp" 2 | 3 | #include "extension/core_functions/scalar/array/array_value.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_struct.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/struct/struct_insert.cpp" 2 | 3 | #include "extension/core_functions/scalar/struct/struct_update.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_operator.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/operator/cast_operators.cpp" 2 | 3 | #include "src/common/operator/convert_to_string.cpp" 4 | 5 | #include "src/common/operator/string_cast.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_metadata.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/metadata/metadata_manager.cpp" 2 | 3 | #include "src/storage/metadata/metadata_reader.cpp" 4 | 5 | #include "src/storage/metadata/metadata_writer.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/src/function/aggregate_function.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/function/aggregate_function.hpp" 2 | 3 | namespace duckdb { 4 | 5 | AggregateFunctionInfo::~AggregateFunctionInfo() { 6 | } 7 | 8 | } // namespace duckdb 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_cast_variant.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/cast/variant/from_variant.cpp" 2 | 3 | #include "src/function/cast/variant/to_variant.cpp" 4 | 5 | #include "src/function/cast/variant/to_json.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/include/msvc_compat/windows_extra.h: -------------------------------------------------------------------------------- 1 | #ifndef MSVC_COMPAT_WINDOWS_EXTRA_H 2 | #define MSVC_COMPAT_WINDOWS_EXTRA_H 3 | 4 | #include 5 | 6 | #endif /* MSVC_COMPAT_WINDOWS_EXTRA_H */ 7 | -------------------------------------------------------------------------------- /src/jni/config.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "duckdb.hpp" 4 | 5 | #include 6 | #include 7 | 8 | std::unique_ptr create_db_config(JNIEnv *env, jboolean read_only, jobject java_config); 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_generic.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/generic/constant_or_null.cpp" 2 | 3 | #include "src/function/scalar/generic/error.cpp" 4 | 5 | #include "src/function/scalar/generic/getvariable.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_main_buffered_data.cpp: -------------------------------------------------------------------------------- 1 | #include "src/main/buffered_data/buffered_data.cpp" 2 | 3 | #include "src/main/buffered_data/simple_buffered_data.cpp" 4 | 5 | #include "src/main/buffered_data/batched_buffered_data.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_compressed_materialization.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/compressed_materialization/compress_integral.cpp" 2 | 3 | #include "src/function/scalar/compressed_materialization/compress_string.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_set.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/set/physical_union.cpp" 2 | 3 | #include "src/execution/operator/set/physical_recursive_cte.cpp" 4 | 5 | #include "src/execution/operator/set/physical_cte.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_variant.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/variant/variant_utils.cpp" 2 | 3 | #include "src/function/scalar/variant/variant_extract.cpp" 4 | 5 | #include "src/function/scalar/variant/variant_typeof.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_table_arrow.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/table/arrow/arrow_duck_schema.cpp" 2 | 3 | #include "src/function/table/arrow/arrow_array_scan_state.cpp" 4 | 5 | #include "src/function/table/arrow/arrow_type_info.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_main_secret.cpp: -------------------------------------------------------------------------------- 1 | #include "src/main/secret/secret.cpp" 2 | 3 | #include "src/main/secret/secret_manager.cpp" 4 | 5 | #include "src/main/secret/secret_storage.cpp" 6 | 7 | #include "src/main/secret/default_secrets.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_progress_bar.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/progress_bar/progress_bar.cpp" 2 | 3 | #include "src/common/progress_bar/terminal_progress_bar_display.cpp" 4 | 5 | #include "src/common/progress_bar/unscented_kalman_filter.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/ProfilerPrintFormat.java: -------------------------------------------------------------------------------- 1 | package org.duckdb; 2 | 3 | public enum ProfilerPrintFormat { 4 | 5 | QUERY_TREE, 6 | JSON, 7 | QUERY_TREE_OPTIMIZER, 8 | NO_OUTPUT, 9 | HTML, 10 | GRAPHVIZ 11 | } 12 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/cast/nested_to_varchar_cast.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace duckdb { 4 | 5 | struct NestedToVarcharCast { 6 | public: 7 | static const bool LOOKUP_TABLE[256]; 8 | }; 9 | 10 | } // namespace duckdb 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_sorting.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/sorting/hashed_sort.cpp" 2 | 3 | #include "src/common/sorting/sort.cpp" 4 | 5 | #include "src/common/sorting/sorted_run.cpp" 6 | 7 | #include "src/common/sorting/sorted_run_merger.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_state_machine.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/state_machine/csv_state_machine.cpp" 2 | 3 | #include "src/execution/operator/csv_scanner/state_machine/csv_state_machine_cache.cpp" 4 | 5 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/original/std/locale.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #define DUCKDB_BASE_STD 7 | 8 | namespace duckdb_base_std { 9 | using ::std::isspace; 10 | } // namespace duckdb_base_std 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_aggregate_distributive.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/aggregate/distributive/count.cpp" 2 | 3 | #include "src/function/aggregate/distributive/first_last_any.cpp" 4 | 5 | #include "src/function/aggregate/distributive/minmax.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_compression_dict_fsst.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/compression/dict_fsst/analyze.cpp" 2 | 3 | #include "src/storage/compression/dict_fsst/compression.cpp" 4 | 5 | #include "src/storage/compression/dict_fsst/decompression.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_set.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_set.hpp" 2 | 3 | namespace duckdb { 4 | 5 | idx_t LogicalSet::EstimateCardinality(ClientContext &context) { 6 | return 1; 7 | } 8 | 9 | } // namespace duckdb 10 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_reset.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_reset.hpp" 2 | 3 | namespace duckdb { 4 | 5 | idx_t LogicalReset::EstimateCardinality(ClientContext &context) { 6 | return 1; 7 | } 8 | 9 | } // namespace duckdb 10 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_logging.cpp: -------------------------------------------------------------------------------- 1 | #include "src/logging/log_manager.cpp" 2 | 3 | #include "src/logging/log_storage.cpp" 4 | 5 | #include "src/logging/log_types.cpp" 6 | 7 | #include "src/logging/logger.cpp" 8 | 9 | #include "src/logging/logging.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_pragma.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_pragma.hpp" 2 | 3 | namespace duckdb { 4 | 5 | idx_t LogicalPragma::EstimateCardinality(ClientContext &context) { 6 | return 1; 7 | } 8 | 9 | } // namespace duckdb 10 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_prepare.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_prepare.hpp" 2 | 3 | namespace duckdb { 4 | 5 | idx_t LogicalPrepare::EstimateCardinality(ClientContext &context) { 6 | return 1; 7 | } 8 | 9 | } // namespace duckdb 10 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_union.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/union/union_extract.cpp" 2 | 3 | #include "extension/core_functions/scalar/union/union_value.cpp" 4 | 5 | #include "extension/core_functions/scalar/union/union_tag.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_parser_query_node.cpp: -------------------------------------------------------------------------------- 1 | #include "src/parser/query_node/recursive_cte_node.cpp" 2 | 3 | #include "src/parser/query_node/cte_node.cpp" 4 | 5 | #include "src/parser/query_node/select_node.cpp" 6 | 7 | #include "src/parser/query_node/set_operation_node.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/compression/chimp/bit_reader.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/compression/chimp/algorithm/bit_reader.hpp" 2 | 3 | namespace duckdb { 4 | 5 | constexpr uint8_t BitReader::REMAINDER_MASKS[]; 6 | constexpr uint8_t BitReader::MASKS[]; 7 | 8 | } // namespace duckdb 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_parquet_reader_variant.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/parquet/reader/variant/variant_binary_decoder.cpp" 2 | 3 | #include "extension/parquet/reader/variant/variant_value.cpp" 4 | 5 | #include "extension/parquet/reader/variant/variant_shredded_conversion.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parser/query_node/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/query_node/recursive_cte_node.hpp" 2 | #include "duckdb/parser/query_node/cte_node.hpp" 3 | #include "duckdb/parser/query_node/select_node.hpp" 4 | #include "duckdb/parser/query_node/set_operation_node.hpp" 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_aggregate_nested.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/aggregate/nested/binned_histogram.cpp" 2 | 3 | #include "extension/core_functions/aggregate/nested/list.cpp" 4 | 5 | #include "extension/core_functions/aggregate/nested/histogram.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_exception.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/exception/binder_exception.cpp" 2 | 3 | #include "src/common/exception/catalog_exception.cpp" 4 | 5 | #include "src/common/exception/conversion_exception.cpp" 6 | 7 | #include "src/common/exception/parser_exception.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_util.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/util/csv_error.cpp" 2 | 3 | #include "src/execution/operator/csv_scanner/util/csv_reader_options.cpp" 4 | 5 | #include "src/execution/operator/csv_scanner/util/csv_validator.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_operator.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/operator/add.cpp" 2 | 3 | #include "src/function/scalar/operator/arithmetic.cpp" 4 | 5 | #include "src/function/scalar/operator/multiply.cpp" 6 | 7 | #include "src/function/scalar/operator/subtract.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The DuckDB JDBC driver. Connect like so: 3 | * 4 | *
 5 |  * Class.forName("org.duckdb.DuckDBDriver");
 6 |  * Connection conn = DriverManager.getConnection("jdbc:duckdb:");
 7 |  * 
8 | */ 9 | package org.duckdb; 10 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/table/arrow/enum/arrow_type_info_type.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace duckdb { 6 | 7 | enum class ArrowTypeInfoType : uint8_t { LIST, STRUCT, DATE_TIME, STRING, ARRAY, DECIMAL }; 8 | 9 | } // namespace duckdb 10 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_adbc_nanoarrow.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/adbc/nanoarrow/metadata.cpp" 2 | 3 | #include "src/common/adbc/nanoarrow/schema.cpp" 4 | 5 | #include "src/common/adbc/nanoarrow/allocator.cpp" 6 | 7 | #include "src/common/adbc/nanoarrow/single_batch_array_stream.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/compression/chimp/flag_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/compression/chimp/algorithm/flag_buffer.hpp" 2 | 3 | namespace duckdb { 4 | 5 | constexpr uint8_t FlagBufferConstants::MASKS[]; 6 | constexpr uint8_t FlagBufferConstants::SHIFTS[]; 7 | 8 | } // namespace duckdb 9 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/src/edata.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | #include "jemalloc/internal/jemalloc_internal_includes.h" 3 | 4 | ph_gen(, edata_avail, edata_t, avail_link, 5 | edata_esnead_comp) 6 | ph_gen(, edata_heap, edata_t, heap_link, edata_snad_comp) 7 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/table/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/function/table/read_csv.hpp" 2 | #include "duckdb/function/table/system_functions.hpp" 3 | #include "duckdb/function/table/range.hpp" 4 | #include "duckdb/function/table/summary.hpp" 5 | #include "duckdb/function/table/files.hpp" 6 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_catalog_catalog_entry_dependency.cpp: -------------------------------------------------------------------------------- 1 | #include "src/catalog/catalog_entry/dependency/dependency_entry.cpp" 2 | 3 | #include "src/catalog/catalog_entry/dependency/dependency_subject_entry.cpp" 4 | 5 | #include "src/catalog/catalog_entry/dependency/dependency_dependent_entry.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_parser_constraints.cpp: -------------------------------------------------------------------------------- 1 | #include "src/parser/constraints/check_constraint.cpp" 2 | 3 | #include "src/parser/constraints/not_null_constraint.cpp" 4 | 5 | #include "src/parser/constraints/unique_constraint.cpp" 6 | 7 | #include "src/parser/constraints/foreign_key_constraint.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/test/external/spark-session-init.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE TEMPORARY SECRET secret ( 2 | TYPE s3, 3 | ENDPOINT '$ENV{MINIO_HOST}:$ENV{MINIO_PORT}', 4 | PROVIDER config, 5 | KEY_ID 'minioadmin', 6 | SECRET 'minioadmin', 7 | URL_STYLE 'path', 8 | USE_SSL false 9 | ) 10 | -------------------------------------------------------------------------------- /src/duckdb/src/function/scalar/pragma_functions.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/function/pragma/pragma_functions.hpp" 2 | 3 | namespace duckdb { 4 | 5 | void BuiltinFunctions::RegisterPragmaFunctions() { 6 | Register(); 7 | Register(); 8 | } 9 | 10 | } // namespace duckdb 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_checkpoint.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/checkpoint/row_group_writer.cpp" 2 | 3 | #include "src/storage/checkpoint/table_data_writer.cpp" 4 | 5 | #include "src/storage/checkpoint/table_data_reader.cpp" 6 | 7 | #include "src/storage/checkpoint/write_overflow_strings_to_disk.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/original/std/sstream.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define DUCKDB_BASE_STD 6 | 7 | namespace duckdb_base_std { 8 | using ::std::basic_stringstream; 9 | using ::std::stringstream; 10 | using ::std::wstringstream; 11 | } // namespace duckdb_base_std 12 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parser/constraints/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/constraints/check_constraint.hpp" 2 | #include "duckdb/parser/constraints/not_null_constraint.hpp" 3 | #include "duckdb/parser/constraints/unique_constraint.hpp" 4 | #include "duckdb/parser/constraints/foreign_key_constraint.hpp" 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_planner_subquery.cpp: -------------------------------------------------------------------------------- 1 | #include "src/planner/subquery/flatten_dependent_join.cpp" 2 | 3 | #include "src/planner/subquery/has_correlated_expressions.cpp" 4 | 5 | #include "src/planner/subquery/rewrite_correlated_expressions.cpp" 6 | 7 | #include "src/planner/subquery/rewrite_cte_scan.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/planner/query_node/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/query_node/bound_recursive_cte_node.hpp" 2 | #include "duckdb/planner/query_node/bound_cte_node.hpp" 3 | #include "duckdb/planner/query_node/bound_select_node.hpp" 4 | #include "duckdb/planner/query_node/bound_set_operation_node.hpp" 5 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/src/exp_grow.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | #include "jemalloc/internal/jemalloc_internal_includes.h" 3 | 4 | void 5 | exp_grow_init(exp_grow_t *exp_grow) { 6 | exp_grow->next = sz_psz2ind(HUGEPAGE); 7 | exp_grow->limit = sz_psz2ind(SC_LARGE_MAXCLASS); 8 | } 9 | -------------------------------------------------------------------------------- /src/duckdb/src/transaction/transaction_manager.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/transaction/transaction_manager.hpp" 2 | 3 | namespace duckdb { 4 | 5 | TransactionManager::TransactionManager(AttachedDatabase &db) : db(db) { 6 | } 7 | 8 | TransactionManager::~TransactionManager() { 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /header2whatever.yaml: -------------------------------------------------------------------------------- 1 | - headers: 2 | - "build/release/CMakeFiles/duckdb_jdbc.dir/native_headers/org_duckdb_DuckDBNative.h" 3 | hooks: generator.py 4 | templates: 5 | - src: "src/jni/functions.hpp.template" 6 | dst: "functions.hpp" 7 | - src: "src/jni/functions.cpp.template" 8 | dst: "functions.cpp" 9 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/compression/chimp/leading_zero_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/compression/chimp/algorithm/leading_zero_buffer.hpp" 2 | 3 | namespace duckdb { 4 | 5 | constexpr uint32_t LeadingZeroBufferConstants::MASKS[]; 6 | constexpr uint8_t LeadingZeroBufferConstants::SHIFTS[]; 7 | 8 | } // namespace duckdb 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_compression_dictionary.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/compression/dictionary/common.cpp" 2 | 3 | #include "src/storage/compression/dictionary/analyze.cpp" 4 | 5 | #include "src/storage/compression/dictionary/compression.cpp" 6 | 7 | #include "src/storage/compression/dictionary/decompression.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/jni/bindings.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | extern "C" { 4 | #include "duckdb.h" 5 | } 6 | 7 | #include "org_duckdb_DuckDBBindings.h" 8 | 9 | duckdb_logical_type logical_type_buf_to_logical_type(JNIEnv *env, jobject logical_type_buf); 10 | 11 | duckdb_data_chunk chunk_buf_to_chunk(JNIEnv *env, jobject chunk_buf); 12 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/original/std/memory.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define DUCKDB_BASE_STD 6 | 7 | namespace duckdb_base_std { 8 | using ::std::make_shared; 9 | using ::std::shared_ptr; 10 | using ::std::unique_ptr; 11 | // using ::std::make_unique; 12 | } // namespace duckdb_base_std 13 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_buffer_manager.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/buffer_manager/csv_buffer.cpp" 2 | 3 | #include "src/execution/operator/csv_scanner/buffer_manager/csv_buffer_manager.cpp" 4 | 5 | #include "src/execution/operator/csv_scanner/buffer_manager/csv_file_handle.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_table_function.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/table_function/csv_file_scanner.cpp" 2 | 3 | #include "src/execution/operator/csv_scanner/table_function/global_csv_state.cpp" 4 | 5 | #include "src/execution/operator/csv_scanner/table_function/csv_multi_file_info.cpp" 6 | 7 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/buffer/buffer_handle.cpp" 2 | 3 | #include "src/storage/buffer/block_handle.cpp" 4 | 5 | #include "src/storage/buffer/block_manager.cpp" 6 | 7 | #include "src/storage/buffer/buffer_pool.cpp" 8 | 9 | #include "src/storage/buffer/buffer_pool_reservation.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/planner/constraints/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/constraints/bound_check_constraint.hpp" 2 | #include "duckdb/planner/constraints/bound_not_null_constraint.hpp" 3 | #include "duckdb/planner/constraints/bound_unique_constraint.hpp" 4 | #include "duckdb/planner/constraints/bound_foreign_key_constraint.hpp" 5 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_index.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/index/fixed_size_allocator.cpp" 2 | 3 | #include "src/execution/index/fixed_size_buffer.cpp" 4 | 5 | #include "src/execution/index/unbound_index.cpp" 6 | 7 | #include "src/execution/index/index_type_set.cpp" 8 | 9 | #include "src/execution/index/bound_index.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/src/common/tree_renderer/tree_renderer.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/tree_renderer.hpp" 2 | 3 | namespace duckdb { 4 | 5 | void TreeRenderer::ToStream(RenderTree &root, std::ostream &ss) { 6 | if (!UsesRawKeyNames()) { 7 | root.SanitizeKeyNames(); 8 | } 9 | return ToStreamInternal(root, ss); 10 | } 11 | 12 | } // namespace duckdb 13 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/windows.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(_WIN32) 4 | 5 | #ifndef NOMINMAX 6 | #define NOMINMAX 7 | #endif 8 | 9 | #ifndef _WINSOCKAPI_ 10 | #define _WINSOCKAPI_ 11 | #endif 12 | 13 | #include 14 | 15 | #undef CreateDirectory 16 | #undef MoveFile 17 | #undef RemoveDirectory 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_aggregate_algebraic.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/aggregate/algebraic/corr.cpp" 2 | 3 | #include "extension/core_functions/aggregate/algebraic/stddev.cpp" 4 | 5 | #include "extension/core_functions/aggregate/algebraic/avg.cpp" 6 | 7 | #include "extension/core_functions/aggregate/algebraic/covar.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_sort.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/sort/comparators.cpp" 2 | 3 | #include "src/common/sort/merge_sorter.cpp" 4 | 5 | #include "src/common/sort/partition_state.cpp" 6 | 7 | #include "src/common/sort/radix_sort.cpp" 8 | 9 | #include "src/common/sort/sort_state.cpp" 10 | 11 | #include "src/common/sort/sorted_block.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_projection.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/projection/physical_projection.cpp" 2 | 3 | #include "src/execution/operator/projection/physical_tableinout_function.cpp" 4 | 5 | #include "src/execution/operator/projection/physical_pivot.cpp" 6 | 7 | #include "src/execution/operator/projection/physical_unnest.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_optimizer_pullup.cpp: -------------------------------------------------------------------------------- 1 | #include "src/optimizer/pullup/pullup_filter.cpp" 2 | 3 | #include "src/optimizer/pullup/pullup_projection.cpp" 4 | 5 | #include "src/optimizer/pullup/pullup_from_left.cpp" 6 | 7 | #include "src/optimizer/pullup/pullup_both_side.cpp" 8 | 9 | #include "src/optimizer/pullup/pullup_set_operation.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/jni/types.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "duckdb.hpp" 4 | 5 | #include 6 | 7 | std::string type_to_jduckdb_type(duckdb::LogicalType logical_type); 8 | 9 | duckdb::Value create_value_from_bigdecimal(JNIEnv *env, jobject decimal); 10 | 11 | duckdb::Value to_duckdb_value(JNIEnv *env, jobject param, duckdb::ClientContext &context); 12 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/compressed_materialization_utils.cpp" 2 | 3 | #include "src/function/scalar/create_sort_key.cpp" 4 | 5 | #include "src/function/scalar/strftime_format.cpp" 6 | 7 | #include "src/function/scalar/nested_functions.cpp" 8 | 9 | #include "src/function/scalar/pragma_functions.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_list.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/list/contains_or_position.cpp" 2 | 3 | #include "src/function/scalar/list/list_extract.cpp" 4 | 5 | #include "src/function/scalar/list/list_resize.cpp" 6 | 7 | #include "src/function/scalar/list/list_zip.cpp" 8 | 9 | #include "src/function/scalar/list/list_select.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_compression_roaring.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/compression/roaring/common.cpp" 2 | 3 | #include "src/storage/compression/roaring/metadata.cpp" 4 | 5 | #include "src/storage/compression/roaring/analyze.cpp" 6 | 7 | #include "src/storage/compression/roaring/compress.cpp" 8 | 9 | #include "src/storage/compression/roaring/scan.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_struct.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/struct/remap_struct.cpp" 2 | 3 | #include "src/function/scalar/struct/struct_extract.cpp" 4 | 5 | #include "src/function/scalar/struct/struct_pack.cpp" 6 | 7 | #include "src/function/scalar/struct/struct_concat.cpp" 8 | 9 | #include "src/function/scalar/struct/struct_contains.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/memory_safety.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace duckdb { 4 | 5 | template 6 | struct MemorySafety { 7 | #ifdef DEBUG 8 | // In DEBUG mode safety is always on 9 | static constexpr bool ENABLED = true; 10 | #else 11 | static constexpr bool ENABLED = IS_ENABLED; 12 | #endif 13 | }; 14 | 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_compression_chimp.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/compression/chimp/bit_reader.cpp" 2 | 3 | #include "src/storage/compression/chimp/chimp_constants.cpp" 4 | 5 | #include "src/storage/compression/chimp/flag_buffer.cpp" 6 | 7 | #include "src/storage/compression/chimp/leading_zero_buffer.cpp" 8 | 9 | #include "src/storage/compression/chimp/chimp.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/StatementReturnType.java: -------------------------------------------------------------------------------- 1 | package org.duckdb; 2 | 3 | public enum StatementReturnType { 4 | QUERY_RESULT, // the statement returns a query result (e.g. for display to the user) 5 | CHANGED_ROWS, // the statement returns a single row containing the number of changed rows (e.g. an insert stmt) 6 | NOTHING // the statement returns nothing 7 | } 8 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_optimizer_compressed_materialization.cpp: -------------------------------------------------------------------------------- 1 | #include "src/optimizer/compressed_materialization/compress_aggregate.cpp" 2 | 3 | #include "src/optimizer/compressed_materialization/compress_comparison_join.cpp" 4 | 5 | #include "src/optimizer/compressed_materialization/compress_distinct.cpp" 6 | 7 | #include "src/optimizer/compressed_materialization/compress_order.cpp" 8 | 9 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/algorithm.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/algorithm.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /src/jni/bindings_common.cpp: -------------------------------------------------------------------------------- 1 | #include "bindings.hpp" 2 | 3 | /* 4 | * Class: org_duckdb_DuckDBBindings 5 | * Method: duckdb_vector_size 6 | * Signature: ()J 7 | */ 8 | JNIEXPORT jlong JNICALL Java_org_duckdb_DuckDBBindings_duckdb_1vector_1size(JNIEnv *, jclass) { 9 | 10 | idx_t vector_size = duckdb_vector_size(); 11 | 12 | return static_cast(vector_size); 13 | } 14 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/main/extension_util.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace duckdb { 4 | 5 | #ifndef DUCKDB_CLANG_TIDY 6 | // NOLINTBEGIN 7 | static_assert(false, "The DuckDB 'ExtensionUtil' class has been removed, see this PR for more details: " 8 | "https://github.com/duckdb/duckdb/pull/17772"); 9 | // NOLINTEND 10 | #endif 11 | 12 | } // namespace duckdb 13 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/to_string.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/to_string.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | using std::to_string; 13 | } 14 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_basetableref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/binder.hpp" 2 | #include "duckdb/planner/operator/logical_get.hpp" 3 | #include "duckdb/planner/tableref/bound_basetableref.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::CreatePlan(BoundBaseTableRef &ref) { 8 | return std::move(ref.get); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_types_column.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/types/column/column_data_allocator.cpp" 2 | 3 | #include "src/common/types/column/column_data_collection.cpp" 4 | 5 | #include "src/common/types/column/column_data_collection_segment.cpp" 6 | 7 | #include "src/common/types/column/column_data_consumer.cpp" 8 | 9 | #include "src/common/types/column/partitioned_column_data.cpp" 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_catalog_default.cpp: -------------------------------------------------------------------------------- 1 | #include "src/catalog/default/default_functions.cpp" 2 | 3 | #include "src/catalog/default/default_generator.cpp" 4 | 5 | #include "src/catalog/default/default_schemas.cpp" 6 | 7 | #include "src/catalog/default/default_table_functions.cpp" 8 | 9 | #include "src/catalog/default/default_types.cpp" 10 | 11 | #include "src/catalog/default/default_views.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/DuckDBTimestampTZ.java: -------------------------------------------------------------------------------- 1 | package org.duckdb; 2 | 3 | import java.time.OffsetDateTime; 4 | 5 | public class DuckDBTimestampTZ extends DuckDBTimestamp { 6 | 7 | public DuckDBTimestampTZ(long timeMicros) { 8 | super(timeMicros); 9 | } 10 | 11 | public DuckDBTimestampTZ(OffsetDateTime offsetDateTime) { 12 | super(offsetDateTime); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/exception/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/exception/binder_exception.hpp" 2 | #include "duckdb/common/exception/catalog_exception.hpp" 3 | #include "duckdb/common/exception/conversion_exception.hpp" 4 | #include "duckdb/common/exception/http_exception.hpp" 5 | #include "duckdb/common/exception/parser_exception.hpp" 6 | #include "duckdb/common/exception/transaction_exception.hpp" 7 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/list.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/list.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::list; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/array.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/array.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::array; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/deque.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/deque.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::deque; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/stack.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/stack.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::stack; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/swap.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/swap.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::swap; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/storage/compression/patas/shared.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace duckdb { 4 | 5 | class PatasPrimitives { 6 | public: 7 | static constexpr uint32_t PATAS_GROUP_SIZE = 1024; 8 | static constexpr uint8_t HEADER_SIZE = sizeof(uint32_t); 9 | static constexpr uint8_t BYTECOUNT_BITSIZE = 3; 10 | static constexpr uint8_t INDEX_BITSIZE = 7; 11 | }; 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/table/persistent_table_data.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/table/persistent_table_data.hpp" 2 | #include "duckdb/storage/statistics/base_statistics.hpp" 3 | 4 | namespace duckdb { 5 | 6 | PersistentTableData::PersistentTableData(idx_t column_count) : total_rows(0), row_group_count(0) { 7 | } 8 | 9 | PersistentTableData::~PersistentTableData() { 10 | } 11 | 12 | } // namespace duckdb 13 | -------------------------------------------------------------------------------- /src/duckdb/third_party/snappy/snappy_version.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //! The new version of snappy is much faster when compiled with clang, but slower when compiled with GCC 4 | //! For DuckDB, we default to the old version if the compiler is not clang 5 | #ifndef SNAPPY_NEW_VERSION 6 | #ifdef __clang__ 7 | #define SNAPPY_NEW_VERSION true 8 | #else 9 | #define SNAPPY_NEW_VERSION false 10 | #endif 11 | #endif 12 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/bitset.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/bitset.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::bitset; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/thread.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/thread.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::thread; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/bind_emptytableref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/tableref/emptytableref.hpp" 2 | #include "duckdb/planner/binder.hpp" 3 | #include "duckdb/planner/tableref/bound_dummytableref.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::Bind(EmptyTableRef &ref) { 8 | return make_uniq(GenerateTableIndex()); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_arrow_appender.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/arrow/appender/bool_data.cpp" 2 | 3 | #include "src/common/arrow/appender/fixed_size_list_data.cpp" 4 | 5 | #include "src/common/arrow/appender/null_data.cpp" 6 | 7 | #include "src/common/arrow/appender/struct_data.cpp" 8 | 9 | #include "src/common/arrow/appender/union_data.cpp" 10 | 11 | #include "src/common/arrow/appender/append_data.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_serializer.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/serializer/binary_serializer.cpp" 2 | 3 | #include "src/common/serializer/binary_deserializer.cpp" 4 | 5 | #include "src/common/serializer/buffered_file_reader.cpp" 6 | 7 | #include "src/common/serializer/buffered_file_writer.cpp" 8 | 9 | #include "src/common/serializer/memory_stream.cpp" 10 | 11 | #include "src/common/serializer/serializer.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/operator/scan/physical_empty_result.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/scan/physical_empty_result.hpp" 2 | 3 | namespace duckdb { 4 | 5 | SourceResultType PhysicalEmptyResult::GetData(ExecutionContext &context, DataChunk &chunk, 6 | OperatorSourceInput &input) const { 7 | return SourceResultType::FINISHED; 8 | } 9 | 10 | } // namespace duckdb 11 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/compression/chimp/chimp_constants.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/compression/chimp/algorithm/chimp_utils.hpp" 2 | 3 | namespace duckdb { 4 | 5 | constexpr uint8_t ChimpConstants::Compression::LEADING_ROUND[]; 6 | constexpr uint8_t ChimpConstants::Compression::LEADING_REPRESENTATION[]; 7 | 8 | constexpr uint8_t ChimpConstants::Decompression::LEADING_REPRESENTATION[]; 9 | 10 | } // namespace duckdb 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_multi_file.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/multi_file/base_file_reader.cpp" 2 | 3 | #include "src/common/multi_file/multi_file_function.cpp" 4 | 5 | #include "src/common/multi_file/multi_file_list.cpp" 6 | 7 | #include "src/common/multi_file/multi_file_reader.cpp" 8 | 9 | #include "src/common/multi_file/multi_file_column_mapper.cpp" 10 | 11 | #include "src/common/multi_file/union_by_name.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/planner/filter/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/filter/conjunction_filter.hpp" 2 | #include "duckdb/planner/filter/constant_filter.hpp" 3 | #include "duckdb/planner/filter/dynamic_filter.hpp" 4 | #include "duckdb/planner/filter/in_filter.hpp" 5 | #include "duckdb/planner/filter/null_filter.hpp" 6 | #include "duckdb/planner/filter/optional_filter.hpp" 7 | #include "duckdb/planner/filter/struct_filter.hpp" 8 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/include/jemalloc/internal/tsd_types.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_TSD_TYPES_H 2 | #define JEMALLOC_INTERNAL_TSD_TYPES_H 3 | 4 | #define MALLOC_TSD_CLEANUPS_MAX 4 5 | 6 | #include "jemalloc/internal/jemalloc_preamble.h" 7 | 8 | typedef struct tsd_s tsd_t; 9 | typedef struct tsdn_s tsdn_t; 10 | typedef bool (*malloc_tsd_cleanup_t)(void); 11 | 12 | #endif /* JEMALLOC_INTERNAL_TSD_TYPES_H */ 13 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/queue.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/queue.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::queue; 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_dummytableref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/binder.hpp" 2 | #include "duckdb/planner/operator/logical_dummy_scan.hpp" 3 | #include "duckdb/planner/tableref/bound_dummytableref.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::CreatePlan(BoundEmptyTableRef &ref) { 8 | return make_uniq(ref.bind_index); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/constraint.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/constraint.hpp" 2 | 3 | #include "duckdb/common/printer.hpp" 4 | #include "duckdb/parser/constraints/list.hpp" 5 | 6 | namespace duckdb { 7 | 8 | Constraint::Constraint(ConstraintType type) : type(type) { 9 | } 10 | 11 | Constraint::~Constraint() { 12 | } 13 | 14 | void Constraint::Print() const { 15 | Printer::Print(ToString()); 16 | } 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /duckdb_extension_config.cmake: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # JDBC DuckDB extension config 3 | ################################################################################ 4 | # 5 | # This is the default extension configuration for JDBC builds. Basically it means that all these extensions are 6 | # "baked in" to the python binaries. 7 | duckdb_extension_load(parquet) 8 | duckdb_extension_load(icu) -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/unordered_map.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/unordered_map.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::unordered_map; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/unordered_set.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/unordered_set.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::unordered_set; 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/tableref/emptytableref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/tableref/emptytableref.hpp" 2 | 3 | namespace duckdb { 4 | 5 | string EmptyTableRef::ToString() const { 6 | return ""; 7 | } 8 | 9 | bool EmptyTableRef::Equals(const TableRef &other) const { 10 | return TableRef::Equals(other); 11 | } 12 | 13 | unique_ptr EmptyTableRef::Copy() { 14 | return make_uniq(); 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_tree_renderer.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/tree_renderer/json_tree_renderer.cpp" 2 | 3 | #include "src/common/tree_renderer/html_tree_renderer.cpp" 4 | 5 | #include "src/common/tree_renderer/graphviz_tree_renderer.cpp" 6 | 7 | #include "src/common/tree_renderer/text_tree_renderer.cpp" 8 | 9 | #include "src/common/tree_renderer/yaml_tree_renderer.cpp" 10 | 11 | #include "src/common/tree_renderer/tree_renderer.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/map.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/map.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::map; 15 | using std::multimap; 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/set.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/set.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::multiset; 15 | using std::set; 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/table/arrow/enum/arrow_variable_size_type.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace duckdb { 4 | 5 | //===--------------------------------------------------------------------===// 6 | // Arrow Variable Size Types 7 | //===--------------------------------------------------------------------===// 8 | enum class ArrowVariableSizeType : uint8_t { NORMAL, FIXED_SIZE, SUPER_SIZE, VIEW }; 9 | 10 | } // namespace duckdb 11 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_reset.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/physical_plan_generator.hpp" 2 | #include "duckdb/planner/operator/logical_reset.hpp" 3 | #include "duckdb/execution/operator/helper/physical_reset.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalReset &op) { 8 | return Make(op.name, op.scope, op.estimated_cardinality); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/common.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/common.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | #include "duckdb/common/helper.hpp" 13 | #include "duckdb/common/vector.hpp" 14 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/pair.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/pair.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::make_pair; 15 | using std::pair; 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_function_scalar_system.cpp: -------------------------------------------------------------------------------- 1 | #include "src/function/scalar/system/aggregate_export.cpp" 2 | 3 | #include "src/function/scalar/system/write_log.cpp" 4 | 5 | #include "src/function/scalar/system/current_transaction_id.cpp" 6 | 7 | #include "src/function/scalar/system/current_connection_id.cpp" 8 | 9 | #include "src/function/scalar/system/current_query_id.cpp" 10 | 11 | #include "src/function/scalar/system/parse_log_message.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_pragma.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/physical_plan_generator.hpp" 2 | #include "duckdb/planner/operator/logical_pragma.hpp" 3 | 4 | #include "duckdb/execution/operator/helper/physical_pragma.hpp" 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalPragma &op) { 8 | return Make(std::move(op.info), op.estimated_cardinality); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_cteref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/binder.hpp" 2 | #include "duckdb/planner/operator/logical_cteref.hpp" 3 | #include "duckdb/planner/tableref/bound_cteref.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::CreatePlan(BoundCTERef &ref) { 8 | return make_uniq(ref.bind_index, ref.cte_index, ref.types, ref.bound_columns, ref.is_recurring); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/statistics/segment_statistics.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/statistics/segment_statistics.hpp" 2 | 3 | #include "duckdb/common/exception.hpp" 4 | 5 | namespace duckdb { 6 | 7 | SegmentStatistics::SegmentStatistics(LogicalType type) : statistics(BaseStatistics::CreateEmpty(std::move(type))) { 8 | } 9 | 10 | SegmentStatistics::SegmentStatistics(BaseStatistics stats) : statistics(std::move(stats)) { 11 | } 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/main/connection.hpp" 12 | #include "duckdb/main/database.hpp" 13 | #include "duckdb/main/query_result.hpp" 14 | #include "duckdb/main/appender.hpp" 15 | -------------------------------------------------------------------------------- /src/duckdb/src/parallel/base_pipeline_event.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parallel/base_pipeline_event.hpp" 2 | 3 | namespace duckdb { 4 | 5 | BasePipelineEvent::BasePipelineEvent(shared_ptr pipeline_p) 6 | : Event(pipeline_p->executor), pipeline(std::move(pipeline_p)) { 7 | } 8 | 9 | BasePipelineEvent::BasePipelineEvent(Pipeline &pipeline_p) 10 | : Event(pipeline_p.executor), pipeline(pipeline_p.shared_from_this()) { 11 | } 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/compression/alp/alp_constants.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/compression/alp/alp_constants.hpp" 2 | 3 | namespace duckdb { 4 | 5 | constexpr int64_t AlpConstants::FACT_ARR[]; 6 | 7 | constexpr float AlpTypedConstants::EXP_ARR[]; 8 | constexpr float AlpTypedConstants::FRAC_ARR[]; 9 | 10 | constexpr double AlpTypedConstants::EXP_ARR[]; 11 | constexpr double AlpTypedConstants::FRAC_ARR[]; 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/test/test.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_parquet_decoder.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/parquet/decoder/byte_stream_split_decoder.cpp" 2 | 3 | #include "extension/parquet/decoder/delta_binary_packed_decoder.cpp" 4 | 5 | #include "extension/parquet/decoder/delta_byte_array_decoder.cpp" 6 | 7 | #include "extension/parquet/decoder/delta_length_byte_array_decoder.cpp" 8 | 9 | #include "extension/parquet/decoder/dictionary_decoder.cpp" 10 | 11 | #include "extension/parquet/decoder/rle_decoder.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-current.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-current.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUCurrentFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-dateadd.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-dateadd.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUDateAddFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-datepart.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-datepart.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUDatePartFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-datesub.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-datediff.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUDateSubFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-makedate.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-makedate.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUMakeDateFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-strptime.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-strptime.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUStrptimeFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-timezone.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-timezone.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUTimeZoneFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/include/jemalloc/internal/slab_data.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_SLAB_DATA_H 2 | #define JEMALLOC_INTERNAL_SLAB_DATA_H 3 | 4 | #include "jemalloc/internal/jemalloc_preamble.h" 5 | #include "jemalloc/internal/bitmap.h" 6 | 7 | typedef struct slab_data_s slab_data_t; 8 | struct slab_data_s { 9 | /* Per region allocated/deallocated bitmap. */ 10 | bitmap_t bitmap[BITMAP_GROUPS_MAX]; 11 | }; 12 | 13 | #endif /* JEMALLOC_INTERNAL_SLAB_DATA_H */ 14 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/expression/bind_constant_expression.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/expression/constant_expression.hpp" 2 | #include "duckdb/planner/expression/bound_constant_expression.hpp" 3 | #include "duckdb/planner/expression_binder.hpp" 4 | 5 | namespace duckdb { 6 | 7 | BindResult ExpressionBinder::BindExpression(ConstantExpression &expr, idx_t depth) { 8 | return BindResult(make_uniq(expr.value)); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-datetrunc.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-datetrunc.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUDateTruncFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-list-range.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-list-range.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUListRangeFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-timebucket.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-timebucket.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUTimeBucketFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/extension/parquet/include/parquet_float16.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // parquet_timestamp.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb.hpp" 12 | 13 | namespace duckdb { 14 | 15 | float Float16ToFloat32(const uint16_t &float16_value); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/bind_bound_table_ref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/tableref/bound_ref_wrapper.hpp" 2 | 3 | namespace duckdb { 4 | 5 | unique_ptr Binder::Bind(BoundRefWrapper &ref) { 6 | if (!ref.binder || !ref.bound_ref) { 7 | throw InternalException("Rebinding bound ref that was already bound"); 8 | } 9 | bind_context.AddContext(std::move(ref.binder->bind_context)); 10 | return std::move(ref.bound_ref); 11 | } 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_delimgetref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/binder.hpp" 2 | #include "duckdb/planner/operator/logical_get.hpp" 3 | #include "duckdb/planner/tableref/bound_basetableref.hpp" 4 | #include "duckdb/planner/operator/logical_delim_get.hpp" 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::CreatePlan(BoundDelimGetRef &ref) { 8 | return make_uniq(ref.bind_index, ref.column_types); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_scan.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/scan/physical_column_data_scan.cpp" 2 | 3 | #include "src/execution/operator/scan/physical_dummy_scan.cpp" 4 | 5 | #include "src/execution/operator/scan/physical_empty_result.cpp" 6 | 7 | #include "src/execution/operator/scan/physical_expression_scan.cpp" 8 | 9 | #include "src/execution/operator/scan/physical_positional_scan.cpp" 10 | 11 | #include "src/execution/operator/scan/physical_table_scan.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu-table-range.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu-table-range.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ExtensionLoader; 14 | 15 | void RegisterICUTableRangeFunctions(ExtensionLoader &loader); 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_create_secret.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/physical_plan_generator.hpp" 2 | #include "duckdb/planner/operator/logical_create_secret.hpp" 3 | #include "duckdb/execution/operator/helper/physical_create_secret.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalCreateSecret &op) { 8 | return Make(op.secret_input, op.estimated_cardinality); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/transform/statement/transform_call.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/call_statement.hpp" 2 | #include "duckdb/parser/transformer.hpp" 3 | 4 | namespace duckdb { 5 | 6 | unique_ptr Transformer::TransformCall(duckdb_libpgquery::PGCallStmt &stmt) { 7 | auto result = make_uniq(); 8 | result->function = TransformFuncCall(*PGPointerCast(stmt.func)); 9 | return result; 10 | } 11 | 12 | } // namespace duckdb 13 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/include/jemalloc/internal/extent_mmap.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H 2 | #define JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H 3 | 4 | #include "jemalloc/internal/jemalloc_preamble.h" 5 | 6 | extern bool opt_retain; 7 | 8 | void *extent_alloc_mmap(void *new_addr, size_t size, size_t alignment, 9 | bool *zero, bool *commit); 10 | bool extent_dalloc_mmap(void *addr, size_t size); 11 | 12 | #endif /* JEMALLOC_INTERNAL_EXTENT_MMAP_EXTERNS_H */ 13 | -------------------------------------------------------------------------------- /src/duckdb/src/common/assert.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/assert.hpp" 2 | #include "duckdb/common/exception.hpp" 3 | 4 | namespace duckdb { 5 | 6 | void DuckDBAssertInternal(bool condition, const char *condition_name, const char *file, int linenr) { 7 | #ifdef DISABLE_ASSERTIONS 8 | return; 9 | #endif 10 | if (condition) { 11 | return; 12 | } 13 | throw InternalException("Assertion triggered in file \"%s\" on line %d: %s", file, linenr, condition_name); 14 | } 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_planner_filter.cpp: -------------------------------------------------------------------------------- 1 | #include "src/planner/filter/conjunction_filter.cpp" 2 | 3 | #include "src/planner/filter/constant_filter.cpp" 4 | 5 | #include "src/planner/filter/dynamic_filter.cpp" 6 | 7 | #include "src/planner/filter/expression_filter.cpp" 8 | 9 | #include "src/planner/filter/in_filter.cpp" 10 | 11 | #include "src/planner/filter/null_filter.cpp" 12 | 13 | #include "src/planner/filter/struct_filter.cpp" 14 | 15 | #include "src/planner/filter/optional_filter.cpp" 16 | 17 | -------------------------------------------------------------------------------- /src/test/java/org/duckdb/test/Helpers.java: -------------------------------------------------------------------------------- 1 | package org.duckdb.test; 2 | 3 | import java.util.LinkedHashMap; 4 | 5 | public class Helpers { 6 | 7 | @SuppressWarnings("unchecked") 8 | public static LinkedHashMap createMap(Object... entries) { 9 | LinkedHashMap map = new LinkedHashMap<>(); 10 | for (int i = 0; i < entries.length; i += 2) { 11 | map.put((K) entries[i], (V) entries[i + 1]); 12 | } 13 | return map; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_dummy_scan.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/scan/physical_dummy_scan.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_dummy_scan.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalDummyScan &op) { 8 | D_ASSERT(op.children.empty()); 9 | return Make(op.types, op.estimated_cardinality); 10 | } 11 | 12 | } // namespace duckdb 13 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/DuckDBDate.java: -------------------------------------------------------------------------------- 1 | package org.duckdb; 2 | 3 | import java.sql.Date; 4 | import java.time.LocalDate; 5 | import java.time.temporal.ChronoUnit; 6 | 7 | public class DuckDBDate { 8 | private final long daysSinceEpoch; 9 | 10 | public DuckDBDate(Date date) { 11 | this.daysSinceEpoch = LocalDate.ofEpochDay(0).until(date.toLocalDate(), ChronoUnit.DAYS); 12 | } 13 | 14 | public long getDaysSinceEpoch() { 15 | return daysSinceEpoch; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_copy_database.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/physical_plan_generator.hpp" 2 | #include "duckdb/planner/operator/logical_copy_database.hpp" 3 | #include "duckdb/execution/operator/persistent/physical_copy_database.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalCopyDatabase &op) { 8 | return Make(op.types, op.estimated_cardinality, std::move(op.info)); 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/src/test_hooks.c: -------------------------------------------------------------------------------- 1 | #include "jemalloc/internal/jemalloc_preamble.h" 2 | 3 | /* 4 | * The hooks are a little bit screwy -- they're not genuinely exported in the 5 | * sense that we want them available to end-users, but we do want them visible 6 | * from outside the generated library, so that we can use them in test code. 7 | */ 8 | JEMALLOC_EXPORT 9 | void (*test_hooks_arena_new_hook)(void) = NULL; 10 | 11 | JEMALLOC_EXPORT 12 | void (*test_hooks_libc_hook)(void) = NULL; 13 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/operator/scan/physical_dummy_scan.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/scan/physical_dummy_scan.hpp" 2 | 3 | namespace duckdb { 4 | 5 | SourceResultType PhysicalDummyScan::GetData(ExecutionContext &context, DataChunk &chunk, 6 | OperatorSourceInput &input) const { 7 | // return a single row on the first call to the dummy scan 8 | chunk.SetCardinality(1); 9 | 10 | return SourceResultType::FINISHED; 11 | } 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/set_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/set_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class SetType : uint8_t { SET = 0, RESET = 1 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_empty_result.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/scan/physical_empty_result.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_empty_result.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalEmptyResult &op) { 8 | D_ASSERT(op.children.size() == 0); 9 | return Make(op.types, op.estimated_cardinality); 10 | } 11 | 12 | } // namespace duckdb 13 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/statement/bind_select.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/select_statement.hpp" 2 | #include "duckdb/planner/binder.hpp" 3 | #include "duckdb/planner/bound_query_node.hpp" 4 | 5 | namespace duckdb { 6 | 7 | BoundStatement Binder::Bind(SelectStatement &stmt) { 8 | auto &properties = GetStatementProperties(); 9 | properties.allow_stream_result = true; 10 | properties.return_type = StatementReturnType::QUERY_RESULT; 11 | return Bind(*stmt.node); 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_pivotref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/tableref/bound_pivotref.hpp" 2 | #include "duckdb/planner/operator/logical_pivot.hpp" 3 | 4 | namespace duckdb { 5 | 6 | unique_ptr Binder::CreatePlan(BoundPivotRef &ref) { 7 | auto subquery = ref.child_binder->CreatePlan(*ref.child); 8 | 9 | auto result = make_uniq(ref.bind_index, std::move(subquery), std::move(ref.bound_pivot)); 10 | return std::move(result); 11 | } 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/user/DuckDBMap.java: -------------------------------------------------------------------------------- 1 | package org.duckdb.user; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | public class DuckDBMap extends HashMap { 7 | private static final long serialVersionUID = 0L; 8 | private final String typeName; 9 | 10 | public DuckDBMap(String typeName, Map map) { 11 | super(map); 12 | this.typeName = typeName; 13 | } 14 | 15 | public String getSQLTypeName() { 16 | return typeName; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/table/arrow/enum/arrow_datetime_type.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace duckdb { 4 | 5 | //===--------------------------------------------------------------------===// 6 | // Arrow Time/Date Types 7 | //===--------------------------------------------------------------------===// 8 | enum class ArrowDateTimeType : uint8_t { 9 | MILLISECONDS, 10 | MICROSECONDS, 11 | NANOSECONDS, 12 | SECONDS, 13 | DAYS, 14 | MONTHS, 15 | MONTH_DAY_NANO 16 | }; 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_parquet_writer.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/parquet/writer/array_column_writer.cpp" 2 | 3 | #include "extension/parquet/writer/boolean_column_writer.cpp" 4 | 5 | #include "extension/parquet/writer/decimal_column_writer.cpp" 6 | 7 | #include "extension/parquet/writer/enum_column_writer.cpp" 8 | 9 | #include "extension/parquet/writer/list_column_writer.cpp" 10 | 11 | #include "extension/parquet/writer/primitive_column_writer.cpp" 12 | 13 | #include "extension/parquet/writer/struct_column_writer.cpp" 14 | 15 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/compression/empty_validity.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/function/compression/compression.hpp" 2 | #include "duckdb/storage/compression/empty_validity.hpp" 3 | 4 | namespace duckdb { 5 | 6 | CompressionFunction EmptyValidityCompressionFun::GetFunction(PhysicalType type) { 7 | return EmptyValidityCompression::CreateFunction(); 8 | } 9 | 10 | bool EmptyValidityCompressionFun::TypeIsSupported(const PhysicalType physical_type) { 11 | return physical_type == PhysicalType::BIT; 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_aggregate_holistic.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/aggregate/holistic/approx_top_k.cpp" 2 | 3 | #include "extension/core_functions/aggregate/holistic/quantile.cpp" 4 | 5 | #include "extension/core_functions/aggregate/holistic/reservoir_quantile.cpp" 6 | 7 | #include "extension/core_functions/aggregate/holistic/mad.cpp" 8 | 9 | #include "extension/core_functions/aggregate/holistic/approximate_quantile.cpp" 10 | 11 | #include "extension/core_functions/aggregate/holistic/mode.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_parser_transform_helpers.cpp: -------------------------------------------------------------------------------- 1 | #include "src/parser/transform/helpers/transform_alias.cpp" 2 | 3 | #include "src/parser/transform/helpers/transform_cte.cpp" 4 | 5 | #include "src/parser/transform/helpers/transform_groupby.cpp" 6 | 7 | #include "src/parser/transform/helpers/transform_orderby.cpp" 8 | 9 | #include "src/parser/transform/helpers/transform_sample.cpp" 10 | 11 | #include "src/parser/transform/helpers/transform_typename.cpp" 12 | 13 | #include "src/parser/transform/helpers/nodetype_to_string.cpp" 14 | 15 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/collation_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/collation_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/common.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class CollationType { ALL_COLLATIONS, COMBINABLE_COLLATIONS }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/copy_option_mode.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/copy_option_mode.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/common.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class CopyOptionMode { WRITE_ONLY, READ_ONLY, READ_WRITE }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/mutex.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/mutex.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #ifdef __MVS__ 12 | #include 13 | #endif 14 | #include 15 | 16 | namespace duckdb { 17 | using std::lock_guard; 18 | using std::mutex; 19 | using std::unique_lock; 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_parquet_reader.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/parquet/reader/decimal_column_reader.cpp" 2 | 3 | #include "extension/parquet/reader/expression_column_reader.cpp" 4 | 5 | #include "extension/parquet/reader/list_column_reader.cpp" 6 | 7 | #include "extension/parquet/reader/row_number_column_reader.cpp" 8 | 9 | #include "extension/parquet/reader/string_column_reader.cpp" 10 | 11 | #include "extension/parquet/reader/struct_column_reader.cpp" 12 | 13 | #include "extension/parquet/reader/variant_column_reader.cpp" 14 | 15 | -------------------------------------------------------------------------------- /.github/composite-actions/linux-tests-host/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Linux Tests Host' 2 | description: 'Linux test run in host OS' 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | - name: Tests Host 8 | shell: bash 9 | run: | 10 | cat /etc/os-release 11 | ${JAVA_HOME_21_X64}/bin/java -version 12 | ${JAVA_HOME_21_X64}/bin/java \ 13 | -cp ./build/release/duckdb_jdbc_tests.jar:./build/release/duckdb_jdbc.jar \ 14 | org.duckdb.TestDuckDBJDBC 15 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/include/malloc_ncpus.h: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // malloc_ncpus.h 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #ifndef MALLOC_NCPUS_H 10 | #define MALLOC_NCPUS_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | unsigned duckdb_malloc_ncpus(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // MALLOC_NCPUS_H 23 | -------------------------------------------------------------------------------- /src/duckdb/src/common/types/conflict_info.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/types/constraint_conflict_info.hpp" 2 | #include "duckdb/storage/index.hpp" 3 | 4 | namespace duckdb { 5 | 6 | bool ConflictInfo::ConflictTargetMatches(Index &index) const { 7 | if (only_check_unique && !index.IsUnique()) { 8 | // We only support ON CONFLICT for PRIMARY KEY/UNIQUE constraints. 9 | return false; 10 | } 11 | if (column_ids.empty()) { 12 | return true; 13 | } 14 | return column_ids == index.GetColumnIdSet(); 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/arrow/nanoarrow/nanoarrow.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "duckdb/common/arrow/nanoarrow/nanoarrow.h" 4 | 5 | // Bring in the symbols from duckdb_nanoarrow into duckdb 6 | namespace duckdb { 7 | 8 | // using duckdb_nanoarrow::ArrowBuffer; //We have a variant of this that should be renamed 9 | using duckdb_nanoarrow::ArrowBufferAllocator; 10 | using duckdb_nanoarrow::ArrowError; 11 | using duckdb_nanoarrow::ArrowSchemaView; 12 | using duckdb_nanoarrow::ArrowStringView; 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/thread_pin_mode.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/thread_pin_mode.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class ThreadPinMode : uint8_t { OFF = 0, ON = 1, AUTO = 2 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/statement/bind_relation.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/catalog/catalog.hpp" 2 | #include "duckdb/parser/expression/constant_expression.hpp" 3 | #include "duckdb/parser/statement/insert_statement.hpp" 4 | #include "duckdb/parser/query_node/select_node.hpp" 5 | #include "duckdb/planner/binder.hpp" 6 | #include "duckdb/parser/statement/relation_statement.hpp" 7 | 8 | namespace duckdb { 9 | 10 | BoundStatement Binder::Bind(RelationStatement &stmt) { 11 | return stmt.relation->Bind(*this); 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_any_join.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_any_join.hpp" 2 | 3 | namespace duckdb { 4 | 5 | LogicalAnyJoin::LogicalAnyJoin(JoinType type) : LogicalJoin(type, LogicalOperatorType::LOGICAL_ANY_JOIN) { 6 | } 7 | 8 | InsertionOrderPreservingMap LogicalAnyJoin::ParamsToString() const { 9 | InsertionOrderPreservingMap result; 10 | result["Condition"] = condition->ToString(); 11 | SetParamsEstimatedCardinality(result); 12 | return result; 13 | } 14 | 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/checksum.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/checksum.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | //! Compute a checksum over a buffer of size size 16 | uint64_t Checksum(uint8_t *buffer, size_t size); 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/explain_format.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/explain_format.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/typedefs.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class ExplainFormat : uint8_t { DEFAULT, TEXT, JSON, HTML, GRAPHVIZ, YAML }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_map.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/map/map_keys_values.cpp" 2 | 3 | #include "extension/core_functions/scalar/map/map_extract.cpp" 4 | 5 | #include "extension/core_functions/scalar/map/map_from_entries.cpp" 6 | 7 | #include "extension/core_functions/scalar/map/map_entries.cpp" 8 | 9 | #include "extension/core_functions/scalar/map/map.cpp" 10 | 11 | #include "extension/core_functions/scalar/map/map_concat.cpp" 12 | 13 | #include "extension/core_functions/scalar/map/cardinality.cpp" 14 | 15 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_row_operations.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/row_operations/row_aggregate.cpp" 2 | 3 | #include "src/common/row_operations/row_scatter.cpp" 4 | 5 | #include "src/common/row_operations/row_gather.cpp" 6 | 7 | #include "src/common/row_operations/row_matcher.cpp" 8 | 9 | #include "src/common/row_operations/row_external.cpp" 10 | 11 | #include "src/common/row_operations/row_radix_scatter.cpp" 12 | 13 | #include "src/common/row_operations/row_heap_scatter.cpp" 14 | 15 | #include "src/common/row_operations/row_heap_gather.cpp" 16 | 17 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_scanner.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/scanner/base_scanner.cpp" 2 | 3 | #include "src/execution/operator/csv_scanner/scanner/column_count_scanner.cpp" 4 | 5 | #include "src/execution/operator/csv_scanner/scanner/csv_schema.cpp" 6 | 7 | #include "src/execution/operator/csv_scanner/scanner/scanner_boundary.cpp" 8 | 9 | #include "src/execution/operator/csv_scanner/scanner/skip_scanner.cpp" 10 | 11 | #include "src/execution/operator/csv_scanner/scanner/string_value_scanner.cpp" 12 | 13 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_parser_transform_tableref.cpp: -------------------------------------------------------------------------------- 1 | #include "src/parser/transform/tableref/transform_base_tableref.cpp" 2 | 3 | #include "src/parser/transform/tableref/transform_join.cpp" 4 | 5 | #include "src/parser/transform/tableref/transform_from.cpp" 6 | 7 | #include "src/parser/transform/tableref/transform_pivot.cpp" 8 | 9 | #include "src/parser/transform/tableref/transform_subquery.cpp" 10 | 11 | #include "src/parser/transform/tableref/transform_table_function.cpp" 12 | 13 | #include "src/parser/transform/tableref/transform_tableref.cpp" 14 | 15 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_pivot.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/projection/physical_pivot.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_pivot.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalPivot &op) { 8 | D_ASSERT(op.children.size() == 1); 9 | auto &plan = CreatePlan(*op.children[0]); 10 | return Make(std::move(op.types), plan, std::move(op.bound_pivot)); 11 | } 12 | 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/output_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/output_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class ExplainOutputType : uint8_t { ALL = 0, OPTIMIZED_ONLY = 1, PHYSICAL_ONLY = 2 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/access_mode.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/access_mode.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class AccessMode : uint8_t { UNDEFINED = 0, AUTOMATIC = 1, READ_ONLY = 2, READ_WRITE = 3 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/on_entry_not_found.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/on_entry_not_found.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class OnEntryNotFound : uint8_t { THROW_EXCEPTION = 0, RETURN_NULL = 1 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/jni/functions.hpp.template: -------------------------------------------------------------------------------- 1 | // This file was generated by generator.py 2 | 3 | #pragma once 4 | 5 | #include "duckdb/common/assert.hpp" 6 | #include "duckdb/common/error_data.hpp" 7 | #include "org_duckdb_DuckDBNative.h" 8 | #include 9 | 10 | void ThrowJNI(JNIEnv* env, const char* message); 11 | {% for function in header.functions %} 12 | 13 | {{function.return_type or 'void'}} {{function.short_name}}({{function.params}}); 14 | 15 | JNIEXPORT {{ function.return_type or 'void' }} JNICALL {{function.name}}({{function.params}}); 16 | {% endfor %} 17 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/catalog/catalog_entry/table_column_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/catalog/catalog_entry/table_column_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class TableColumnType : uint8_t { STANDARD = 0, GENERATED = 1 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/ordinality_request_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/ordinality_request_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | #include "duckdb/common/typedefs.hpp" 11 | 12 | namespace duckdb { 13 | 14 | enum class OrdinalityType : uint8_t { WITHOUT_ORDINALITY = 0, WITH_ORDINALITY = 1 }; 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/constraints/not_null_constraint.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/constraints/not_null_constraint.hpp" 2 | 3 | namespace duckdb { 4 | 5 | NotNullConstraint::NotNullConstraint(LogicalIndex index) : Constraint(ConstraintType::NOT_NULL), index(index) { 6 | } 7 | 8 | NotNullConstraint::~NotNullConstraint() { 9 | } 10 | 11 | string NotNullConstraint::ToString() const { 12 | return "NOT NULL"; 13 | } 14 | 15 | unique_ptr NotNullConstraint::Copy() const { 16 | return make_uniq(index); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/catalog/catalog_entry/copy_function_catalog_entry.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/catalog/catalog_entry/copy_function_catalog_entry.hpp" 2 | #include "duckdb/parser/parsed_data/create_copy_function_info.hpp" 3 | 4 | namespace duckdb { 5 | 6 | CopyFunctionCatalogEntry::CopyFunctionCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, 7 | CreateCopyFunctionInfo &info) 8 | : StandardEntry(CatalogType::COPY_FUNCTION_ENTRY, schema, catalog, info.name), function(info.function) { 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/operator/helper/physical_pragma.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/helper/physical_pragma.hpp" 2 | 3 | namespace duckdb { 4 | 5 | SourceResultType PhysicalPragma::GetData(ExecutionContext &context, DataChunk &chunk, 6 | OperatorSourceInput &input) const { 7 | auto &client = context.client; 8 | FunctionParameters parameters {info->parameters, info->named_parameters}; 9 | info->function.function(client, parameters); 10 | 11 | return SourceResultType::FINISHED; 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/preserve_order.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/preserve_order.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class PreserveOrderType : uint8_t { AUTOMATIC = 0, PRESERVE_ORDER = 1, DONT_PRESERVE_ORDER = 2 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/fstream.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/fstream.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | 14 | namespace duckdb { 15 | using std::endl; 16 | using std::fstream; 17 | using std::ifstream; 18 | using std::ios; 19 | using std::ios_base; 20 | using std::ofstream; 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/parallel/pipeline_complete_event.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parallel/pipeline_complete_event.hpp" 2 | #include "duckdb/execution/executor.hpp" 3 | 4 | namespace duckdb { 5 | 6 | PipelineCompleteEvent::PipelineCompleteEvent(Executor &executor, bool complete_pipeline_p) 7 | : Event(executor), complete_pipeline(complete_pipeline_p) { 8 | } 9 | 10 | void PipelineCompleteEvent::Schedule() { 11 | } 12 | 13 | void PipelineCompleteEvent::FinalizeFinish() { 14 | if (complete_pipeline) { 15 | executor.CompletePipeline(); 16 | } 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/transaction/append_info.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/transaction/append_info.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | class DataTable; 15 | 16 | struct AppendInfo { 17 | DataTable *table; 18 | idx_t start_row; 19 | idx_t count; 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/mbedtls/private_access.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file private_access.h 3 | * 4 | * \brief Macro wrapper for struct's members. 5 | */ 6 | /* 7 | * Copyright The Mbed TLS Contributors 8 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 9 | */ 10 | 11 | #ifndef MBEDTLS_PRIVATE_ACCESS_H 12 | #define MBEDTLS_PRIVATE_ACCESS_H 13 | 14 | #ifndef MBEDTLS_ALLOW_PRIVATE_ACCESS 15 | #define MBEDTLS_PRIVATE(member) private_##member 16 | #else 17 | #define MBEDTLS_PRIVATE(member) member 18 | #endif 19 | 20 | #endif /* MBEDTLS_PRIVATE_ACCESS_H */ 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/profiler_format.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/profiler_format.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class ProfilerPrintFormat : uint8_t { QUERY_TREE, JSON, QUERY_TREE_OPTIMIZER, NO_OUTPUT, HTML, GRAPHVIZ }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/constraints/check_constraint.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/constraints/check_constraint.hpp" 2 | 3 | namespace duckdb { 4 | 5 | CheckConstraint::CheckConstraint(unique_ptr expression) 6 | : Constraint(ConstraintType::CHECK), expression(std::move(expression)) { 7 | } 8 | 9 | string CheckConstraint::ToString() const { 10 | return "CHECK(" + expression->ToString() + ")"; 11 | } 12 | 13 | unique_ptr CheckConstraint::Copy() const { 14 | return make_uniq(expression->Copy()); 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/debug_initialize.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/debug_initialize.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class DebugInitialize : uint8_t { NO_INITIALIZE = 0, DEBUG_ZERO_INITIALIZE = 1, DEBUG_ONE_INITIALIZE = 2 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/prepared_statement_mode.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/prepared_statement_mode.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class PreparedStatementMode : uint8_t { 16 | PREPARE_ONLY, 17 | PREPARE_AND_EXECUTE, 18 | }; 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/set_operation_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/set_operation_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class SetOperationType : uint8_t { NONE = 0, UNION = 1, EXCEPT = 2, INTERSECT = 3, UNION_BY_NAME = 4 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/third_party/thrift/thrift/thrift_export.h: -------------------------------------------------------------------------------- 1 | #ifndef THRIFT_EXPORT_H 2 | #define THRIFT_EXPORT_H 3 | 4 | #ifdef THRIFT_STATIC_DEFINE 5 | # define THRIFT_EXPORT 6 | #elif defined(_MSC_VER ) 7 | # ifndef THRIFT_EXPORT 8 | # ifdef thrift_EXPORTS 9 | /* We are building this library */ 10 | # define THRIFT_EXPORT __declspec(dllexport) 11 | # else 12 | /* We are using this library */ 13 | # define THRIFT_EXPORT __declspec(dllimport) 14 | # endif 15 | # endif 16 | #else 17 | # define THRIFT_EXPORT 18 | #endif 19 | 20 | #endif /* THRIFT_EXPORT_H */ 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/storage/table/update_state.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/storage/table/update_state.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/storage/table/append_state.hpp" 12 | 13 | namespace duckdb { 14 | class TableCatalogEntry; 15 | 16 | struct TableUpdateState { 17 | unique_ptr constraint_state; 18 | }; 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_delim_get.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_delim_get.hpp" 2 | 3 | #include "duckdb/main/config.hpp" 4 | 5 | namespace duckdb { 6 | 7 | vector LogicalDelimGet::GetTableIndex() const { 8 | return vector {table_index}; 9 | } 10 | 11 | string LogicalDelimGet::GetName() const { 12 | #ifdef DEBUG 13 | if (DBConfigOptions::debug_print_bindings) { 14 | return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index); 15 | } 16 | #endif 17 | return LogicalOperator::GetName(); 18 | } 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_storage_statistics.cpp: -------------------------------------------------------------------------------- 1 | #include "src/storage/statistics/base_statistics.cpp" 2 | 3 | #include "src/storage/statistics/column_statistics.cpp" 4 | 5 | #include "src/storage/statistics/distinct_statistics.cpp" 6 | 7 | #include "src/storage/statistics/array_stats.cpp" 8 | 9 | #include "src/storage/statistics/list_stats.cpp" 10 | 11 | #include "src/storage/statistics/numeric_stats.cpp" 12 | 13 | #include "src/storage/statistics/segment_statistics.cpp" 14 | 15 | #include "src/storage/statistics/string_stats.cpp" 16 | 17 | #include "src/storage/statistics/struct_stats.cpp" 18 | 19 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/include/msvc_compat/C99/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef stdbool_h 2 | #define stdbool_h 3 | 4 | #include 5 | 6 | /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ 7 | /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ 8 | /* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as 9 | * a built-in type. */ 10 | #ifndef __clang__ 11 | typedef BOOL _Bool; 12 | #endif 13 | 14 | #define bool _Bool 15 | #define true 1 16 | #define false 0 17 | 18 | #define __bool_true_false_are_defined 1 19 | 20 | #endif /* stdbool_h */ 21 | -------------------------------------------------------------------------------- /src/duckdb/src/catalog/catalog_entry/pragma_function_catalog_entry.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/catalog/catalog_entry/pragma_function_catalog_entry.hpp" 2 | #include "duckdb/parser/parsed_data/create_pragma_function_info.hpp" 3 | 4 | namespace duckdb { 5 | 6 | PragmaFunctionCatalogEntry::PragmaFunctionCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, 7 | CreatePragmaFunctionInfo &info) 8 | : FunctionEntry(CatalogType::PRAGMA_FUNCTION_ENTRY, catalog, schema, info), functions(std::move(info.functions)) { 9 | } 10 | 11 | } // namespace duckdb 12 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parser/tableref/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/tableref/basetableref.hpp" 2 | #include "duckdb/parser/tableref/bound_ref_wrapper.hpp" 3 | #include "duckdb/parser/tableref/emptytableref.hpp" 4 | #include "duckdb/parser/tableref/expressionlistref.hpp" 5 | #include "duckdb/parser/tableref/column_data_ref.hpp" 6 | #include "duckdb/parser/tableref/joinref.hpp" 7 | #include "duckdb/parser/tableref/pivotref.hpp" 8 | #include "duckdb/parser/tableref/showref.hpp" 9 | #include "duckdb/parser/tableref/subqueryref.hpp" 10 | #include "duckdb/parser/tableref/table_function_ref.hpp" 11 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_dummy_scan.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_dummy_scan.hpp" 2 | 3 | #include "duckdb/main/config.hpp" 4 | 5 | namespace duckdb { 6 | 7 | vector LogicalDummyScan::GetTableIndex() const { 8 | return vector {table_index}; 9 | } 10 | 11 | string LogicalDummyScan::GetName() const { 12 | #ifdef DEBUG 13 | if (DBConfigOptions::debug_print_bindings) { 14 | return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index); 15 | } 16 | #endif 17 | return LogicalOperator::GetName(); 18 | } 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/storage_block_prefetch.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/storage_block_prefetch.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class StorageBlockPrefetch : uint8_t { REMOTE_ONLY = 0, NEVER = 1, ALWAYS_PREFETCH = 2, DEBUG_FORCE_ALWAYS = 3 }; 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/sorting/sort_projection_column.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/sorting/sort_projection_column.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/typedefs.hpp" 12 | 13 | namespace duckdb { 14 | 15 | struct SortProjectionColumn { 16 | bool is_payload; 17 | idx_t layout_col_idx; 18 | idx_t output_col_idx; 19 | }; 20 | 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/load_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/load_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | LoadStatement::LoadStatement() : SQLStatement(StatementType::LOAD_STATEMENT) { 6 | } 7 | 8 | LoadStatement::LoadStatement(const LoadStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr LoadStatement::Copy() const { 12 | return unique_ptr(new LoadStatement(*this)); 13 | } 14 | 15 | string LoadStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/set_scope.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/set_scope.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class SetScope : uint8_t { 16 | AUTOMATIC = 0, 17 | LOCAL = 1, /* unused */ 18 | SESSION = 2, 19 | GLOBAL = 3, 20 | VARIABLE = 4 21 | }; 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/transform/statement/transform_import.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/pragma_statement.hpp" 2 | #include "duckdb/parser/transformer.hpp" 3 | #include "duckdb/parser/expression/constant_expression.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Transformer::TransformImport(duckdb_libpgquery::PGImportStmt &stmt) { 8 | auto result = make_uniq(); 9 | result->info->name = "import_database"; 10 | result->info->parameters.emplace_back(make_uniq(Value(stmt.filename))); 11 | return result; 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/extension/core_functions/include/core_functions/function_list.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // extension/core_functions/include/core_functions/function_list.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/function/function_list.hpp" 12 | 13 | namespace duckdb { 14 | 15 | struct CoreFunctionList { 16 | static const StaticFunctionDefinition *GetFunctionList(); 17 | }; 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/include/icu_extension.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // icu_extension.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb.hpp" 12 | 13 | namespace duckdb { 14 | 15 | class IcuExtension : public Extension { 16 | public: 17 | void Load(ExtensionLoader &loader) override; 18 | std::string Name() override; 19 | std::string Version() const override; 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ubrkimpl.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ********************************************************************** 5 | * Copyright (C) 2006, International Business Machines 6 | * Corporation and others. All Rights Reserved. 7 | ********************************************************************** 8 | */ 9 | 10 | #ifndef UBRKIMPL_H 11 | #define UBRKIMPL_H 12 | 13 | #define U_ICUDATA_BRKITR U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "brkitr" 14 | 15 | #endif /*UBRKIMPL_H*/ 16 | -------------------------------------------------------------------------------- /src/duckdb/extension/json/include/json_extension.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // json_extension.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb.hpp" 12 | 13 | namespace duckdb { 14 | 15 | class JsonExtension : public Extension { 16 | public: 17 | void Load(ExtensionLoader &db) override; 18 | std::string Name() override; 19 | std::string Version() const override; 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/operator/helper/physical_prepare.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/helper/physical_prepare.hpp" 2 | #include "duckdb/main/client_data.hpp" 3 | 4 | namespace duckdb { 5 | 6 | SourceResultType PhysicalPrepare::GetData(ExecutionContext &context, DataChunk &chunk, 7 | OperatorSourceInput &input) const { 8 | auto &client = context.client; 9 | 10 | // store the prepared statement in the context 11 | ClientData::Get(client).prepared_statements[name] = prepared; 12 | 13 | return SourceResultType::FINISHED; 14 | } 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/storage/table/column_segment_tree.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/storage/table/column_segment_tree.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/storage/table/segment_tree.hpp" 12 | #include "duckdb/storage/table/column_segment.hpp" 13 | 14 | namespace duckdb { 15 | 16 | class ColumnSegmentTree : public SegmentTree {}; 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/alter_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/alter_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | AlterStatement::AlterStatement() : SQLStatement(StatementType::ALTER_STATEMENT) { 6 | } 7 | 8 | AlterStatement::AlterStatement(const AlterStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr AlterStatement::Copy() const { 12 | return unique_ptr(new AlterStatement(*this)); 13 | } 14 | 15 | string AlterStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_expression_get.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_expression_get.hpp" 2 | 3 | #include "duckdb/main/config.hpp" 4 | 5 | namespace duckdb { 6 | 7 | vector LogicalExpressionGet::GetTableIndex() const { 8 | return vector {table_index}; 9 | } 10 | 11 | string LogicalExpressionGet::GetName() const { 12 | #ifdef DEBUG 13 | if (DBConfigOptions::debug_print_bindings) { 14 | return LogicalOperator::GetName() + StringUtil::Format(" #%llu", table_index); 15 | } 16 | #endif 17 | return LogicalOperator::GetName(); 18 | } 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/function_errors.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/function_errors.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/common.hpp" 12 | 13 | namespace duckdb { 14 | 15 | //! Whether or not a function can throw an error or not 16 | enum class FunctionErrors : uint8_t { CANNOT_ERROR = 0, CAN_THROW_RUNTIME_ERROR = 1 }; 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/table/summary.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/function/table/summary.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/function/table_function.hpp" 12 | #include "duckdb/function/built_in_functions.hpp" 13 | 14 | namespace duckdb { 15 | 16 | struct SummaryTableFunction { 17 | static void RegisterFunction(BuiltinFunctions &set); 18 | }; 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_materialized_cte.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_materialized_cte.hpp" 2 | 3 | namespace duckdb { 4 | 5 | InsertionOrderPreservingMap LogicalMaterializedCTE::ParamsToString() const { 6 | InsertionOrderPreservingMap result; 7 | result["CTE Name"] = ctename; 8 | result["Table Index"] = StringUtil::Format("%llu", table_index); 9 | SetParamsEstimatedCardinality(result); 10 | return result; 11 | } 12 | 13 | vector LogicalMaterializedCTE::GetTableIndex() const { 14 | return vector {table_index}; 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/third_party/re2/util/strutil.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The RE2 Authors. All Rights Reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #ifndef UTIL_STRUTIL_H_ 6 | #define UTIL_STRUTIL_H_ 7 | 8 | #include 9 | 10 | #include "re2/stringpiece.h" 11 | #include "util/util.h" 12 | 13 | namespace duckdb_re2 { 14 | 15 | std::string CEscape(const StringPiece& src); 16 | void PrefixSuccessor(std::string* prefix); 17 | std::string StringPrintf(const char* format, ...); 18 | 19 | } // namespace re2 20 | 21 | #endif // UTIL_STRUTIL_H_ 22 | -------------------------------------------------------------------------------- /src/test/external/spark-test.sql: -------------------------------------------------------------------------------- 1 | CREATE OR REPLACE TEMPORARY VIEW tab1 USING jdbc OPTIONS ( 2 | url "jdbc:duckdb:ducklake:postgres:postgresql://$ENV{POSTGRES_USERNAME}:$ENV{POSTGRES_PASSWORD}@$ENV{POSTGRES_HOST}:$ENV{POSTGRES_PORT}/$ENV{DUCKLAKE_CATALOG_DB};session_init_sql_file=$ENV{SESSION_INIT_SQL_FILE};", 3 | dbtable "tab1", 4 | 5 | partitionColumn "pickup_at", 6 | lowerBound "2008-08-08 09:13:28", 7 | upperBound "2033-04-27 13:08:32", 8 | numPartitions "7" 9 | ); 10 | 11 | SELECT COUNT(*) FROM tab1; 12 | SELECT SUM(total_amount) FROM tab1; 13 | SELECT * FROM tab1 ORDER BY pickup_at LIMIT 4; 14 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/parsed_data/create_copy_function_info.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/parsed_data/create_copy_function_info.hpp" 2 | 3 | namespace duckdb { 4 | 5 | CreateCopyFunctionInfo::CreateCopyFunctionInfo(CopyFunction function_p) 6 | : CreateInfo(CatalogType::COPY_FUNCTION_ENTRY), function(std::move(function_p)) { 7 | this->name = function.name; 8 | internal = true; 9 | } 10 | 11 | unique_ptr CreateCopyFunctionInfo::Copy() const { 12 | auto result = make_uniq(function); 13 | CopyProperties(*result); 14 | return std::move(result); 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/attach_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/attach_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | AttachStatement::AttachStatement() : SQLStatement(StatementType::ATTACH_STATEMENT) { 6 | } 7 | 8 | AttachStatement::AttachStatement(const AttachStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr AttachStatement::Copy() const { 12 | return unique_ptr(new AttachStatement(*this)); 13 | } 14 | 15 | string AttachStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/create_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/create_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | CreateStatement::CreateStatement() : SQLStatement(StatementType::CREATE_STATEMENT) { 6 | } 7 | 8 | CreateStatement::CreateStatement(const CreateStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr CreateStatement::Copy() const { 12 | return unique_ptr(new CreateStatement(*this)); 13 | } 14 | 15 | string CreateStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/detach_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/detach_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | DetachStatement::DetachStatement() : SQLStatement(StatementType::DETACH_STATEMENT) { 6 | } 7 | 8 | DetachStatement::DetachStatement(const DetachStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr DetachStatement::Copy() const { 12 | return unique_ptr(new DetachStatement(*this)); 13 | } 14 | 15 | string DetachStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_aggregate_regression.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/aggregate/regression/regr_sxy.cpp" 2 | 3 | #include "extension/core_functions/aggregate/regression/regr_intercept.cpp" 4 | 5 | #include "extension/core_functions/aggregate/regression/regr_count.cpp" 6 | 7 | #include "extension/core_functions/aggregate/regression/regr_r2.cpp" 8 | 9 | #include "extension/core_functions/aggregate/regression/regr_avg.cpp" 10 | 11 | #include "extension/core_functions/aggregate/regression/regr_slope.cpp" 12 | 13 | #include "extension/core_functions/aggregate/regression/regr_sxx_syy.cpp" 14 | 15 | -------------------------------------------------------------------------------- /src/duckdb/extension/core_functions/aggregate/algebraic/corr.cpp: -------------------------------------------------------------------------------- 1 | #include "core_functions/aggregate/algebraic_functions.hpp" 2 | #include "core_functions/aggregate/algebraic/covar.hpp" 3 | #include "core_functions/aggregate/algebraic/stddev.hpp" 4 | #include "core_functions/aggregate/algebraic/corr.hpp" 5 | #include "duckdb/function/function_set.hpp" 6 | 7 | namespace duckdb { 8 | 9 | AggregateFunction CorrFun::GetFunction() { 10 | return AggregateFunction::BinaryAggregate( 11 | LogicalType::DOUBLE, LogicalType::DOUBLE, LogicalType::DOUBLE); 12 | } 13 | } // namespace duckdb 14 | -------------------------------------------------------------------------------- /src/duckdb/extension/parquet/include/parquet_extension.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // parquet_extension.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===/ 8 | 9 | #pragma once 10 | 11 | #include "duckdb.hpp" 12 | 13 | namespace duckdb { 14 | 15 | class ParquetExtension : public Extension { 16 | public: 17 | void Load(ExtensionLoader &loader) override; 18 | std::string Name() override; 19 | std::string Version() const override; 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_cross_product.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/join/physical_cross_product.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_cross_product.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalCrossProduct &op) { 8 | D_ASSERT(op.children.size() == 2); 9 | auto &left = CreatePlan(*op.children[0]); 10 | auto &right = CreatePlan(*op.children[1]); 11 | return Make(op.types, left, right, op.estimated_cardinality); 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/copy_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/copy_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | CopyStatement::CopyStatement() : SQLStatement(StatementType::COPY_STATEMENT), info(make_uniq()) { 6 | } 7 | 8 | CopyStatement::CopyStatement(const CopyStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | string CopyStatement::ToString() const { 12 | return info->ToString(); 13 | } 14 | 15 | unique_ptr CopyStatement::Copy() const { 16 | return unique_ptr(new CopyStatement(*this)); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/drop_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/drop_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | DropStatement::DropStatement() : SQLStatement(StatementType::DROP_STATEMENT), info(make_uniq()) { 6 | } 7 | 8 | DropStatement::DropStatement(const DropStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr DropStatement::Copy() const { 12 | return unique_ptr(new DropStatement(*this)); 13 | } 14 | 15 | string DropStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_common_arrow.cpp: -------------------------------------------------------------------------------- 1 | #include "src/common/arrow/arrow_appender.cpp" 2 | 3 | #include "src/common/arrow/arrow_converter.cpp" 4 | 5 | #include "src/common/arrow/arrow_type_extension.cpp" 6 | 7 | #include "src/common/arrow/arrow_merge_event.cpp" 8 | 9 | #include "src/common/arrow/arrow_query_result.cpp" 10 | 11 | #include "src/common/arrow/arrow_util.cpp" 12 | 13 | #include "src/common/arrow/arrow_wrapper.cpp" 14 | 15 | #include "src/common/arrow/physical_arrow_collector.cpp" 16 | 17 | #include "src/common/arrow/physical_arrow_batch_collector.cpp" 18 | 19 | #include "src/common/arrow/schema_metadata.cpp" 20 | 21 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution_operator_csv_scanner_sniffer.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp" 2 | 3 | #include "src/execution/operator/csv_scanner/sniffer/dialect_detection.cpp" 4 | 5 | #include "src/execution/operator/csv_scanner/sniffer/header_detection.cpp" 6 | 7 | #include "src/execution/operator/csv_scanner/sniffer/set_columns.cpp" 8 | 9 | #include "src/execution/operator/csv_scanner/sniffer/type_detection.cpp" 10 | 11 | #include "src/execution/operator/csv_scanner/sniffer/type_refinement.cpp" 12 | 13 | #include "src/execution/operator/csv_scanner/sniffer/type_replacement.cpp" 14 | 15 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_unnest.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/projection/physical_unnest.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_unnest.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalUnnest &op) { 8 | D_ASSERT(op.children.size() == 1); 9 | auto &plan = CreatePlan(*op.children[0]); 10 | auto &unnest = Make(op.types, std::move(op.expressions), op.estimated_cardinality); 11 | unnest.children.push_back(plan); 12 | return unnest; 13 | } 14 | 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/duckdb/third_party/mbedtls/include/psa/build_info.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file psa/build_info.h 3 | * 4 | * \brief Build-time PSA configuration info 5 | * 6 | * Include this file if you need to depend on the 7 | * configuration options defined in mbedtls_config.h or MBEDTLS_CONFIG_FILE 8 | * in PSA cryptography core specific files. 9 | */ 10 | /* 11 | * Copyright The Mbed TLS Contributors 12 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 13 | */ 14 | 15 | #ifndef PSA_CRYPTO_BUILD_INFO_H 16 | #define PSA_CRYPTO_BUILD_INFO_H 17 | 18 | #include "mbedtls/build_info.h" 19 | 20 | #endif /* PSA_CRYPTO_BUILD_INFO_H */ 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/quantile_enum.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/quantile_enum.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class QuantileSerializationType : uint8_t { 16 | NON_DECIMAL = 0, 17 | DECIMAL_DISCRETE, 18 | DECIMAL_DISCRETE_LIST, 19 | DECIMAL_CONTINUOUS, 20 | DECIMAL_CONTINUOUS_LIST 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/scan_vector_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/scan_vector_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class ScanVectorType { SCAN_ENTIRE_VECTOR, SCAN_FLAT_VECTOR }; 16 | 17 | enum class ScanVectorMode { REGULAR_SCAN, SCAN_COMMITTED, SCAN_COMMITTED_NO_UPDATES }; 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/adbc/wrappers.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/adbc/wrappers.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb.h" 12 | #include "duckdb/common/string.hpp" 13 | #include "duckdb/common/unordered_map.hpp" 14 | 15 | namespace duckdb { 16 | 17 | struct DuckDBAdbcConnectionWrapper { 18 | duckdb_connection connection; 19 | unordered_map options; 20 | }; 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/optimizer/statistics/expression/propagate_columnref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/optimizer/statistics_propagator.hpp" 2 | #include "duckdb/planner/expression/bound_columnref_expression.hpp" 3 | 4 | namespace duckdb { 5 | 6 | unique_ptr StatisticsPropagator::PropagateExpression(BoundColumnRefExpression &colref, 7 | unique_ptr &expr_ptr) { 8 | auto stats = statistics_map.find(colref.binding); 9 | if (stats == statistics_map.end()) { 10 | return nullptr; 11 | } 12 | return stats->second->ToUnique(); 13 | } 14 | 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/parsed_data/extra_drop_info.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/parsed_data/extra_drop_info.hpp" 2 | 3 | namespace duckdb { 4 | 5 | ExtraDropSecretInfo::ExtraDropSecretInfo() : ExtraDropInfo(ExtraDropInfoType::SECRET_INFO) { 6 | } 7 | 8 | ExtraDropSecretInfo::ExtraDropSecretInfo(const ExtraDropSecretInfo &info) 9 | : ExtraDropInfo(ExtraDropInfoType::SECRET_INFO) { 10 | persist_mode = info.persist_mode; 11 | secret_storage = info.secret_storage; 12 | } 13 | 14 | unique_ptr ExtraDropSecretInfo::Copy() const { 15 | return std::move(make_uniq(*this)); 16 | } 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/extension/core_functions/include/core_functions_extension.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // core_functions_extension.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb.hpp" 12 | 13 | namespace duckdb { 14 | 15 | class CoreFunctionsExtension : public Extension { 16 | public: 17 | void Load(ExtensionLoader &db) override; 18 | std::string Name() override; 19 | std::string Version() const override; 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/named_parameter_map.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/named_parameter_map.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/case_insensitive_map.hpp" 12 | #include "duckdb/common/types.hpp" 13 | namespace duckdb { 14 | 15 | using named_parameter_type_map_t = case_insensitive_map_t; 16 | using named_parameter_map_t = case_insensitive_map_t; 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_delim_get.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/scan/physical_column_data_scan.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_delim_get.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalDelimGet &op) { 8 | // Create a PhysicalChunkScan without an owned_collection. 9 | // We'll add the collection later. 10 | D_ASSERT(op.children.empty()); 11 | return Make(op.types, PhysicalOperatorType::DELIM_SCAN, op.estimated_cardinality, nullptr); 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/checkpoint_abort.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/checkpoint_abort.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/common.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class CheckpointAbort : uint8_t { 16 | NO_ABORT = 0, 17 | DEBUG_ABORT_BEFORE_TRUNCATE = 1, 18 | DEBUG_ABORT_BEFORE_HEADER = 2, 19 | DEBUG_ABORT_AFTER_FREE_LIST_WRITE = 3 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/pragma_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/pragma_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | PragmaStatement::PragmaStatement() : SQLStatement(StatementType::PRAGMA_STATEMENT), info(make_uniq()) { 6 | } 7 | 8 | PragmaStatement::PragmaStatement(const PragmaStatement &other) : SQLStatement(other), info(other.info->Copy()) { 9 | } 10 | 11 | unique_ptr PragmaStatement::Copy() const { 12 | return unique_ptr(new PragmaStatement(*this)); 13 | } 14 | 15 | string PragmaStatement::ToString() const { 16 | return info->ToString(); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/bind_delimgetref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/tableref/delimgetref.hpp" 2 | #include "duckdb/planner/binder.hpp" 3 | #include "duckdb/planner/tableref/bound_delimgetref.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::Bind(DelimGetRef &ref) { 8 | // Have to add bindings 9 | idx_t tbl_idx = GenerateTableIndex(); 10 | string internal_name = "__internal_delim_get_ref_" + std::to_string(tbl_idx); 11 | bind_context.AddGenericBinding(tbl_idx, internal_name, ref.internal_aliases, ref.types); 12 | 13 | return make_uniq(tbl_idx, ref.types); 14 | } 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_simple.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_simple.hpp" 2 | #include "duckdb/parser/parsed_data/alter_info.hpp" 3 | #include "duckdb/parser/parsed_data/attach_info.hpp" 4 | #include "duckdb/parser/parsed_data/drop_info.hpp" 5 | #include "duckdb/parser/parsed_data/load_info.hpp" 6 | #include "duckdb/parser/parsed_data/transaction_info.hpp" 7 | #include "duckdb/parser/parsed_data/vacuum_info.hpp" 8 | #include "duckdb/parser/parsed_data/detach_info.hpp" 9 | 10 | namespace duckdb { 11 | 12 | idx_t LogicalSimple::EstimateCardinality(ClientContext &context) { 13 | return 1; 14 | } 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_column_data_get.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/scan/physical_column_data_scan.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_column_data_get.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalColumnDataGet &op) { 8 | D_ASSERT(op.children.empty()); 9 | D_ASSERT(op.collection); 10 | return Make(op.types, PhysicalOperatorType::COLUMN_DATA_SCAN, op.estimated_cardinality, 11 | std::move(op.collection)); 12 | } 13 | 14 | } // namespace duckdb 15 | -------------------------------------------------------------------------------- /src/duckdb/third_party/brotli/enc/dictionary_hash.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2015 Google Inc. All Rights Reserved. 2 | 3 | Distributed under MIT license. 4 | See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 5 | */ 6 | 7 | /* Hash table on the 4-byte prefixes of static dictionary words. */ 8 | 9 | #ifndef BROTLI_ENC_DICTIONARY_HASH_H_ 10 | #define BROTLI_ENC_DICTIONARY_HASH_H_ 11 | 12 | #include 13 | 14 | namespace duckdb_brotli { 15 | 16 | extern const uint16_t kStaticDictionaryHashWords[32768]; 17 | extern const uint8_t kStaticDictionaryHashLengths[32768]; 18 | 19 | } 20 | 21 | #endif /* BROTLI_ENC_DICTIONARY_HASH_H_ */ 22 | -------------------------------------------------------------------------------- /src/duckdb/extension/jemalloc/jemalloc/include/jemalloc/internal/bin_types.h: -------------------------------------------------------------------------------- 1 | #ifndef JEMALLOC_INTERNAL_BIN_TYPES_H 2 | #define JEMALLOC_INTERNAL_BIN_TYPES_H 3 | 4 | #include "jemalloc/internal/jemalloc_preamble.h" 5 | #include "jemalloc/internal/sc.h" 6 | 7 | #define BIN_SHARDS_MAX (1 << EDATA_BITS_BINSHARD_WIDTH) 8 | #define N_BIN_SHARDS_DEFAULT 1 9 | 10 | /* Used in TSD static initializer only. Real init in arena_bind(). */ 11 | #define TSD_BINSHARDS_ZERO_INITIALIZER {{UINT8_MAX}} 12 | 13 | typedef struct tsd_binshards_s tsd_binshards_t; 14 | struct tsd_binshards_s { 15 | uint8_t binshard[SC_NBINS]; 16 | }; 17 | 18 | #endif /* JEMALLOC_INTERNAL_BIN_TYPES_H */ 19 | -------------------------------------------------------------------------------- /src/duckdb/src/function/cast/pointer_cast.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/function/cast/default_casts.hpp" 2 | #include "duckdb/function/cast/vector_cast_helpers.hpp" 3 | 4 | namespace duckdb { 5 | 6 | BoundCastInfo DefaultCasts::PointerCastSwitch(BindCastInput &input, const LogicalType &source, 7 | const LogicalType &target) { 8 | // now switch on the result type 9 | switch (target.id()) { 10 | case LogicalTypeId::VARCHAR: 11 | // pointer to varchar 12 | return BoundCastInfo(&VectorCastHelpers::StringCast); 13 | default: 14 | return nullptr; 15 | } 16 | } 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/types/sel_cache.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/types/sel_cache.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/types/vector_buffer.hpp" 12 | #include "duckdb/common/unordered_map.hpp" 13 | 14 | namespace duckdb { 15 | 16 | //! Selection vector cache used for caching vector slices 17 | struct SelCache { 18 | unordered_map> cache; 19 | }; 20 | 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/parallel/task_notifier.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parallel/task_notifier.hpp" 2 | #include "duckdb/main/client_context.hpp" 3 | #include "duckdb/main/client_context_state.hpp" 4 | 5 | namespace duckdb { 6 | 7 | TaskNotifier::TaskNotifier(optional_ptr context_p) : context(context_p) { 8 | if (context) { 9 | for (auto &state : context->registered_state->States()) { 10 | state->OnTaskStart(*context); 11 | } 12 | } 13 | } 14 | 15 | TaskNotifier::~TaskNotifier() { 16 | if (context) { 17 | for (auto &state : context->registered_state->States()) { 18 | state->OnTaskStop(*context); 19 | } 20 | } 21 | } 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/storage/index.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/storage/index.hpp" 2 | #include "duckdb/common/radix.hpp" 3 | #include "duckdb/common/serializer/serializer.hpp" 4 | 5 | namespace duckdb { 6 | 7 | Index::Index(const vector &column_ids, TableIOManager &table_io_manager, AttachedDatabase &db) 8 | 9 | : column_ids(column_ids), table_io_manager(table_io_manager), db(db) { 10 | 11 | if (!Radix::IsLittleEndian()) { 12 | throw NotImplementedException("indexes are not supported on big endian architectures"); 13 | } 14 | // create the column id set 15 | column_id_set.insert(column_ids.begin(), column_ids.end()); 16 | } 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/extension/core_functions/scalar/generic/hash.cpp: -------------------------------------------------------------------------------- 1 | #include "core_functions/scalar/generic_functions.hpp" 2 | 3 | namespace duckdb { 4 | 5 | static void HashFunction(DataChunk &args, ExpressionState &state, Vector &result) { 6 | args.Hash(result); 7 | if (args.AllConstant()) { 8 | result.SetVectorType(VectorType::CONSTANT_VECTOR); 9 | } 10 | } 11 | 12 | ScalarFunction HashFun::GetFunction() { 13 | auto hash_fun = ScalarFunction({LogicalType::ANY}, LogicalType::HASH, HashFunction); 14 | hash_fun.varargs = LogicalType::ANY; 15 | hash_fun.null_handling = FunctionNullHandling::SPECIAL_HANDLING; 16 | return hash_fun; 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/common/types/vector_constants.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/types/vector.hpp" 2 | 3 | namespace duckdb { 4 | 5 | const SelectionVector *ConstantVector::ZeroSelectionVector() { 6 | static const SelectionVector ZERO_SELECTION_VECTOR = 7 | SelectionVector(const_cast(ConstantVector::ZERO_VECTOR)); // NOLINT 8 | return &ZERO_SELECTION_VECTOR; 9 | } 10 | 11 | const SelectionVector *FlatVector::IncrementalSelectionVector() { 12 | static const SelectionVector INCREMENTAL_SELECTION_VECTOR; 13 | return &INCREMENTAL_SELECTION_VECTOR; 14 | } 15 | 16 | const sel_t ConstantVector::ZERO_VECTOR[STANDARD_VECTOR_SIZE] = {0}; 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_subqueryref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/binder.hpp" 2 | #include "duckdb/planner/tableref/bound_subqueryref.hpp" 3 | 4 | namespace duckdb { 5 | 6 | unique_ptr Binder::CreatePlan(BoundSubqueryRef &ref) { 7 | // generate the logical plan for the subquery 8 | // this happens separately from the current LogicalPlan generation 9 | ref.binder->is_outside_flattened = is_outside_flattened; 10 | auto subquery = ref.binder->CreatePlan(*ref.subquery); 11 | if (ref.binder->has_unplanned_dependent_joins) { 12 | has_unplanned_dependent_joins = true; 13 | } 14 | return subquery; 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_catalog.cpp: -------------------------------------------------------------------------------- 1 | #include "src/catalog/catalog_entry.cpp" 2 | 3 | #include "src/catalog/catalog_entry_retriever.cpp" 4 | 5 | #include "src/catalog/catalog.cpp" 6 | 7 | #include "src/catalog/catalog_search_path.cpp" 8 | 9 | #include "src/catalog/catalog_set.cpp" 10 | 11 | #include "src/catalog/catalog_transaction.cpp" 12 | 13 | #include "src/catalog/duck_catalog.cpp" 14 | 15 | #include "src/catalog/dependency_manager.cpp" 16 | 17 | #include "src/catalog/dependency_list.cpp" 18 | 19 | #include "src/catalog/dependency_catalog_set.cpp" 20 | 21 | #include "src/catalog/entry_lookup_info.cpp" 22 | 23 | #include "src/catalog/similar_catalog_entry.cpp" 24 | 25 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/pending_execution_result.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/pending_execution_result.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class PendingExecutionResult : uint8_t { 16 | RESULT_READY, 17 | RESULT_NOT_READY, 18 | EXECUTION_ERROR, 19 | BLOCKED, 20 | NO_TASKS_AVAILABLE, 21 | EXECUTION_FINISHED 22 | }; 23 | 24 | } // namespace duckdb 25 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/likely.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/likely.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #if __GNUC__ 12 | #define DUCKDB_BUILTIN_EXPECT(cond, expected_value) (__builtin_expect(cond, expected_value)) 13 | #else 14 | #define DUCKDB_BUILTIN_EXPECT(cond, expected_value) (cond) 15 | #endif 16 | 17 | #define DUCKDB_LIKELY(...) DUCKDB_BUILTIN_EXPECT((__VA_ARGS__), 1) 18 | #define DUCKDB_UNLIKELY(...) DUCKDB_BUILTIN_EXPECT((__VA_ARGS__), 0) 19 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/progress_bar/progress_bar_display.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/progress_bar/progress_bar_display.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | namespace duckdb { 12 | 13 | class ProgressBarDisplay { 14 | public: 15 | ProgressBarDisplay() { 16 | } 17 | virtual ~ProgressBarDisplay() { 18 | } 19 | 20 | public: 21 | virtual void Update(double percentage) = 0; 22 | virtual void Finish() = 0; 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/operator/logical_top_n.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/operator/logical_top_n.hpp" 2 | 3 | namespace duckdb { 4 | 5 | LogicalTopN::LogicalTopN(vector orders, idx_t limit, idx_t offset) 6 | : LogicalOperator(LogicalOperatorType::LOGICAL_TOP_N), orders(std::move(orders)), limit(limit), offset(offset) { 7 | } 8 | 9 | LogicalTopN::~LogicalTopN() { 10 | } 11 | 12 | idx_t LogicalTopN::EstimateCardinality(ClientContext &context) { 13 | auto child_cardinality = LogicalOperator::EstimateCardinality(context); 14 | if (child_cardinality < limit) { 15 | return child_cardinality; 16 | } 17 | return limit; 18 | } 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: DuckDB JDBC Driver 4 | Bundle-SymbolicName: org.duckdb.duckdb_jdbc 5 | Bundle-Version: 1.5.0.0 6 | Bundle-Vendor: DuckDB Labs 7 | Bundle-Description: A JDBC-compliant driver for the DuckDB data management system 8 | Bundle-License: https://raw.githubusercontent.com/duckdb/duckdb/main/LICENSE 9 | Bundle-DocURL: https://www.duckdb.org 10 | Bundle-ContactAddress: mark@duckdblabs.com 11 | Bundle-Copyright: Copyright (c) DuckDB Labs 12 | Export-Package: org.duckdb, org.duckdb.io, org.duckdb.user 13 | Import-Package: javax.sql, org.osgi.framework;resolution:=optional 14 | Automatic-Module-Name: duckdb.jdbc 15 | -------------------------------------------------------------------------------- /src/duckdb/src/common/arrow/appender/null_data.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/arrow/arrow_appender.hpp" 2 | #include "duckdb/common/arrow/appender/null_data.hpp" 3 | 4 | namespace duckdb { 5 | 6 | void ArrowNullData::Initialize(ArrowAppendData &result, const LogicalType &type, idx_t capacity) { 7 | // nop 8 | } 9 | 10 | void ArrowNullData::Append(ArrowAppendData &append_data, Vector &input, idx_t from, idx_t to, idx_t input_size) { 11 | idx_t size = to - from; 12 | append_data.row_count += size; 13 | } 14 | 15 | void ArrowNullData::Finalize(ArrowAppendData &append_data, const LogicalType &type, ArrowArray *result) { 16 | result->n_buffers = 0; 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/copy_overwrite_mode.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/copy_overwrite_mode.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | #include "duckdb/common/vector.hpp" 13 | 14 | namespace duckdb { 15 | 16 | enum class CopyOverwriteMode : uint8_t { 17 | COPY_ERROR_ON_CONFLICT = 0, 18 | COPY_OVERWRITE = 1, 19 | COPY_OVERWRITE_OR_IGNORE = 2, 20 | COPY_APPEND = 3 21 | }; 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/cte_materialize.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/cte_materialize.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class CTEMaterialize : uint8_t { 16 | CTE_MATERIALIZE_DEFAULT = 1, /* no option specified */ 17 | CTE_MATERIALIZE_ALWAYS = 2, /* MATERIALIZED */ 18 | CTE_MATERIALIZE_NEVER = 3 /* NOT MATERIALIZED */ 19 | }; 20 | 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/optimizer/regex_range_filter.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/optimizer/regex_range_filter.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/optimizer/rule.hpp" 12 | 13 | namespace duckdb { 14 | 15 | class Optimizer; 16 | 17 | class RegexRangeFilter { 18 | public: 19 | RegexRangeFilter() { 20 | } 21 | //! Perform filter pushdown 22 | unique_ptr Rewrite(unique_ptr op); 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/ustrfmt.h: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ********************************************************************** 5 | * Copyright (C) 2001-2006, International Business Machines 6 | * Corporation and others. All Rights Reserved. 7 | ********************************************************************** 8 | */ 9 | 10 | #ifndef USTRFMT_H 11 | #define USTRFMT_H 12 | 13 | #include "unicode/utypes.h" 14 | 15 | U_CAPI int32_t U_EXPORT2 16 | uprv_itou (UChar * buffer, int32_t capacity, uint32_t i, uint32_t radix, int32_t minwidth); 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/filter_propagate_result.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/filter_propagate_result.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class FilterPropagateResult : uint8_t { 16 | NO_PRUNING_POSSIBLE = 0, 17 | FILTER_ALWAYS_TRUE = 1, 18 | FILTER_ALWAYS_FALSE = 2, 19 | FILTER_TRUE_OR_NULL = 3, 20 | FILTER_FALSE_OR_NULL = 4 21 | }; 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parser/parser_options.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/parser/parser_options.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/common.hpp" 12 | 13 | namespace duckdb { 14 | class ParserExtension; 15 | 16 | struct ParserOptions { 17 | bool preserve_identifier_case = true; 18 | bool integer_division = false; 19 | idx_t max_expression_depth = 1000; 20 | const vector *extensions = nullptr; 21 | }; 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/planner/bound_statement.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/planner/bound_statement.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/string.hpp" 12 | #include "duckdb/common/vector.hpp" 13 | 14 | namespace duckdb { 15 | 16 | class LogicalOperator; 17 | struct LogicalType; 18 | 19 | struct BoundStatement { 20 | unique_ptr plan; 21 | vector types; 22 | vector names; 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_execution.cpp: -------------------------------------------------------------------------------- 1 | #include "src/execution/adaptive_filter.cpp" 2 | 3 | #include "src/execution/aggregate_hashtable.cpp" 4 | 5 | #include "src/execution/base_aggregate_hashtable.cpp" 6 | 7 | #include "src/execution/column_binding_resolver.cpp" 8 | 9 | #include "src/execution/expression_executor.cpp" 10 | 11 | #include "src/execution/expression_executor_state.cpp" 12 | 13 | #include "src/execution/join_hashtable.cpp" 14 | 15 | #include "src/execution/perfect_aggregate_hashtable.cpp" 16 | 17 | #include "src/execution/physical_operator.cpp" 18 | 19 | #include "src/execution/physical_plan_generator.cpp" 20 | 21 | #include "src/execution/radix_partitioned_hashtable.cpp" 22 | 23 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/cgroups.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/cgroups.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/common.hpp" 12 | #include "duckdb/common/optional_idx.hpp" 13 | #include "duckdb/common/file_system.hpp" 14 | 15 | namespace duckdb { 16 | 17 | class CGroups { 18 | public: 19 | static optional_idx GetMemoryLimit(FileSystem &fs); 20 | static idx_t GetCPULimit(FileSystem &fs, idx_t physical_cores); 21 | }; 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/stream_execution_result.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/stream_execution_result.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class StreamExecutionResult : uint8_t { 16 | CHUNK_READY, 17 | CHUNK_NOT_READY, 18 | EXECUTION_ERROR, 19 | EXECUTION_CANCELLED, 20 | BLOCKED, 21 | NO_TASKS_AVAILABLE, 22 | EXECUTION_FINISHED 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/extension_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/extension_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | ExtensionStatement::ExtensionStatement(ParserExtension extension_p, unique_ptr parse_data_p) 6 | : SQLStatement(StatementType::EXTENSION_STATEMENT), extension(std::move(extension_p)), 7 | parse_data(std::move(parse_data_p)) { 8 | } 9 | 10 | unique_ptr ExtensionStatement::Copy() const { 11 | return make_uniq(extension, parse_data->Copy()); 12 | } 13 | 14 | string ExtensionStatement::ToString() const { 15 | return parse_data->ToString(); 16 | } 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/vacuum_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/vacuum_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | VacuumStatement::VacuumStatement(const VacuumOptions &options) 6 | : SQLStatement(StatementType::VACUUM_STATEMENT), info(make_uniq(options)) { 7 | } 8 | 9 | VacuumStatement::VacuumStatement(const VacuumStatement &other) : SQLStatement(other), info(other.info->Copy()) { 10 | } 11 | 12 | unique_ptr VacuumStatement::Copy() const { 13 | return unique_ptr(new VacuumStatement(*this)); 14 | } 15 | 16 | string VacuumStatement::ToString() const { 17 | return info->ToString(); 18 | } 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/transform/statement/transform_detach.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/transformer.hpp" 2 | #include "duckdb/parser/statement/detach_statement.hpp" 3 | #include "duckdb/parser/expression/constant_expression.hpp" 4 | #include "duckdb/common/string_util.hpp" 5 | 6 | namespace duckdb { 7 | 8 | unique_ptr Transformer::TransformDetach(duckdb_libpgquery::PGDetachStmt &stmt) { 9 | auto result = make_uniq(); 10 | auto info = make_uniq(); 11 | info->name = stmt.db_name; 12 | info->if_not_found = TransformOnEntryNotFound(stmt.missing_ok); 13 | 14 | result->info = std::move(info); 15 | return result; 16 | } 17 | 18 | } // namespace duckdb 19 | -------------------------------------------------------------------------------- /src/duckdb/third_party/brotli/common/platform.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 Google Inc. All Rights Reserved. 2 | 3 | Distributed under MIT license. 4 | See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 5 | */ 6 | 7 | #include 8 | 9 | #include 10 | 11 | #include "brotli_platform.h" 12 | 13 | 14 | /* Default brotli_alloc_func */ 15 | void* duckdb_brotli::BrotliDefaultAllocFunc(void* opaque, size_t size) { 16 | BROTLI_UNUSED(opaque); 17 | return malloc(size); 18 | } 19 | 20 | /* Default brotli_free_func */ 21 | void duckdb_brotli::BrotliDefaultFreeFunc(void* opaque, void* address) { 22 | BROTLI_UNUSED(opaque); 23 | free(address); 24 | } 25 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enum_class_hash.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enum_class_hash.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | /* For compatibility with older C++ STL, an explicit hash class 15 | is required for enums with C++ sets and maps */ 16 | struct EnumClassHash { 17 | template 18 | std::size_t operator()(T t) const { 19 | return static_cast(t); 20 | } 21 | }; 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/storage/table/delete_state.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/storage/table/delete_state.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/storage/table/append_state.hpp" 12 | 13 | namespace duckdb { 14 | class TableCatalogEntry; 15 | 16 | struct TableDeleteState { 17 | unique_ptr constraint_state; 18 | bool has_delete_constraints = false; 19 | DataChunk verify_chunk; 20 | vector col_ids; 21 | }; 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/planner/binder/tableref/plan_column_data_ref.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/binder.hpp" 2 | #include "duckdb/planner/tableref/bound_column_data_ref.hpp" 3 | #include "duckdb/planner/operator/logical_column_data_get.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Binder::CreatePlan(BoundColumnDataRef &ref) { 8 | auto types = ref.collection->Types(); 9 | // Create a (potentially owning) LogicalColumnDataGet 10 | auto root = make_uniq_base(ref.bind_index, std::move(types), 11 | std::move(ref.collection)); 12 | return root; 13 | } 14 | 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_optimizer_join_order.cpp: -------------------------------------------------------------------------------- 1 | #include "src/optimizer/join_order/query_graph.cpp" 2 | 3 | #include "src/optimizer/join_order/join_relation_set.cpp" 4 | 5 | #include "src/optimizer/join_order/join_node.cpp" 6 | 7 | #include "src/optimizer/join_order/join_order_optimizer.cpp" 8 | 9 | #include "src/optimizer/join_order/cardinality_estimator.cpp" 10 | 11 | #include "src/optimizer/join_order/cost_model.cpp" 12 | 13 | #include "src/optimizer/join_order/plan_enumerator.cpp" 14 | 15 | #include "src/optimizer/join_order/relation_manager.cpp" 16 | 17 | #include "src/optimizer/join_order/query_graph_manager.cpp" 18 | 19 | #include "src/optimizer/join_order/relation_statistics_helper.cpp" 20 | 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/debug_vector_verification.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/debug_vector_verification.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class DebugVectorVerification : uint8_t { 16 | NONE, 17 | DICTIONARY_EXPRESSION, 18 | DICTIONARY_OPERATOR, 19 | CONSTANT_OPERATOR, 20 | SEQUENCE_OPERATOR, 21 | NESTED_SHUFFLE, 22 | VARIANT_VECTOR 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/undo_flags.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/undo_flags.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class UndoFlags : uint32_t { // far too big but aligned (TM) 16 | EMPTY_ENTRY = 0, 17 | CATALOG_ENTRY = 1, 18 | INSERT_TUPLE = 2, 19 | DELETE_TUPLE = 3, 20 | UPDATE_TUPLE = 4, 21 | SEQUENCE_VALUE = 5, 22 | ATTACHED_DATABASE = 6 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/storage/compression/bitpacking.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/storage/compression/bitpacking.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/string_util.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class BitpackingMode : uint8_t { INVALID, AUTO, CONSTANT, CONSTANT_DELTA, DELTA_FOR, FOR }; 16 | 17 | BitpackingMode BitpackingModeFromString(const string &str); 18 | string BitpackingModeToString(const BitpackingMode &mode); 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/planner/tableref/list.hpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/planner/tableref/bound_basetableref.hpp" 2 | #include "duckdb/planner/tableref/bound_cteref.hpp" 3 | #include "duckdb/planner/tableref/bound_dummytableref.hpp" 4 | #include "duckdb/planner/tableref/bound_expressionlistref.hpp" 5 | #include "duckdb/planner/tableref/bound_joinref.hpp" 6 | #include "duckdb/planner/tableref/bound_subqueryref.hpp" 7 | #include "duckdb/planner/tableref/bound_column_data_ref.hpp" 8 | #include "duckdb/planner/tableref/bound_table_function.hpp" 9 | #include "duckdb/planner/tableref/bound_pivotref.hpp" 10 | #include "duckdb/parser/tableref/delimgetref.hpp" 11 | #include "duckdb/planner/tableref/bound_delimgetref.hpp" 12 | -------------------------------------------------------------------------------- /src/duckdb/src/optimizer/join_order/join_node.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/optimizer/join_order/join_node.hpp" 2 | 3 | #include "duckdb/common/limits.hpp" 4 | #include "duckdb/planner/expression/list.hpp" 5 | #include "duckdb/planner/operator/list.hpp" 6 | 7 | namespace duckdb { 8 | 9 | DPJoinNode::DPJoinNode(JoinRelationSet &set) : set(set), info(nullptr), is_leaf(true), left_set(set), right_set(set) { 10 | } 11 | 12 | DPJoinNode::DPJoinNode(JoinRelationSet &set, optional_ptr info, JoinRelationSet &left, 13 | JoinRelationSet &right, double cost) 14 | : set(set), info(info), is_leaf(false), left_set(left), right_set(right), cost(cost) { 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/call_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/call_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | CallStatement::CallStatement() : SQLStatement(StatementType::CALL_STATEMENT) { 6 | } 7 | 8 | CallStatement::CallStatement(const CallStatement &other) : SQLStatement(other), function(other.function->Copy()) { 9 | } 10 | 11 | unique_ptr CallStatement::Copy() const { 12 | return unique_ptr(new CallStatement(*this)); 13 | } 14 | 15 | string CallStatement::ToString() const { 16 | string result = ""; 17 | result += "CALL"; 18 | result += " " + function->ToString(); 19 | result += ";"; 20 | return result; 21 | } 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/transform/statement/transform_export.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/export_statement.hpp" 2 | #include "duckdb/parser/transformer.hpp" 3 | 4 | namespace duckdb { 5 | 6 | unique_ptr Transformer::TransformExport(duckdb_libpgquery::PGExportStmt &stmt) { 7 | auto info = make_uniq(); 8 | info->file_path = stmt.filename; 9 | info->format = "csv"; 10 | info->is_from = false; 11 | // handle export options 12 | TransformCopyOptions(*info, stmt.options); 13 | 14 | auto result = make_uniq(std::move(info)); 15 | if (stmt.database) { 16 | result->database = stmt.database; 17 | } 18 | return result; 19 | } 20 | 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/merge_action_type.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/merge_action_type.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class MergeActionType : uint8_t { MERGE_UPDATE, MERGE_DELETE, MERGE_INSERT, MERGE_DO_NOTHING, MERGE_ERROR }; 16 | 17 | enum class MergeActionCondition : uint8_t { WHEN_MATCHED, WHEN_NOT_MATCHED_BY_SOURCE, WHEN_NOT_MATCHED_BY_TARGET }; 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/transform/expression/transform_positional_reference.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/common/exception.hpp" 2 | #include "duckdb/parser/transformer.hpp" 3 | #include "duckdb/parser/expression/positional_reference_expression.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr Transformer::TransformPositionalReference(duckdb_libpgquery::PGPositionalReference &node) { 8 | if (node.position <= 0) { 9 | throw ParserException("Positional reference node needs to be >= 1"); 10 | } 11 | auto result = make_uniq(NumericCast(node.position)); 12 | SetQueryLocation(*result, node.location); 13 | return std::move(result); 14 | } 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_parser_tableref.cpp: -------------------------------------------------------------------------------- 1 | #include "src/parser/tableref/at_clause.cpp" 2 | 3 | #include "src/parser/tableref/basetableref.cpp" 4 | 5 | #include "src/parser/tableref/bound_ref_wrapper.cpp" 6 | 7 | #include "src/parser/tableref/delimgetref.cpp" 8 | 9 | #include "src/parser/tableref/emptytableref.cpp" 10 | 11 | #include "src/parser/tableref/expressionlistref.cpp" 12 | 13 | #include "src/parser/tableref/column_data_ref.cpp" 14 | 15 | #include "src/parser/tableref/joinref.cpp" 16 | 17 | #include "src/parser/tableref/pivotref.cpp" 18 | 19 | #include "src/parser/tableref/showref.cpp" 20 | 21 | #include "src/parser/tableref/subqueryref.cpp" 22 | 23 | #include "src/parser/tableref/table_function.cpp" 24 | 25 | -------------------------------------------------------------------------------- /src/duckdb/ub_src_transaction.cpp: -------------------------------------------------------------------------------- 1 | #include "src/transaction/duck_transaction_manager.cpp" 2 | 3 | #include "src/transaction/duck_transaction.cpp" 4 | 5 | #include "src/transaction/meta_transaction.cpp" 6 | 7 | #include "src/transaction/undo_buffer_allocator.cpp" 8 | 9 | #include "src/transaction/undo_buffer.cpp" 10 | 11 | #include "src/transaction/transaction_context.cpp" 12 | 13 | #include "src/transaction/transaction.cpp" 14 | 15 | #include "src/transaction/transaction_manager.cpp" 16 | 17 | #include "src/transaction/commit_state.cpp" 18 | 19 | #include "src/transaction/rollback_state.cpp" 20 | 21 | #include "src/transaction/cleanup_state.cpp" 22 | 23 | #include "src/transaction/wal_write_state.cpp" 24 | 25 | -------------------------------------------------------------------------------- /src/duckdb/extension/icu/third_party/icu/common/resource.cpp: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ******************************************************************************* 5 | * Copyright (C) 2015-2016, International Business Machines 6 | * Corporation and others. All Rights Reserved. 7 | ******************************************************************************* 8 | * resource.cpp 9 | * 10 | * created on: 2015nov04 11 | * created by: Markus W. Scherer 12 | */ 13 | 14 | #include "resource.h" 15 | 16 | U_NAMESPACE_BEGIN 17 | 18 | ResourceValue::~ResourceValue() {} 19 | 20 | ResourceSink::~ResourceSink() {} 21 | 22 | U_NAMESPACE_END 23 | -------------------------------------------------------------------------------- /src/duckdb/src/catalog/similar_catalog_entry.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/catalog/similar_catalog_entry.hpp" 2 | #include "duckdb/catalog/catalog_entry/schema_catalog_entry.hpp" 3 | #include "duckdb/catalog/catalog.hpp" 4 | 5 | namespace duckdb { 6 | 7 | string SimilarCatalogEntry::GetQualifiedName(bool qualify_catalog, bool qualify_schema) const { 8 | D_ASSERT(Found()); 9 | string result; 10 | if (qualify_catalog) { 11 | result += schema->catalog.GetName(); 12 | } 13 | if (qualify_schema) { 14 | if (!result.empty()) { 15 | result += "."; 16 | } 17 | result += schema->name; 18 | } 19 | if (!result.empty()) { 20 | result += "."; 21 | } 22 | result += name; 23 | return result; 24 | } 25 | 26 | } // namespace duckdb 27 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/enums/tuple_data_layout_enums.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/enums/tuple_data_layout_enums.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/constants.hpp" 12 | 13 | namespace duckdb { 14 | 15 | enum class TupleDataValidityType : uint8_t { 16 | CAN_HAVE_NULL_VALUES = 0, 17 | CANNOT_HAVE_NULL_VALUES = 1, 18 | }; 19 | 20 | enum class TupleDataNestednessType : uint8_t { 21 | TOP_LEVEL_LAYOUT = 0, 22 | NESTED_STRUCT_LAYOUT = 1, 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/function/cast_rules.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/function/cast_rules.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/types.hpp" 12 | 13 | namespace duckdb { 14 | //! Contains a list of rules for casting 15 | class CastRules { 16 | public: 17 | //! Returns the cost of performing an implicit cost from "from" to "to", or -1 if an implicit cast is not possible 18 | static int64_t ImplicitCast(const LogicalType &from, const LogicalType &to); 19 | }; 20 | 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/transform/expression/transform_grouping_function.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/transformer.hpp" 2 | #include "duckdb/parser/expression/operator_expression.hpp" 3 | 4 | namespace duckdb { 5 | 6 | unique_ptr Transformer::TransformGroupingFunction(duckdb_libpgquery::PGGroupingFunc &grouping) { 7 | auto op = make_uniq(ExpressionType::GROUPING_FUNCTION); 8 | for (auto node = grouping.args->head; node; node = node->next) { 9 | auto n = PGPointerCast(node->data.ptr_value); 10 | op->children.push_back(TransformExpression(n)); 11 | } 12 | SetQueryLocation(*op, grouping.location); 13 | return std::move(op); 14 | } 15 | 16 | } // namespace duckdb 17 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parallel/pipeline_finish_event.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/parallel/pipeline_finish_event.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/parallel/base_pipeline_event.hpp" 12 | 13 | namespace duckdb { 14 | class Executor; 15 | 16 | class PipelineFinishEvent : public BasePipelineEvent { 17 | public: 18 | explicit PipelineFinishEvent(shared_ptr pipeline); 19 | 20 | public: 21 | void Schedule() override; 22 | void FinishEvent() override; 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/storage/compression/chimp/algorithm/bit_utils.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/storage/compression/chimp/algorithm/bit_utils.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/common/numeric_utils.hpp" 12 | 13 | namespace duckdb { 14 | 15 | template 16 | struct BitUtils { 17 | static constexpr R Mask(unsigned int const bits) { 18 | return UnsafeNumericCast((((uint64_t)(bits < (sizeof(R) * 8))) << (bits & ((sizeof(R) * 8) - 1))) - 1U); 19 | } 20 | }; 21 | 22 | } // namespace duckdb 23 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/physical_plan/plan_top_n.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/order/physical_top_n.hpp" 2 | #include "duckdb/execution/physical_plan_generator.hpp" 3 | #include "duckdb/planner/operator/logical_top_n.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalTopN &op) { 8 | D_ASSERT(op.children.size() == 1); 9 | auto &plan = CreatePlan(*op.children[0]); 10 | auto &top_n = 11 | Make(op.types, std::move(op.orders), NumericCast(op.limit), NumericCast(op.offset), 12 | std::move(op.dynamic_filter), op.estimated_cardinality); 13 | top_n.children.push_back(plan); 14 | return top_n; 15 | } 16 | 17 | } // namespace duckdb 18 | -------------------------------------------------------------------------------- /src/main/java/org/duckdb/DuckDBColumnType.java: -------------------------------------------------------------------------------- 1 | package org.duckdb; 2 | 3 | public enum DuckDBColumnType { 4 | BOOLEAN, 5 | TINYINT, 6 | SMALLINT, 7 | INTEGER, 8 | BIGINT, 9 | UTINYINT, 10 | USMALLINT, 11 | UINTEGER, 12 | UBIGINT, 13 | HUGEINT, 14 | UHUGEINT, 15 | FLOAT, 16 | DOUBLE, 17 | DECIMAL, 18 | VARCHAR, 19 | BLOB, 20 | TIME, 21 | DATE, 22 | TIMESTAMP, 23 | TIMESTAMP_MS, 24 | TIMESTAMP_NS, 25 | TIMESTAMP_S, 26 | TIMESTAMP_WITH_TIME_ZONE, 27 | BIT, 28 | TIME_WITH_TIME_ZONE, 29 | INTERVAL, 30 | LIST, 31 | STRUCT, 32 | ENUM, 33 | UUID, 34 | JSON, 35 | MAP, 36 | ARRAY, 37 | UNKNOWN, 38 | UNION; 39 | } 40 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/common/chrono.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/common/chrono.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | namespace duckdb { 14 | using std::chrono::duration; 15 | using std::chrono::duration_cast; 16 | using std::chrono::high_resolution_clock; 17 | using std::chrono::microseconds; 18 | using std::chrono::milliseconds; 19 | using std::chrono::nanoseconds; 20 | using std::chrono::steady_clock; 21 | using std::chrono::system_clock; 22 | using std::chrono::time_point; 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/expression/default_expression.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/expression/default_expression.hpp" 2 | 3 | #include "duckdb/common/exception.hpp" 4 | 5 | #include "duckdb/common/serializer/serializer.hpp" 6 | #include "duckdb/common/serializer/deserializer.hpp" 7 | 8 | namespace duckdb { 9 | 10 | DefaultExpression::DefaultExpression() : ParsedExpression(ExpressionType::VALUE_DEFAULT, ExpressionClass::DEFAULT) { 11 | } 12 | 13 | string DefaultExpression::ToString() const { 14 | return "DEFAULT"; 15 | } 16 | 17 | unique_ptr DefaultExpression::Copy() const { 18 | auto copy = make_uniq(); 19 | copy->CopyProperties(*this); 20 | return std::move(copy); 21 | } 22 | 23 | } // namespace duckdb 24 | -------------------------------------------------------------------------------- /src/duckdb/src/execution/operator/helper/physical_execute.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/execution/operator/helper/physical_execute.hpp" 2 | 3 | #include "duckdb/parallel/meta_pipeline.hpp" 4 | 5 | namespace duckdb { 6 | 7 | PhysicalExecute::PhysicalExecute(PhysicalPlan &physical_plan, PhysicalOperator &plan) 8 | : PhysicalOperator(physical_plan, PhysicalOperatorType::EXECUTE, plan.types, idx_t(-1)), plan(plan) { 9 | } 10 | 11 | vector> PhysicalExecute::GetChildren() const { 12 | return {plan}; 13 | } 14 | 15 | void PhysicalExecute::BuildPipelines(Pipeline ¤t, MetaPipeline &meta_pipeline) { 16 | // EXECUTE statement: build pipeline on child 17 | meta_pipeline.Build(plan); 18 | } 19 | 20 | } // namespace duckdb 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parallel/pipeline_initialize_event.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/parallel/pipeline_finish_event.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/parallel/base_pipeline_event.hpp" 12 | 13 | namespace duckdb { 14 | 15 | class Executor; 16 | 17 | class PipelineInitializeEvent : public BasePipelineEvent { 18 | public: 19 | explicit PipelineInitializeEvent(shared_ptr pipeline); 20 | 21 | public: 22 | void Schedule() override; 23 | void FinishEvent() override; 24 | }; 25 | 26 | } // namespace duckdb 27 | -------------------------------------------------------------------------------- /src/duckdb/ub_extension_core_functions_scalar_date.cpp: -------------------------------------------------------------------------------- 1 | #include "extension/core_functions/scalar/date/current.cpp" 2 | 3 | #include "extension/core_functions/scalar/date/age.cpp" 4 | 5 | #include "extension/core_functions/scalar/date/date_diff.cpp" 6 | 7 | #include "extension/core_functions/scalar/date/date_sub.cpp" 8 | 9 | #include "extension/core_functions/scalar/date/to_interval.cpp" 10 | 11 | #include "extension/core_functions/scalar/date/time_bucket.cpp" 12 | 13 | #include "extension/core_functions/scalar/date/date_trunc.cpp" 14 | 15 | #include "extension/core_functions/scalar/date/epoch.cpp" 16 | 17 | #include "extension/core_functions/scalar/date/date_part.cpp" 18 | 19 | #include "extension/core_functions/scalar/date/make_date.cpp" 20 | 21 | -------------------------------------------------------------------------------- /src/duckdb/src/include/duckdb/parallel/pipeline_event.hpp: -------------------------------------------------------------------------------- 1 | //===----------------------------------------------------------------------===// 2 | // DuckDB 3 | // 4 | // duckdb/parallel/pipeline_event.hpp 5 | // 6 | // 7 | //===----------------------------------------------------------------------===// 8 | 9 | #pragma once 10 | 11 | #include "duckdb/parallel/base_pipeline_event.hpp" 12 | 13 | namespace duckdb { 14 | 15 | //! A PipelineEvent is responsible for scheduling a pipeline 16 | class PipelineEvent : public BasePipelineEvent { 17 | public: 18 | explicit PipelineEvent(shared_ptr pipeline); 19 | 20 | public: 21 | void Schedule() override; 22 | void FinishEvent() override; 23 | }; 24 | 25 | } // namespace duckdb 26 | -------------------------------------------------------------------------------- /src/duckdb/src/optimizer/pushdown/pushdown_distinct.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/optimizer/filter_pushdown.hpp" 2 | #include "duckdb/planner/expression_iterator.hpp" 3 | #include "duckdb/planner/operator/logical_distinct.hpp" 4 | 5 | namespace duckdb { 6 | 7 | unique_ptr FilterPushdown::PushdownDistinct(unique_ptr op) { 8 | D_ASSERT(op->type == LogicalOperatorType::LOGICAL_DISTINCT); 9 | auto &distinct = op->Cast(); 10 | if (!distinct.order_by) { 11 | // regular DISTINCT - can just push down 12 | op->children[0] = Rewrite(std::move(op->children[0])); 13 | return op; 14 | } 15 | // no pushdown through DISTINCT ON (yet?) 16 | return FinishPushdown(std::move(op)); 17 | } 18 | 19 | } // namespace duckdb 20 | -------------------------------------------------------------------------------- /src/duckdb/src/parser/statement/transaction_statement.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/parser/statement/transaction_statement.hpp" 2 | 3 | namespace duckdb { 4 | 5 | TransactionStatement::TransactionStatement(unique_ptr info) 6 | : SQLStatement(StatementType::TRANSACTION_STATEMENT), info(std::move(info)) { 7 | } 8 | 9 | TransactionStatement::TransactionStatement(const TransactionStatement &other) 10 | : SQLStatement(other), info(other.info->Copy()) { 11 | } 12 | 13 | unique_ptr TransactionStatement::Copy() const { 14 | return unique_ptr(new TransactionStatement(*this)); 15 | } 16 | 17 | string TransactionStatement::ToString() const { 18 | return info->ToString(); 19 | } 20 | 21 | } // namespace duckdb 22 | -------------------------------------------------------------------------------- /src/duckdb/src/transaction/transaction.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/transaction/transaction.hpp" 2 | #include "duckdb/transaction/meta_transaction.hpp" 3 | #include "duckdb/transaction/transaction_manager.hpp" 4 | #include "duckdb/main/client_context.hpp" 5 | 6 | namespace duckdb { 7 | 8 | Transaction::Transaction(TransactionManager &manager_p, ClientContext &context_p) 9 | : manager(manager_p), context(context_p.shared_from_this()), active_query(MAXIMUM_QUERY_ID), is_read_only(true) { 10 | } 11 | 12 | Transaction::~Transaction() { 13 | } 14 | 15 | bool Transaction::IsReadOnly() { 16 | return is_read_only; 17 | } 18 | 19 | void Transaction::SetReadWrite() { 20 | D_ASSERT(is_read_only); 21 | is_read_only = false; 22 | } 23 | 24 | } // namespace duckdb 25 | -------------------------------------------------------------------------------- /src/duckdb/src/verification/fetch_row_verifier.cpp: -------------------------------------------------------------------------------- 1 | #include "duckdb/verification/fetch_row_verifier.hpp" 2 | 3 | namespace duckdb { 4 | 5 | FetchRowVerifier::FetchRowVerifier(unique_ptr statement_p, 6 | optional_ptr> parameters) 7 | : StatementVerifier(VerificationType::FETCH_ROW_AS_SCAN, "FetchRow as Scan", std::move(statement_p), parameters) { 8 | } 9 | 10 | unique_ptr 11 | FetchRowVerifier::Create(const SQLStatement &statement_p, 12 | optional_ptr> parameters) { 13 | return make_uniq(statement_p.Copy(), parameters); 14 | } 15 | 16 | } // namespace duckdb 17 | --------------------------------------------------------------------------------