├── .asf.yaml ├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── benchmarks ├── .dockerignore ├── .gitignore ├── Cargo.toml ├── README.md ├── bench.sh ├── compare.py ├── lineprotocol.py ├── queries │ ├── clickbench │ │ ├── README.md │ │ ├── extended.sql │ │ └── queries.sql │ ├── h2o │ │ ├── groupby.sql │ │ ├── join.sql │ │ └── window.sql │ ├── imdb │ │ ├── 10a.sql │ │ ├── 10b.sql │ │ ├── 10c.sql │ │ ├── 11a.sql │ │ ├── 11b.sql │ │ ├── 11c.sql │ │ ├── 11d.sql │ │ ├── 12a.sql │ │ ├── 12b.sql │ │ ├── 12c.sql │ │ ├── 13a.sql │ │ ├── 13b.sql │ │ ├── 13c.sql │ │ ├── 13d.sql │ │ ├── 14a.sql │ │ ├── 14b.sql │ │ ├── 14c.sql │ │ ├── 15a.sql │ │ ├── 15b.sql │ │ ├── 15c.sql │ │ ├── 15d.sql │ │ ├── 16a.sql │ │ ├── 16b.sql │ │ ├── 16c.sql │ │ ├── 16d.sql │ │ ├── 17a.sql │ │ ├── 17b.sql │ │ ├── 17c.sql │ │ ├── 17d.sql │ │ ├── 17e.sql │ │ ├── 17f.sql │ │ ├── 18a.sql │ │ ├── 18b.sql │ │ ├── 18c.sql │ │ ├── 19a.sql │ │ ├── 19b.sql │ │ ├── 19c.sql │ │ ├── 19d.sql │ │ ├── 1a.sql │ │ ├── 1b.sql │ │ ├── 1c.sql │ │ ├── 1d.sql │ │ ├── 20a.sql │ │ ├── 20b.sql │ │ ├── 20c.sql │ │ ├── 21a.sql │ │ ├── 21b.sql │ │ ├── 21c.sql │ │ ├── 22a.sql │ │ ├── 22b.sql │ │ ├── 22c.sql │ │ ├── 22d.sql │ │ ├── 23a.sql │ │ ├── 23b.sql │ │ ├── 23c.sql │ │ ├── 24a.sql │ │ ├── 24b.sql │ │ ├── 25a.sql │ │ ├── 25b.sql │ │ ├── 25c.sql │ │ ├── 26a.sql │ │ ├── 26b.sql │ │ ├── 26c.sql │ │ ├── 27a.sql │ │ ├── 27b.sql │ │ ├── 27c.sql │ │ ├── 28a.sql │ │ ├── 28b.sql │ │ ├── 28c.sql │ │ ├── 29a.sql │ │ ├── 29b.sql │ │ ├── 29c.sql │ │ ├── 2a.sql │ │ ├── 2b.sql │ │ ├── 2c.sql │ │ ├── 2d.sql │ │ ├── 30a.sql │ │ ├── 30b.sql │ │ ├── 30c.sql │ │ ├── 31a.sql │ │ ├── 31b.sql │ │ ├── 31c.sql │ │ ├── 32a.sql │ │ ├── 32b.sql │ │ ├── 33a.sql │ │ ├── 33b.sql │ │ ├── 33c.sql │ │ ├── 3a.sql │ │ ├── 3b.sql │ │ ├── 3c.sql │ │ ├── 4a.sql │ │ ├── 4b.sql │ │ ├── 4c.sql │ │ ├── 5a.sql │ │ ├── 5b.sql │ │ ├── 5c.sql │ │ ├── 6a.sql │ │ ├── 6b.sql │ │ ├── 6c.sql │ │ ├── 6d.sql │ │ ├── 6e.sql │ │ ├── 6f.sql │ │ ├── 7a.sql │ │ ├── 7b.sql │ │ ├── 7c.sql │ │ ├── 8a.sql │ │ ├── 8b.sql │ │ ├── 8c.sql │ │ ├── 8d.sql │ │ ├── 9a.sql │ │ ├── 9b.sql │ │ ├── 9c.sql │ │ └── 9d.sql │ ├── q1.sql │ ├── q10.sql │ ├── q11.sql │ ├── q12.sql │ ├── q13.sql │ ├── q14.sql │ ├── q15.sql │ ├── q16.sql │ ├── q17.sql │ ├── q18.sql │ ├── q19.sql │ ├── q2.sql │ ├── q20.sql │ ├── q21.sql │ ├── q22.sql │ ├── q3.sql │ ├── q4.sql │ ├── q5.sql │ ├── q6.sql │ ├── q7.sql │ ├── q8.sql │ └── q9.sql ├── requirements.txt └── src │ ├── bin │ ├── dfbench.rs │ ├── external_aggr.rs │ ├── imdb.rs │ ├── parquet.rs │ └── tpch.rs │ ├── cancellation.rs │ ├── clickbench.rs │ ├── h2o.rs │ ├── imdb │ ├── convert.rs │ ├── mod.rs │ └── run.rs │ ├── lib.rs │ ├── parquet_filter.rs │ ├── sort.rs │ ├── sort_tpch.rs │ ├── tpch │ ├── convert.rs │ ├── mod.rs │ └── run.rs │ └── util │ ├── access_log.rs │ ├── mod.rs │ ├── options.rs │ └── run.rs ├── ci └── scripts │ ├── retry │ ├── rust_clippy.sh │ ├── rust_docs.sh │ ├── rust_example.sh │ ├── rust_fmt.sh │ └── rust_toml_fmt.sh ├── clippy.toml ├── datafusion-cli ├── CONTRIBUTING.md ├── Cargo.toml ├── Dockerfile ├── README.md ├── examples │ └── cli-session-context.rs ├── src │ ├── catalog.rs │ ├── cli_context.rs │ ├── command.rs │ ├── exec.rs │ ├── functions.rs │ ├── helper.rs │ ├── highlighter.rs │ ├── lib.rs │ ├── main.rs │ ├── object_storage.rs │ ├── pool_type.rs │ ├── print_format.rs │ └── print_options.rs └── tests │ ├── cli_integration.rs │ ├── snapshots │ ├── aws_options.snap │ ├── cli@load_local_csv.sql.snap │ ├── cli@load_s3_csv.sql.snap │ ├── cli@select.sql.snap │ ├── cli_explain_environment_overrides@explain_plan_environment_overrides.snap │ ├── cli_format@automatic.snap │ ├── cli_format@csv.snap │ ├── cli_format@json.snap │ ├── cli_format@nd-json.snap │ ├── cli_format@table.snap │ ├── cli_format@tsv.snap │ ├── cli_quick_test@backslash.snap │ ├── cli_quick_test@batch_size.snap │ ├── cli_quick_test@can_see_indent_format.snap │ ├── cli_quick_test@change_format_version.snap │ ├── cli_quick_test@default_explain_plan.snap │ ├── cli_quick_test@files.snap │ ├── cli_quick_test@statements.snap │ ├── cli_top_memory_consumers@no_track.snap │ ├── cli_top_memory_consumers@top2.snap │ └── cli_top_memory_consumers@top3_default.snap │ └── sql │ ├── backslash.sql │ ├── integration │ ├── load_local_csv.sql │ └── load_s3_csv.sql │ ├── select.sql │ └── types_format.sql ├── datafusion-examples ├── Cargo.toml ├── README.md └── examples │ ├── advanced_parquet_index.rs │ ├── advanced_udaf.rs │ ├── advanced_udf.rs │ ├── advanced_udwf.rs │ ├── analyzer_rule.rs │ ├── catalog.rs │ ├── composed_extension_codec.rs │ ├── csv_json_opener.rs │ ├── csv_sql_streaming.rs │ ├── custom_datasource.rs │ ├── custom_file_format.rs │ ├── dataframe.rs │ ├── date_time_functions.rs │ ├── deserialize_to_struct.rs │ ├── expr_api.rs │ ├── external_dependency │ ├── dataframe-to-s3.rs │ └── query-aws-s3.rs │ ├── ffi │ ├── README.md │ ├── ffi_example_table_provider │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── ffi_module_interface │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ └── ffi_module_loader │ │ ├── Cargo.toml │ │ └── src │ │ └── main.rs │ ├── file_stream_provider.rs │ ├── flight │ ├── flight_client.rs │ ├── flight_server.rs │ └── flight_sql_server.rs │ ├── function_factory.rs │ ├── optimizer_rule.rs │ ├── parquet_exec_visitor.rs │ ├── parquet_index.rs │ ├── parse_sql_expr.rs │ ├── plan_to_sql.rs │ ├── planner_api.rs │ ├── pruning.rs │ ├── query-http-csv.rs │ ├── regexp.rs │ ├── remote_catalog.rs │ ├── simple_udaf.rs │ ├── simple_udf.rs │ ├── simple_udtf.rs │ ├── simple_udwf.rs │ ├── sql_analysis.rs │ ├── sql_dialect.rs │ ├── sql_frontend.rs │ ├── sql_query.rs │ └── tracing.rs ├── datafusion ├── CHANGELOG.md ├── catalog-listing │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── helpers.rs │ │ └── mod.rs ├── catalog │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── async.rs │ │ ├── catalog.rs │ │ ├── cte_worktable.rs │ │ ├── default_table_source.rs │ │ ├── dynamic_file │ │ ├── catalog.rs │ │ └── mod.rs │ │ ├── information_schema.rs │ │ ├── lib.rs │ │ ├── listing_schema.rs │ │ ├── memory │ │ ├── catalog.rs │ │ ├── mod.rs │ │ ├── schema.rs │ │ └── table.rs │ │ ├── schema.rs │ │ ├── stream.rs │ │ ├── streaming.rs │ │ ├── table.rs │ │ └── view.rs ├── common-runtime │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── common.rs │ │ ├── join_set.rs │ │ ├── lib.rs │ │ └── trace_utils.rs ├── common │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── alias.rs │ │ ├── cast.rs │ │ ├── column.rs │ │ ├── config.rs │ │ ├── cse.rs │ │ ├── dfschema.rs │ │ ├── diagnostic.rs │ │ ├── display │ │ ├── graphviz.rs │ │ └── mod.rs │ │ ├── error.rs │ │ ├── file_options │ │ ├── arrow_writer.rs │ │ ├── avro_writer.rs │ │ ├── csv_writer.rs │ │ ├── file_type.rs │ │ ├── json_writer.rs │ │ ├── mod.rs │ │ └── parquet_writer.rs │ │ ├── format.rs │ │ ├── functional_dependencies.rs │ │ ├── hash_utils.rs │ │ ├── instant.rs │ │ ├── join_type.rs │ │ ├── lib.rs │ │ ├── param_value.rs │ │ ├── parsers.rs │ │ ├── pruning.rs │ │ ├── pyarrow.rs │ │ ├── rounding.rs │ │ ├── scalar │ │ ├── consts.rs │ │ ├── mod.rs │ │ └── struct_builder.rs │ │ ├── schema_reference.rs │ │ ├── spans.rs │ │ ├── stats.rs │ │ ├── table_reference.rs │ │ ├── test_util.rs │ │ ├── tree_node.rs │ │ ├── types │ │ ├── builtin.rs │ │ ├── field.rs │ │ ├── logical.rs │ │ ├── mod.rs │ │ └── native.rs │ │ ├── unnest.rs │ │ └── utils │ │ ├── expr.rs │ │ ├── memory.rs │ │ ├── mod.rs │ │ ├── proxy.rs │ │ └── string_utils.rs ├── core │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ ├── aggregate_query_sql.rs │ │ ├── csv_load.rs │ │ ├── data_utils │ │ │ └── mod.rs │ │ ├── dataframe.rs │ │ ├── distinct_query_sql.rs │ │ ├── filter_query_sql.rs │ │ ├── map_query_sql.rs │ │ ├── math_query_sql.rs │ │ ├── parquet_query_sql.rs │ │ ├── parquet_query_sql.sql │ │ ├── physical_plan.rs │ │ ├── push_down_filter.rs │ │ ├── scalar.rs │ │ ├── sort.rs │ │ ├── sort_limit_query_sql.rs │ │ ├── spm.rs │ │ ├── sql_planner.rs │ │ ├── sql_query_with_io.rs │ │ ├── struct_query_sql.rs │ │ ├── topk_aggregate.rs │ │ └── window_query_sql.rs │ ├── src │ │ ├── bin │ │ │ ├── print_config_docs.rs │ │ │ ├── print_functions_docs.rs │ │ │ └── print_runtime_config_docs.rs │ │ ├── dataframe │ │ │ ├── mod.rs │ │ │ └── parquet.rs │ │ ├── datasource │ │ │ ├── dynamic_file.rs │ │ │ ├── empty.rs │ │ │ ├── file_format │ │ │ │ ├── arrow.rs │ │ │ │ ├── avro.rs │ │ │ │ ├── csv.rs │ │ │ │ ├── json.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── options.rs │ │ │ │ └── parquet.rs │ │ │ ├── listing │ │ │ │ ├── mod.rs │ │ │ │ └── table.rs │ │ │ ├── listing_table_factory.rs │ │ │ ├── memory_test.rs │ │ │ ├── mod.rs │ │ │ ├── physical_plan │ │ │ │ ├── arrow_file.rs │ │ │ │ ├── avro.rs │ │ │ │ ├── csv.rs │ │ │ │ ├── json.rs │ │ │ │ ├── mod.rs │ │ │ │ └── parquet.rs │ │ │ ├── provider.rs │ │ │ └── view_test.rs │ │ ├── error.rs │ │ ├── execution │ │ │ ├── context │ │ │ │ ├── avro.rs │ │ │ │ ├── csv.rs │ │ │ │ ├── json.rs │ │ │ │ ├── mod.rs │ │ │ │ └── parquet.rs │ │ │ ├── mod.rs │ │ │ ├── session_state.rs │ │ │ └── session_state_defaults.rs │ │ ├── lib.rs │ │ ├── physical_planner.rs │ │ ├── prelude.rs │ │ ├── scalar.rs │ │ ├── schema_equivalence.rs │ │ ├── test │ │ │ ├── mod.rs │ │ │ ├── object_store.rs │ │ │ └── variable.rs │ │ └── test_util │ │ │ ├── csv.rs │ │ │ ├── mod.rs │ │ │ └── parquet.rs │ └── tests │ │ ├── catalog │ │ ├── memory.rs │ │ └── mod.rs │ │ ├── config_from_env.rs │ │ ├── core_integration.rs │ │ ├── custom_sources_cases │ │ ├── mod.rs │ │ ├── provider_filter_pushdown.rs │ │ └── statistics.rs │ │ ├── data │ │ ├── 1.json │ │ ├── 2.json │ │ ├── 3.json │ │ ├── 4.json │ │ ├── aggregate_agg_multi_order.csv │ │ ├── aggregate_simple.csv │ │ ├── aggregate_simple_pipe.csv │ │ ├── aggregate_test_100_order_by_c1_asc.csv │ │ ├── capitalized_example.csv │ │ ├── cars.csv │ │ ├── clickbench_hits_10.parquet │ │ ├── convert_first_last.csv │ │ ├── corrupt.csv │ │ ├── cr_terminator.csv │ │ ├── csv │ │ │ └── aggregate_test_100_with_nulls.csv │ │ ├── customer.csv │ │ ├── decimal_data.csv │ │ ├── double_quote.csv │ │ ├── empty.csv │ │ ├── empty.json │ │ ├── empty_0_byte.csv │ │ ├── empty_files │ │ │ ├── all_empty │ │ │ │ ├── empty0.csv │ │ │ │ ├── empty1.csv │ │ │ │ └── empty2.csv │ │ │ └── some_empty │ │ │ │ ├── a_empty.csv │ │ │ │ ├── b.csv │ │ │ │ ├── c_empty.csv │ │ │ │ ├── d.csv │ │ │ │ └── e_empty.csv │ │ ├── escape.csv │ │ ├── example.arrow │ │ ├── example.csv │ │ ├── example_long.csv │ │ ├── filter_pushdown │ │ │ ├── single_file.gz.parquet │ │ │ └── single_file_small_pages.gz.parquet │ │ ├── fixed_size_list_array.parquet │ │ ├── int96_nested.parquet │ │ ├── newlines_in_values.csv │ │ ├── newlines_in_values_cr_terminator.csv │ │ ├── null_cases.csv │ │ ├── one_col.csv │ │ ├── parquet_map.parquet │ │ ├── partitioned_csv │ │ │ ├── partition-0.csv │ │ │ ├── partition-1.csv │ │ │ ├── partition-2.csv │ │ │ └── partition-3.csv │ │ ├── partitioned_table │ │ │ ├── c_date=2018-11-13 │ │ │ │ └── timestamps.csv │ │ │ └── c_date=2018-12-13 │ │ │ │ └── timestamps.csv │ │ ├── partitioned_table_arrow │ │ │ ├── part=123 │ │ │ │ └── data.arrow │ │ │ └── part=456 │ │ │ │ └── data.arrow │ │ ├── partitioned_table_json │ │ │ ├── part=1 │ │ │ │ └── data.json │ │ │ └── part=2 │ │ │ │ └── data.json │ │ ├── quote.csv │ │ ├── recursive_cte │ │ │ ├── balance.csv │ │ │ ├── growth.csv │ │ │ ├── prices.csv │ │ │ ├── sales.csv │ │ │ ├── salespersons.csv │ │ │ └── time.csv │ │ ├── schema_infer_limit.json │ │ ├── test_binary.parquet │ │ ├── test_statistics_per_partition │ │ │ ├── date=2025-03-01 │ │ │ │ └── j5fUeSDQo22oPyPU.parquet │ │ │ ├── date=2025-03-02 │ │ │ │ └── j5fUeSDQo22oPyPU.parquet │ │ │ ├── date=2025-03-03 │ │ │ │ └── j5fUeSDQo22oPyPU.parquet │ │ │ └── date=2025-03-04 │ │ │ │ └── j5fUeSDQo22oPyPU.parquet │ │ ├── timestamp_with_tz.parquet │ │ ├── timestamps.csv │ │ ├── unnest.json │ │ ├── wide_rows.csv │ │ ├── window_1.csv │ │ └── window_2.csv │ │ ├── dataframe │ │ ├── dataframe_functions.rs │ │ ├── describe.rs │ │ └── mod.rs │ │ ├── execution │ │ ├── logical_plan.rs │ │ └── mod.rs │ │ ├── expr_api │ │ ├── mod.rs │ │ ├── parse_sql_expr.rs │ │ └── simplification.rs │ │ ├── fifo │ │ └── mod.rs │ │ ├── fuzz.rs │ │ ├── fuzz_cases │ │ ├── aggregate_fuzz.rs │ │ ├── aggregation_fuzzer │ │ │ ├── context_generator.rs │ │ │ ├── data_generator.rs │ │ │ ├── fuzzer.rs │ │ │ ├── mod.rs │ │ │ └── query_builder.rs │ │ ├── distinct_count_string_fuzz.rs │ │ ├── equivalence │ │ │ ├── mod.rs │ │ │ ├── ordering.rs │ │ │ ├── projection.rs │ │ │ ├── properties.rs │ │ │ └── utils.rs │ │ ├── join_fuzz.rs │ │ ├── limit_fuzz.rs │ │ ├── merge_fuzz.rs │ │ ├── mod.rs │ │ ├── pruning.rs │ │ ├── record_batch_generator.rs │ │ ├── sort_fuzz.rs │ │ ├── sort_preserving_repartition_fuzz.rs │ │ ├── sort_query_fuzz.rs │ │ └── window_fuzz.rs │ │ ├── integration_tests │ │ └── schema_adapter_integration_tests.rs │ │ ├── macro_hygiene │ │ └── mod.rs │ │ ├── memory_limit │ │ ├── memory_limit_validation │ │ │ ├── mod.rs │ │ │ ├── sort_mem_validation.rs │ │ │ └── utils.rs │ │ └── mod.rs │ │ ├── optimizer │ │ └── mod.rs │ │ ├── parquet │ │ ├── custom_reader.rs │ │ ├── external_access_plan.rs │ │ ├── file_statistics.rs │ │ ├── filter_pushdown.rs │ │ ├── mod.rs │ │ ├── page_pruning.rs │ │ ├── row_group_pruning.rs │ │ ├── schema.rs │ │ ├── schema_coercion.rs │ │ └── utils.rs │ │ ├── parquet_config.rs │ │ ├── physical_optimizer │ │ ├── aggregate_statistics.rs │ │ ├── combine_partial_final_agg.rs │ │ ├── enforce_distribution.rs │ │ ├── enforce_sorting.rs │ │ ├── filter_pushdown │ │ │ ├── mod.rs │ │ │ └── util.rs │ │ ├── join_selection.rs │ │ ├── limit_pushdown.rs │ │ ├── limited_distinct_aggregation.rs │ │ ├── mod.rs │ │ ├── partition_statistics.rs │ │ ├── projection_pushdown.rs │ │ ├── replace_with_order_preserving_variants.rs │ │ ├── sanity_checker.rs │ │ └── test_utils.rs │ │ ├── serde │ │ └── mod.rs │ │ ├── sql │ │ ├── aggregates.rs │ │ ├── create_drop.rs │ │ ├── explain_analyze.rs │ │ ├── joins.rs │ │ ├── mod.rs │ │ ├── path_partition.rs │ │ ├── runtime_config.rs │ │ ├── select.rs │ │ └── sql_api.rs │ │ ├── test_adapter_updated.rs │ │ ├── tpc-ds │ │ ├── 1.sql │ │ ├── 10.sql │ │ ├── 11.sql │ │ ├── 12.sql │ │ ├── 13.sql │ │ ├── 14.sql │ │ ├── 15.sql │ │ ├── 16.sql │ │ ├── 17.sql │ │ ├── 18.sql │ │ ├── 19.sql │ │ ├── 2.sql │ │ ├── 20.sql │ │ ├── 21.sql │ │ ├── 22.sql │ │ ├── 23.sql │ │ ├── 24.sql │ │ ├── 25.sql │ │ ├── 26.sql │ │ ├── 27.sql │ │ ├── 28.sql │ │ ├── 29.sql │ │ ├── 3.sql │ │ ├── 30.sql │ │ ├── 31.sql │ │ ├── 32.sql │ │ ├── 33.sql │ │ ├── 34.sql │ │ ├── 35.sql │ │ ├── 36.sql │ │ ├── 37.sql │ │ ├── 38.sql │ │ ├── 39.sql │ │ ├── 4.sql │ │ ├── 40.sql │ │ ├── 41.sql │ │ ├── 42.sql │ │ ├── 43.sql │ │ ├── 44.sql │ │ ├── 45.sql │ │ ├── 46.sql │ │ ├── 47.sql │ │ ├── 48.sql │ │ ├── 49.sql │ │ ├── 5.sql │ │ ├── 50.sql │ │ ├── 51.sql │ │ ├── 52.sql │ │ ├── 53.sql │ │ ├── 54.sql │ │ ├── 55.sql │ │ ├── 56.sql │ │ ├── 57.sql │ │ ├── 58.sql │ │ ├── 59.sql │ │ ├── 6.sql │ │ ├── 60.sql │ │ ├── 61.sql │ │ ├── 62.sql │ │ ├── 63.sql │ │ ├── 64.sql │ │ ├── 65.sql │ │ ├── 66.sql │ │ ├── 67.sql │ │ ├── 68.sql │ │ ├── 69.sql │ │ ├── 7.sql │ │ ├── 70.sql │ │ ├── 71.sql │ │ ├── 72.sql │ │ ├── 73.sql │ │ ├── 74.sql │ │ ├── 75.sql │ │ ├── 76.sql │ │ ├── 77.sql │ │ ├── 78.sql │ │ ├── 79.sql │ │ ├── 8.sql │ │ ├── 80.sql │ │ ├── 81.sql │ │ ├── 82.sql │ │ ├── 83.sql │ │ ├── 84.sql │ │ ├── 85.sql │ │ ├── 86.sql │ │ ├── 87.sql │ │ ├── 88.sql │ │ ├── 89.sql │ │ ├── 9.sql │ │ ├── 90.sql │ │ ├── 91.sql │ │ ├── 92.sql │ │ ├── 93.sql │ │ ├── 94.sql │ │ ├── 95.sql │ │ ├── 96.sql │ │ ├── 97.sql │ │ ├── 98.sql │ │ └── 99.sql │ │ ├── tpcds_planning.rs │ │ ├── tpch-csv │ │ ├── customer.csv │ │ ├── lineitem.csv │ │ ├── nation.csv │ │ ├── orders.csv │ │ ├── part.csv │ │ ├── partsupp.csv │ │ ├── region.csv │ │ └── supplier.csv │ │ ├── tracing │ │ ├── asserting_tracer.rs │ │ ├── mod.rs │ │ └── traceable_object_store.rs │ │ ├── user_defined │ │ ├── expr_planner.rs │ │ ├── insert_operation.rs │ │ ├── mod.rs │ │ ├── user_defined_aggregates.rs │ │ ├── user_defined_plan.rs │ │ ├── user_defined_scalar_functions.rs │ │ ├── user_defined_table_functions.rs │ │ └── user_defined_window_functions.rs │ │ └── user_defined_integration.rs ├── datasource-avro │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── avro_to_arrow │ │ ├── arrow_array_reader.rs │ │ ├── mod.rs │ │ ├── reader.rs │ │ └── schema.rs │ │ ├── file_format.rs │ │ ├── mod.rs │ │ └── source.rs ├── datasource-csv │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── file_format.rs │ │ ├── mod.rs │ │ └── source.rs ├── datasource-json │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── file_format.rs │ │ ├── mod.rs │ │ └── source.rs ├── datasource-parquet │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── src │ │ ├── access_plan.rs │ │ ├── file_format.rs │ │ ├── metrics.rs │ │ ├── mod.rs │ │ ├── opener.rs │ │ ├── page_filter.rs │ │ ├── reader.rs │ │ ├── row_filter.rs │ │ ├── row_group_filter.rs │ │ ├── source.rs │ │ └── writer.rs │ └── tests │ │ └── apply_schema_adapter_tests.rs ├── datasource │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ └── split_groups_by_statistics.rs │ └── src │ │ ├── decoder.rs │ │ ├── display.rs │ │ ├── file.rs │ │ ├── file_compression_type.rs │ │ ├── file_format.rs │ │ ├── file_groups.rs │ │ ├── file_meta.rs │ │ ├── file_scan_config.rs │ │ ├── file_sink_config.rs │ │ ├── file_stream.rs │ │ ├── macros.rs │ │ ├── memory.rs │ │ ├── mod.rs │ │ ├── schema_adapter.rs │ │ ├── sink.rs │ │ ├── source.rs │ │ ├── statistics.rs │ │ ├── test_util.rs │ │ ├── url.rs │ │ └── write │ │ ├── demux.rs │ │ ├── mod.rs │ │ └── orchestration.rs ├── doc │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ └── src │ │ └── lib.rs ├── execution │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── cache │ │ ├── cache_manager.rs │ │ ├── cache_unit.rs │ │ └── mod.rs │ │ ├── config.rs │ │ ├── disk_manager.rs │ │ ├── lib.rs │ │ ├── memory_pool │ │ ├── mod.rs │ │ └── pool.rs │ │ ├── object_store.rs │ │ ├── runtime_env.rs │ │ ├── stream.rs │ │ └── task.rs ├── expr-common │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ └── src │ │ ├── accumulator.rs │ │ ├── columnar_value.rs │ │ ├── groups_accumulator.rs │ │ ├── interval_arithmetic.rs │ │ ├── lib.rs │ │ ├── operator.rs │ │ ├── signature.rs │ │ ├── sort_properties.rs │ │ ├── statistics.rs │ │ ├── type_coercion.rs │ │ └── type_coercion │ │ ├── aggregates.rs │ │ └── binary.rs ├── expr │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── conditional_expressions.rs │ │ ├── execution_props.rs │ │ ├── expr.rs │ │ ├── expr_fn.rs │ │ ├── expr_rewriter │ │ ├── mod.rs │ │ └── order_by.rs │ │ ├── expr_schema.rs │ │ ├── function.rs │ │ ├── lib.rs │ │ ├── literal.rs │ │ ├── logical_plan │ │ ├── builder.rs │ │ ├── ddl.rs │ │ ├── display.rs │ │ ├── dml.rs │ │ ├── extension.rs │ │ ├── invariants.rs │ │ ├── mod.rs │ │ ├── plan.rs │ │ ├── statement.rs │ │ └── tree_node.rs │ │ ├── operation.rs │ │ ├── partition_evaluator.rs │ │ ├── planner.rs │ │ ├── registry.rs │ │ ├── select_expr.rs │ │ ├── simplify.rs │ │ ├── table_source.rs │ │ ├── test │ │ ├── function_stub.rs │ │ └── mod.rs │ │ ├── tree_node.rs │ │ ├── type_coercion │ │ ├── functions.rs │ │ ├── mod.rs │ │ └── other.rs │ │ ├── udaf.rs │ │ ├── udf.rs │ │ ├── udwf.rs │ │ ├── utils.rs │ │ ├── var_provider.rs │ │ ├── window_frame.rs │ │ └── window_state.rs ├── ffi │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── src │ │ ├── arrow_wrappers.rs │ │ ├── catalog_provider.rs │ │ ├── execution_plan.rs │ │ ├── insert_op.rs │ │ ├── lib.rs │ │ ├── plan_properties.rs │ │ ├── record_batch_stream.rs │ │ ├── schema_provider.rs │ │ ├── session_config.rs │ │ ├── table_provider.rs │ │ ├── table_source.rs │ │ ├── tests │ │ │ ├── async_provider.rs │ │ │ ├── catalog.rs │ │ │ ├── mod.rs │ │ │ ├── sync_provider.rs │ │ │ ├── udf_udaf_udwf.rs │ │ │ └── utils.rs │ │ ├── udf │ │ │ ├── mod.rs │ │ │ └── return_type_args.rs │ │ ├── udtf.rs │ │ ├── util.rs │ │ └── volatility.rs │ └── tests │ │ ├── ffi_integration.rs │ │ ├── ffi_udf.rs │ │ └── ffi_udtf.rs ├── functions-aggregate-common │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── benches │ │ └── accumulate.rs │ └── src │ │ ├── accumulator.rs │ │ ├── aggregate.rs │ │ ├── aggregate │ │ ├── count_distinct.rs │ │ ├── count_distinct │ │ │ ├── bytes.rs │ │ │ └── native.rs │ │ ├── groups_accumulator.rs │ │ └── groups_accumulator │ │ │ ├── accumulate.rs │ │ │ ├── bool_op.rs │ │ │ ├── nulls.rs │ │ │ └── prim_op.rs │ │ ├── lib.rs │ │ ├── merge_arrays.rs │ │ ├── order.rs │ │ ├── stats.rs │ │ ├── tdigest.rs │ │ └── utils.rs ├── functions-aggregate │ ├── COMMENTS.md │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ ├── array_agg.rs │ │ ├── count.rs │ │ └── sum.rs │ └── src │ │ ├── approx_distinct.rs │ │ ├── approx_median.rs │ │ ├── approx_percentile_cont.rs │ │ ├── approx_percentile_cont_with_weight.rs │ │ ├── array_agg.rs │ │ ├── average.rs │ │ ├── bit_and_or_xor.rs │ │ ├── bool_and_or.rs │ │ ├── correlation.rs │ │ ├── count.rs │ │ ├── covariance.rs │ │ ├── first_last.rs │ │ ├── grouping.rs │ │ ├── hyperloglog.rs │ │ ├── lib.rs │ │ ├── macros.rs │ │ ├── median.rs │ │ ├── min_max.rs │ │ ├── min_max │ │ ├── min_max_bytes.rs │ │ └── min_max_struct.rs │ │ ├── nth_value.rs │ │ ├── planner.rs │ │ ├── regr.rs │ │ ├── stddev.rs │ │ ├── string_agg.rs │ │ ├── sum.rs │ │ └── variance.rs ├── functions-nested │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ ├── array_expression.rs │ │ └── map.rs │ └── src │ │ ├── array_has.rs │ │ ├── cardinality.rs │ │ ├── concat.rs │ │ ├── dimension.rs │ │ ├── distance.rs │ │ ├── empty.rs │ │ ├── except.rs │ │ ├── expr_ext.rs │ │ ├── extract.rs │ │ ├── flatten.rs │ │ ├── length.rs │ │ ├── lib.rs │ │ ├── macros.rs │ │ ├── make_array.rs │ │ ├── map.rs │ │ ├── map_extract.rs │ │ ├── map_keys.rs │ │ ├── map_values.rs │ │ ├── max.rs │ │ ├── planner.rs │ │ ├── position.rs │ │ ├── range.rs │ │ ├── remove.rs │ │ ├── repeat.rs │ │ ├── replace.rs │ │ ├── resize.rs │ │ ├── reverse.rs │ │ ├── set_ops.rs │ │ ├── sort.rs │ │ ├── string.rs │ │ └── utils.rs ├── functions-table │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── generate_series.rs │ │ └── lib.rs ├── functions-window-common │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── expr.rs │ │ ├── field.rs │ │ ├── lib.rs │ │ └── partition.rs ├── functions-window │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── cume_dist.rs │ │ ├── lead_lag.rs │ │ ├── lib.rs │ │ ├── macros.rs │ │ ├── nth_value.rs │ │ ├── ntile.rs │ │ ├── planner.rs │ │ ├── rank.rs │ │ ├── row_number.rs │ │ └── utils.rs ├── functions │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ ├── ascii.rs │ │ ├── character_length.rs │ │ ├── chr.rs │ │ ├── concat.rs │ │ ├── cot.rs │ │ ├── date_bin.rs │ │ ├── date_trunc.rs │ │ ├── encoding.rs │ │ ├── find_in_set.rs │ │ ├── gcd.rs │ │ ├── helper.rs │ │ ├── initcap.rs │ │ ├── isnan.rs │ │ ├── iszero.rs │ │ ├── lower.rs │ │ ├── ltrim.rs │ │ ├── make_date.rs │ │ ├── nullif.rs │ │ ├── pad.rs │ │ ├── random.rs │ │ ├── regx.rs │ │ ├── repeat.rs │ │ ├── reverse.rs │ │ ├── signum.rs │ │ ├── strpos.rs │ │ ├── substr.rs │ │ ├── substr_index.rs │ │ ├── to_char.rs │ │ ├── to_hex.rs │ │ ├── to_timestamp.rs │ │ ├── trunc.rs │ │ ├── upper.rs │ │ └── uuid.rs │ └── src │ │ ├── core │ │ ├── arrow_cast.rs │ │ ├── arrowtypeof.rs │ │ ├── coalesce.rs │ │ ├── expr_ext.rs │ │ ├── getfield.rs │ │ ├── greatest.rs │ │ ├── greatest_least_utils.rs │ │ ├── least.rs │ │ ├── mod.rs │ │ ├── named_struct.rs │ │ ├── nullif.rs │ │ ├── nvl.rs │ │ ├── nvl2.rs │ │ ├── overlay.rs │ │ ├── planner.rs │ │ ├── struct.rs │ │ ├── union_extract.rs │ │ ├── union_tag.rs │ │ └── version.rs │ │ ├── crypto │ │ ├── basic.rs │ │ ├── digest.rs │ │ ├── md5.rs │ │ ├── mod.rs │ │ ├── sha224.rs │ │ ├── sha256.rs │ │ ├── sha384.rs │ │ └── sha512.rs │ │ ├── datetime │ │ ├── common.rs │ │ ├── current_date.rs │ │ ├── current_time.rs │ │ ├── date_bin.rs │ │ ├── date_part.rs │ │ ├── date_trunc.rs │ │ ├── from_unixtime.rs │ │ ├── make_date.rs │ │ ├── mod.rs │ │ ├── now.rs │ │ ├── to_char.rs │ │ ├── to_date.rs │ │ ├── to_local_time.rs │ │ ├── to_timestamp.rs │ │ └── to_unixtime.rs │ │ ├── encoding │ │ ├── inner.rs │ │ └── mod.rs │ │ ├── lib.rs │ │ ├── macros.rs │ │ ├── math │ │ ├── abs.rs │ │ ├── bounds.rs │ │ ├── cot.rs │ │ ├── factorial.rs │ │ ├── gcd.rs │ │ ├── iszero.rs │ │ ├── lcm.rs │ │ ├── log.rs │ │ ├── mod.rs │ │ ├── monotonicity.rs │ │ ├── nans.rs │ │ ├── nanvl.rs │ │ ├── pi.rs │ │ ├── power.rs │ │ ├── random.rs │ │ ├── round.rs │ │ ├── signum.rs │ │ └── trunc.rs │ │ ├── planner.rs │ │ ├── regex │ │ ├── mod.rs │ │ ├── regexpcount.rs │ │ ├── regexplike.rs │ │ ├── regexpmatch.rs │ │ └── regexpreplace.rs │ │ ├── string │ │ ├── ascii.rs │ │ ├── bit_length.rs │ │ ├── btrim.rs │ │ ├── chr.rs │ │ ├── common.rs │ │ ├── concat.rs │ │ ├── concat_ws.rs │ │ ├── contains.rs │ │ ├── ends_with.rs │ │ ├── levenshtein.rs │ │ ├── lower.rs │ │ ├── ltrim.rs │ │ ├── mod.rs │ │ ├── octet_length.rs │ │ ├── overlay.rs │ │ ├── repeat.rs │ │ ├── replace.rs │ │ ├── rtrim.rs │ │ ├── split_part.rs │ │ ├── starts_with.rs │ │ ├── to_hex.rs │ │ ├── upper.rs │ │ └── uuid.rs │ │ ├── strings.rs │ │ ├── unicode │ │ ├── character_length.rs │ │ ├── find_in_set.rs │ │ ├── initcap.rs │ │ ├── left.rs │ │ ├── lpad.rs │ │ ├── mod.rs │ │ ├── reverse.rs │ │ ├── right.rs │ │ ├── rpad.rs │ │ ├── strpos.rs │ │ ├── substr.rs │ │ ├── substrindex.rs │ │ └── translate.rs │ │ └── utils.rs ├── macros │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ └── src │ │ └── user_doc.rs ├── optimizer │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ └── projection_unnecessary.rs │ ├── src │ │ ├── analyzer │ │ │ ├── function_rewrite.rs │ │ │ ├── mod.rs │ │ │ ├── resolve_grouping_function.rs │ │ │ └── type_coercion.rs │ │ ├── common_subexpr_eliminate.rs │ │ ├── decorrelate.rs │ │ ├── decorrelate_lateral_join.rs │ │ ├── decorrelate_predicate_subquery.rs │ │ ├── eliminate_cross_join.rs │ │ ├── eliminate_duplicated_expr.rs │ │ ├── eliminate_filter.rs │ │ ├── eliminate_group_by_constant.rs │ │ ├── eliminate_join.rs │ │ ├── eliminate_limit.rs │ │ ├── eliminate_nested_union.rs │ │ ├── eliminate_one_union.rs │ │ ├── eliminate_outer_join.rs │ │ ├── extract_equijoin_predicate.rs │ │ ├── filter_null_join_keys.rs │ │ ├── join_key_set.rs │ │ ├── lib.rs │ │ ├── optimize_projections │ │ │ ├── mod.rs │ │ │ └── required_indices.rs │ │ ├── optimizer.rs │ │ ├── plan_signature.rs │ │ ├── propagate_empty_relation.rs │ │ ├── push_down_filter.rs │ │ ├── push_down_limit.rs │ │ ├── replace_distinct_aggregate.rs │ │ ├── scalar_subquery_to_join.rs │ │ ├── simplify_expressions │ │ │ ├── expr_simplifier.rs │ │ │ ├── guarantees.rs │ │ │ ├── inlist_simplifier.rs │ │ │ ├── mod.rs │ │ │ ├── regex.rs │ │ │ ├── simplify_exprs.rs │ │ │ ├── unwrap_cast.rs │ │ │ └── utils.rs │ │ ├── single_distinct_to_groupby.rs │ │ ├── test │ │ │ ├── mod.rs │ │ │ └── user_defined.rs │ │ └── utils.rs │ └── tests │ │ └── optimizer_integration.rs ├── physical-expr-common │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── binary_map.rs │ │ ├── binary_view_map.rs │ │ ├── datum.rs │ │ ├── lib.rs │ │ ├── physical_expr.rs │ │ ├── sort_expr.rs │ │ ├── tree_node.rs │ │ └── utils.rs ├── physical-expr │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ ├── binary_op.rs │ │ ├── case_when.rs │ │ ├── in_list.rs │ │ └── is_null.rs │ ├── src │ │ ├── aggregate.rs │ │ ├── analysis.rs │ │ ├── equivalence │ │ │ ├── class.rs │ │ │ ├── mod.rs │ │ │ ├── ordering.rs │ │ │ ├── projection.rs │ │ │ └── properties │ │ │ │ ├── dependency.rs │ │ │ │ ├── joins.rs │ │ │ │ ├── mod.rs │ │ │ │ └── union.rs │ │ ├── expressions │ │ │ ├── binary.rs │ │ │ ├── binary │ │ │ │ └── kernels.rs │ │ │ ├── case.rs │ │ │ ├── cast.rs │ │ │ ├── column.rs │ │ │ ├── dynamic_filters.rs │ │ │ ├── in_list.rs │ │ │ ├── is_not_null.rs │ │ │ ├── is_null.rs │ │ │ ├── like.rs │ │ │ ├── literal.rs │ │ │ ├── mod.rs │ │ │ ├── negative.rs │ │ │ ├── no_op.rs │ │ │ ├── not.rs │ │ │ ├── try_cast.rs │ │ │ └── unknown_column.rs │ │ ├── intervals │ │ │ ├── cp_solver.rs │ │ │ ├── mod.rs │ │ │ ├── test_utils.rs │ │ │ └── utils.rs │ │ ├── lib.rs │ │ ├── partitioning.rs │ │ ├── physical_expr.rs │ │ ├── planner.rs │ │ ├── scalar_function.rs │ │ ├── statistics │ │ │ ├── mod.rs │ │ │ └── stats_solver.rs │ │ ├── utils │ │ │ ├── guarantee.rs │ │ │ └── mod.rs │ │ └── window │ │ │ ├── aggregate.rs │ │ │ ├── mod.rs │ │ │ ├── sliding_aggregate.rs │ │ │ ├── standard.rs │ │ │ ├── standard_window_function_expr.rs │ │ │ └── window_expr.rs │ └── tests │ │ └── data │ │ └── regex.csv ├── physical-optimizer │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── aggregate_statistics.rs │ │ ├── coalesce_batches.rs │ │ ├── combine_partial_final_agg.rs │ │ ├── enforce_distribution.rs │ │ ├── enforce_sorting │ │ ├── mod.rs │ │ ├── replace_with_order_preserving_variants.rs │ │ └── sort_pushdown.rs │ │ ├── filter_pushdown.rs │ │ ├── join_selection.rs │ │ ├── lib.rs │ │ ├── limit_pushdown.rs │ │ ├── limited_distinct_aggregation.rs │ │ ├── optimizer.rs │ │ ├── output_requirements.rs │ │ ├── projection_pushdown.rs │ │ ├── pruning.rs │ │ ├── sanity_checker.rs │ │ ├── topk_aggregation.rs │ │ ├── update_aggr_exprs.rs │ │ └── utils.rs ├── physical-plan │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── benches │ │ ├── partial_ordering.rs │ │ ├── sort_preserving_merge.rs │ │ └── spill_io.rs │ └── src │ │ ├── aggregates │ │ ├── group_values │ │ │ ├── mod.rs │ │ │ ├── multi_group_by │ │ │ │ ├── bytes.rs │ │ │ │ ├── bytes_view.rs │ │ │ │ ├── mod.rs │ │ │ │ └── primitive.rs │ │ │ ├── null_builder.rs │ │ │ ├── row.rs │ │ │ └── single_group_by │ │ │ │ ├── bytes.rs │ │ │ │ ├── bytes_view.rs │ │ │ │ ├── mod.rs │ │ │ │ └── primitive.rs │ │ ├── mod.rs │ │ ├── no_grouping.rs │ │ ├── order │ │ │ ├── full.rs │ │ │ ├── mod.rs │ │ │ └── partial.rs │ │ ├── row_hash.rs │ │ ├── topk │ │ │ ├── hash_table.rs │ │ │ ├── heap.rs │ │ │ ├── mod.rs │ │ │ └── priority_map.rs │ │ └── topk_stream.rs │ │ ├── analyze.rs │ │ ├── coalesce │ │ └── mod.rs │ │ ├── coalesce_batches.rs │ │ ├── coalesce_partitions.rs │ │ ├── common.rs │ │ ├── display.rs │ │ ├── empty.rs │ │ ├── execution_plan.rs │ │ ├── explain.rs │ │ ├── filter.rs │ │ ├── filter_pushdown.rs │ │ ├── joins │ │ ├── cross_join.rs │ │ ├── hash_join.rs │ │ ├── join_filter.rs │ │ ├── join_hash_map.rs │ │ ├── mod.rs │ │ ├── nested_loop_join.rs │ │ ├── sort_merge_join.rs │ │ ├── stream_join_utils.rs │ │ ├── symmetric_hash_join.rs │ │ ├── test_utils.rs │ │ └── utils.rs │ │ ├── lib.rs │ │ ├── limit.rs │ │ ├── memory.rs │ │ ├── metrics │ │ ├── baseline.rs │ │ ├── builder.rs │ │ ├── mod.rs │ │ └── value.rs │ │ ├── ordering.rs │ │ ├── placeholder_row.rs │ │ ├── projection.rs │ │ ├── recursive_query.rs │ │ ├── render_tree.rs │ │ ├── repartition │ │ ├── distributor_channels.rs │ │ └── mod.rs │ │ ├── sorts │ │ ├── builder.rs │ │ ├── cursor.rs │ │ ├── index.rs │ │ ├── merge.rs │ │ ├── mod.rs │ │ ├── partial_sort.rs │ │ ├── sort.rs │ │ ├── sort_preserving_merge.rs │ │ ├── stream.rs │ │ └── streaming_merge.rs │ │ ├── spill │ │ ├── in_progress_spill_file.rs │ │ ├── mod.rs │ │ └── spill_manager.rs │ │ ├── stream.rs │ │ ├── streaming.rs │ │ ├── test.rs │ │ ├── test │ │ └── exec.rs │ │ ├── topk │ │ └── mod.rs │ │ ├── tree_node.rs │ │ ├── union.rs │ │ ├── unnest.rs │ │ ├── values.rs │ │ ├── visitor.rs │ │ ├── windows │ │ ├── bounded_window_agg_exec.rs │ │ ├── mod.rs │ │ ├── utils.rs │ │ └── window_agg_exec.rs │ │ └── work_table.rs ├── proto-common │ ├── .gitignore │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── gen │ │ ├── Cargo.toml │ │ └── src │ │ │ └── main.rs │ ├── proto │ │ └── datafusion_common.proto │ ├── regen.sh │ └── src │ │ ├── common.rs │ │ ├── from_proto │ │ └── mod.rs │ │ ├── generated │ │ ├── mod.rs │ │ ├── pbjson.rs │ │ └── prost.rs │ │ ├── lib.rs │ │ └── to_proto │ │ └── mod.rs ├── proto │ ├── .gitignore │ ├── CONTRIBUTING.md │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── gen │ │ ├── Cargo.toml │ │ └── src │ │ │ └── main.rs │ ├── proto │ │ └── datafusion.proto │ ├── regen.sh │ ├── src │ │ ├── bytes │ │ │ ├── mod.rs │ │ │ └── registry.rs │ │ ├── common.rs │ │ ├── generated │ │ │ ├── datafusion_proto_common.rs │ │ │ ├── mod.rs │ │ │ ├── pbjson.rs │ │ │ └── prost.rs │ │ ├── lib.rs │ │ ├── logical_plan │ │ │ ├── file_formats.rs │ │ │ ├── from_proto.rs │ │ │ ├── mod.rs │ │ │ └── to_proto.rs │ │ └── physical_plan │ │ │ ├── from_proto.rs │ │ │ ├── mod.rs │ │ │ └── to_proto.rs │ └── tests │ │ ├── cases │ │ ├── mod.rs │ │ ├── roundtrip_logical_plan.rs │ │ ├── roundtrip_physical_plan.rs │ │ └── serialize.rs │ │ ├── proto_integration.rs │ │ └── testdata │ │ └── test.csv ├── session │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── lib.rs │ │ └── session.rs ├── spark │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ └── src │ │ ├── function │ │ ├── aggregate │ │ │ └── mod.rs │ │ ├── array │ │ │ └── mod.rs │ │ ├── bitwise │ │ │ └── mod.rs │ │ ├── collection │ │ │ └── mod.rs │ │ ├── conditional │ │ │ └── mod.rs │ │ ├── conversion │ │ │ └── mod.rs │ │ ├── csv │ │ │ └── mod.rs │ │ ├── datetime │ │ │ └── mod.rs │ │ ├── error_utils.rs │ │ ├── generator │ │ │ └── mod.rs │ │ ├── hash │ │ │ ├── mod.rs │ │ │ └── sha2.rs │ │ ├── json │ │ │ └── mod.rs │ │ ├── lambda │ │ │ └── mod.rs │ │ ├── map │ │ │ └── mod.rs │ │ ├── math │ │ │ ├── expm1.rs │ │ │ ├── hex.rs │ │ │ └── mod.rs │ │ ├── misc │ │ │ └── mod.rs │ │ ├── mod.rs │ │ ├── predicate │ │ │ └── mod.rs │ │ ├── string │ │ │ ├── ascii.rs │ │ │ ├── char.rs │ │ │ └── mod.rs │ │ ├── struct │ │ │ └── mod.rs │ │ ├── table │ │ │ └── mod.rs │ │ ├── url │ │ │ └── mod.rs │ │ ├── utils.rs │ │ ├── window │ │ │ └── mod.rs │ │ └── xml │ │ │ └── mod.rs │ │ └── lib.rs ├── sql │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── examples │ │ └── sql.rs │ ├── src │ │ ├── cte.rs │ │ ├── expr │ │ │ ├── binary_op.rs │ │ │ ├── function.rs │ │ │ ├── grouping_set.rs │ │ │ ├── identifier.rs │ │ │ ├── mod.rs │ │ │ ├── order_by.rs │ │ │ ├── subquery.rs │ │ │ ├── substring.rs │ │ │ ├── unary_op.rs │ │ │ └── value.rs │ │ ├── lib.rs │ │ ├── parser.rs │ │ ├── planner.rs │ │ ├── query.rs │ │ ├── relation │ │ │ ├── join.rs │ │ │ └── mod.rs │ │ ├── resolve.rs │ │ ├── select.rs │ │ ├── set_expr.rs │ │ ├── stack.rs │ │ ├── statement.rs │ │ ├── unparser │ │ │ ├── ast.rs │ │ │ ├── dialect.rs │ │ │ ├── expr.rs │ │ │ ├── extension_unparser.rs │ │ │ ├── mod.rs │ │ │ ├── plan.rs │ │ │ ├── rewrite.rs │ │ │ └── utils.rs │ │ ├── utils.rs │ │ └── values.rs │ └── tests │ │ ├── cases │ │ ├── collection.rs │ │ ├── diagnostic.rs │ │ ├── mod.rs │ │ ├── params.rs │ │ └── plan_to_sql.rs │ │ ├── common │ │ └── mod.rs │ │ └── sql_integration.rs ├── sqllogictest │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ ├── bin │ │ ├── postgres_container.rs │ │ └── sqllogictests.rs │ ├── data │ │ └── repeat_much.snappy.parquet │ ├── regenerate │ │ └── sqllogictests.rs │ ├── regenerate_sqlite_files.sh │ ├── src │ │ ├── engines │ │ │ ├── conversion.rs │ │ │ ├── datafusion_engine │ │ │ │ ├── error.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── normalize.rs │ │ │ │ └── runner.rs │ │ │ ├── mod.rs │ │ │ ├── output.rs │ │ │ └── postgres_engine │ │ │ │ ├── mod.rs │ │ │ │ └── types.rs │ │ ├── filters.rs │ │ ├── lib.rs │ │ ├── test_context.rs │ │ └── util.rs │ └── test_files │ │ ├── agg_func_substitute.slt │ │ ├── aggregate.slt │ │ ├── aggregate_skip_partial.slt │ │ ├── aggregates_topk.slt │ │ ├── alias.slt │ │ ├── array.slt │ │ ├── array_query.slt │ │ ├── arrow_files.slt │ │ ├── arrow_typeof.slt │ │ ├── avro.slt │ │ ├── binary.slt │ │ ├── binary_view.slt │ │ ├── case.slt │ │ ├── cast.slt │ │ ├── clickbench.slt │ │ ├── clickbench_extended.slt │ │ ├── coalesce.slt │ │ ├── copy.slt │ │ ├── count_star_rule.slt │ │ ├── create_external_table.slt │ │ ├── create_function.slt │ │ ├── cse.slt │ │ ├── csv_files.slt │ │ ├── cte.slt │ │ ├── dates.slt │ │ ├── ddl.slt │ │ ├── decimal.slt │ │ ├── delete.slt │ │ ├── describe.slt │ │ ├── dictionary.slt │ │ ├── distinct_on.slt │ │ ├── dynamic_file.slt │ │ ├── encoding.slt │ │ ├── errors.slt │ │ ├── explain.slt │ │ ├── explain_tree.slt │ │ ├── expr.slt │ │ ├── expr │ │ └── date_part.slt │ │ ├── filter_without_sort_exec.slt │ │ ├── float16.slt │ │ ├── functions.slt │ │ ├── group.slt │ │ ├── group_by.slt │ │ ├── grouping.slt │ │ ├── ident_normalization.slt │ │ ├── identifiers.slt │ │ ├── imdb.slt │ │ ├── information_schema.slt │ │ ├── information_schema_columns.slt │ │ ├── information_schema_multiple_catalogs.slt │ │ ├── information_schema_table_types.slt │ │ ├── insert.slt │ │ ├── insert_to_external.slt │ │ ├── intersection.slt │ │ ├── interval.slt │ │ ├── interval_mysql.slt │ │ ├── join.slt.part │ │ ├── join_disable_repartition_joins.slt │ │ ├── join_only.slt │ │ ├── joins.slt │ │ ├── json.slt │ │ ├── limit.slt │ │ ├── listing_table_statistics.slt │ │ ├── map.slt │ │ ├── math.slt │ │ ├── metadata.slt │ │ ├── min_max │ │ ├── fixed_size_list.slt │ │ ├── init_data.slt.part │ │ ├── large_list.slt │ │ ├── list.slt │ │ └── queries.slt.part │ │ ├── misc.slt │ │ ├── monotonic_projection_test.slt │ │ ├── nullif.slt │ │ ├── nvl.slt │ │ ├── nvl2.slt │ │ ├── operator.slt │ │ ├── optimizer_group_by_constant.slt │ │ ├── options.slt │ │ ├── order.slt │ │ ├── parquet.slt │ │ ├── parquet_filter_pushdown.slt │ │ ├── parquet_sorted_statistics.slt │ │ ├── parquet_statistics.slt │ │ ├── pg_compat │ │ ├── pg_compat_null.slt │ │ ├── pg_compat_simple.slt │ │ ├── pg_compat_type_coercion.slt │ │ ├── pg_compat_types.slt │ │ ├── pg_compat_union.slt │ │ └── pg_compat_window.slt │ │ ├── predicates.slt │ │ ├── prepare.slt │ │ ├── projection.slt │ │ ├── push_down_filter.slt │ │ ├── references.slt │ │ ├── regexp │ │ ├── README.md │ │ ├── init_data.slt.part │ │ ├── regexp_count.slt │ │ ├── regexp_like.slt │ │ ├── regexp_match.slt │ │ └── regexp_replace.slt │ │ ├── repartition.slt │ │ ├── repartition_scan.slt │ │ ├── same_column_name_cross_join.slt │ │ ├── scalar.slt │ │ ├── schema_evolution.slt │ │ ├── select.slt │ │ ├── set_variable.slt │ │ ├── simplify_expr.slt │ │ ├── sort_merge_join.slt │ │ ├── spark │ │ ├── README.md │ │ ├── hash │ │ │ └── sha2.slt │ │ ├── math │ │ │ ├── expm1.slt │ │ │ └── hex.slt │ │ └── string │ │ │ ├── ascii.slt │ │ │ └── char.slt │ │ ├── string │ │ ├── README.md │ │ ├── dictionary_utf8.slt │ │ ├── init_data.slt.part │ │ ├── large_string.slt │ │ ├── string.slt │ │ ├── string_literal.slt │ │ ├── string_query.slt.part │ │ └── string_view.slt │ │ ├── strings.slt │ │ ├── struct.slt │ │ ├── subquery.slt │ │ ├── subquery_sort.slt │ │ ├── table_functions.slt │ │ ├── timestamps.slt │ │ ├── topk.slt │ │ ├── tpch │ │ ├── answers │ │ │ ├── q1.slt.part │ │ │ ├── q10.slt.part │ │ │ ├── q11.slt.part │ │ │ ├── q12.slt.part │ │ │ ├── q13.slt.part │ │ │ ├── q14.slt.part │ │ │ ├── q15.slt.part │ │ │ ├── q16.slt.part │ │ │ ├── q17.slt.part │ │ │ ├── q18.slt.part │ │ │ ├── q19.slt.part │ │ │ ├── q2.slt.part │ │ │ ├── q20.slt.part │ │ │ ├── q21.slt.part │ │ │ ├── q22.slt.part │ │ │ ├── q3.slt.part │ │ │ ├── q4.slt.part │ │ │ ├── q5.slt.part │ │ │ ├── q6.slt.part │ │ │ ├── q7.slt.part │ │ │ ├── q8.slt.part │ │ │ └── q9.slt.part │ │ ├── create_tables.slt.part │ │ ├── drop_tables.slt.part │ │ ├── plans │ │ │ ├── q1.slt.part │ │ │ ├── q10.slt.part │ │ │ ├── q11.slt.part │ │ │ ├── q12.slt.part │ │ │ ├── q13.slt.part │ │ │ ├── q14.slt.part │ │ │ ├── q15.slt.part │ │ │ ├── q16.slt.part │ │ │ ├── q17.slt.part │ │ │ ├── q18.slt.part │ │ │ ├── q19.slt.part │ │ │ ├── q2.slt.part │ │ │ ├── q20.slt.part │ │ │ ├── q21.slt.part │ │ │ ├── q22.slt.part │ │ │ ├── q3.slt.part │ │ │ ├── q4.slt.part │ │ │ ├── q5.slt.part │ │ │ ├── q6.slt.part │ │ │ ├── q7.slt.part │ │ │ ├── q8.slt.part │ │ │ └── q9.slt.part │ │ └── tpch.slt │ │ ├── type_coercion.slt │ │ ├── union.slt │ │ ├── union_by_name.slt │ │ ├── union_function.slt │ │ ├── unnest.slt │ │ ├── update.slt │ │ ├── wildcard.slt │ │ └── window.slt ├── substrait │ ├── Cargo.toml │ ├── LICENSE.txt │ ├── NOTICE.txt │ ├── README.md │ ├── src │ │ ├── extensions.rs │ │ ├── lib.rs │ │ ├── logical_plan │ │ │ ├── consumer │ │ │ │ ├── expr │ │ │ │ │ ├── aggregate_function.rs │ │ │ │ │ ├── cast.rs │ │ │ │ │ ├── field_reference.rs │ │ │ │ │ ├── function_arguments.rs │ │ │ │ │ ├── if_then.rs │ │ │ │ │ ├── literal.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── scalar_function.rs │ │ │ │ │ ├── singular_or_list.rs │ │ │ │ │ ├── subquery.rs │ │ │ │ │ └── window_function.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── plan.rs │ │ │ │ ├── rel │ │ │ │ │ ├── aggregate_rel.rs │ │ │ │ │ ├── cross_rel.rs │ │ │ │ │ ├── exchange_rel.rs │ │ │ │ │ ├── fetch_rel.rs │ │ │ │ │ ├── filter_rel.rs │ │ │ │ │ ├── join_rel.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── project_rel.rs │ │ │ │ │ ├── read_rel.rs │ │ │ │ │ ├── set_rel.rs │ │ │ │ │ └── sort_rel.rs │ │ │ │ ├── substrait_consumer.rs │ │ │ │ ├── types.rs │ │ │ │ └── utils.rs │ │ │ ├── mod.rs │ │ │ └── producer │ │ │ │ ├── expr │ │ │ │ ├── aggregate_function.rs │ │ │ │ ├── cast.rs │ │ │ │ ├── field_reference.rs │ │ │ │ ├── if_then.rs │ │ │ │ ├── literal.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── scalar_function.rs │ │ │ │ ├── singular_or_list.rs │ │ │ │ ├── subquery.rs │ │ │ │ └── window_function.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── plan.rs │ │ │ │ ├── rel │ │ │ │ ├── aggregate_rel.rs │ │ │ │ ├── exchange_rel.rs │ │ │ │ ├── fetch_rel.rs │ │ │ │ ├── filter_rel.rs │ │ │ │ ├── join.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── project_rel.rs │ │ │ │ ├── read_rel.rs │ │ │ │ ├── set_rel.rs │ │ │ │ └── sort_rel.rs │ │ │ │ ├── substrait_producer.rs │ │ │ │ ├── types.rs │ │ │ │ └── utils.rs │ │ ├── physical_plan │ │ │ ├── consumer.rs │ │ │ ├── mod.rs │ │ │ └── producer.rs │ │ ├── serializer.rs │ │ └── variation_const.rs │ └── tests │ │ ├── cases │ │ ├── consumer_integration.rs │ │ ├── emit_kind_tests.rs │ │ ├── function_test.rs │ │ ├── logical_plans.rs │ │ ├── mod.rs │ │ ├── roundtrip_logical_plan.rs │ │ ├── roundtrip_physical_plan.rs │ │ ├── serialize.rs │ │ └── substrait_validations.rs │ │ ├── substrait_integration.rs │ │ ├── testdata │ │ ├── Readme.md │ │ ├── contains_plan.substrait.json │ │ ├── data.csv │ │ ├── data.parquet │ │ ├── empty.csv │ │ ├── empty.parquet │ │ ├── test_plans │ │ │ ├── aggregate_identical_grouping_expressions.substrait.json │ │ │ ├── aggregate_no_project.substrait.json │ │ │ ├── aggregate_no_project_group_expression_ref.substrait.json │ │ │ ├── aggregate_sorted_no_project.substrait.json │ │ │ ├── double_window.substrait.json │ │ │ ├── double_window_distinct_windows.substrait.json │ │ │ ├── emit_kind │ │ │ │ ├── direct_on_project.substrait.json │ │ │ │ └── emit_on_filter.substrait.json │ │ │ ├── intersect.substrait.json │ │ │ ├── intersect_multiset.substrait.json │ │ │ ├── intersect_multiset_all.substrait.json │ │ │ ├── intersect_primary.substrait.json │ │ │ ├── minus_primary.substrait.json │ │ │ ├── minus_primary_all.substrait.json │ │ │ ├── multilayer_aggregate.substrait.json │ │ │ ├── multiple_joins.json │ │ │ ├── multiple_unions.json │ │ │ ├── non_nullable_lists.substrait.json │ │ │ ├── select_count_from_select_1.substrait.json │ │ │ ├── select_not_bool.substrait.json │ │ │ ├── select_window.substrait.json │ │ │ ├── select_window_count.substrait.json │ │ │ ├── simple_select.substrait.json │ │ │ ├── simple_select_with_mask.substrait.json │ │ │ └── union_distinct.substrait.json │ │ └── tpch_substrait_plans │ │ │ ├── README.md │ │ │ ├── query_01_plan.json │ │ │ ├── query_02_plan.json │ │ │ ├── query_03_plan.json │ │ │ ├── query_04_plan.json │ │ │ ├── query_05_plan.json │ │ │ ├── query_06_plan.json │ │ │ ├── query_07_plan.json │ │ │ ├── query_08_plan.json │ │ │ ├── query_09_plan.json │ │ │ ├── query_10_plan.json │ │ │ ├── query_11_plan.json │ │ │ ├── query_12_plan.json │ │ │ ├── query_13_plan.json │ │ │ ├── query_14_plan.json │ │ │ ├── query_15_plan.json │ │ │ ├── query_16_plan.json │ │ │ ├── query_17_plan.json │ │ │ ├── query_18_plan.json │ │ │ ├── query_19_plan.json │ │ │ ├── query_20_plan.json │ │ │ ├── query_21_plan.json │ │ │ └── query_22_plan.json │ │ └── utils.rs └── wasmtest │ ├── Cargo.toml │ ├── README.md │ ├── datafusion-wasm-app │ ├── .gitignore │ ├── README.md │ ├── bootstrap.js │ ├── index.html │ ├── index.js │ ├── package-lock.json │ ├── package.json │ └── webpack.config.js │ ├── src │ └── lib.rs │ └── webdriver.json ├── dev ├── build-set-env.sh ├── changelog │ ├── 10.0.0.md │ ├── 11.0.0.md │ ├── 12.0.0.md │ ├── 13.0.0.md │ ├── 14.0.0.md │ ├── 15.0.0.md │ ├── 16.0.0.md │ ├── 16.1.0.md │ ├── 17.0.0.md │ ├── 18.0.0.md │ ├── 19.0.0.md │ ├── 20.0.0.md │ ├── 21.0.0.md │ ├── 21.1.0.md │ ├── 22.0.0.md │ ├── 23.0.0.md │ ├── 24.0.0.md │ ├── 25.0.0.md │ ├── 26.0.0.md │ ├── 27.0.0.md │ ├── 28.0.0.md │ ├── 29.0.0.md │ ├── 30.0.0.md │ ├── 31.0.0.md │ ├── 32.0.0.md │ ├── 33.0.0.md │ ├── 34.0.0.md │ ├── 35.0.0.md │ ├── 36.0.0.md │ ├── 37.0.0.md │ ├── 37.1.0.md │ ├── 38.0.0.md │ ├── 39.0.0.md │ ├── 40.0.0.md │ ├── 41.0.0.md │ ├── 42.0.0.md │ ├── 42.1.0.md │ ├── 42.2.0.md │ ├── 43.0.0.md │ ├── 44.0.0.md │ ├── 45.0.0.md │ ├── 46.0.0.md │ ├── 46.0.1.md │ ├── 47.0.0.md │ ├── 5.0.0.md │ ├── 6.0.0.md │ ├── 7.0.0.md │ ├── 7.1.0.md │ ├── 8.0.0.md │ └── 9.0.0.md ├── create_license.py ├── depcheck │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── main.rs ├── release │ ├── README.md │ ├── check-rat-report.py │ ├── create-tarball.sh │ ├── download-python-wheels.py │ ├── generate-changelog.py │ ├── publish_homebrew.sh │ ├── rat_exclude_files.txt │ ├── release-tarball.sh │ └── verify-release-candidate.sh ├── requirements.txt ├── rust_lint.sh ├── update_arrow_deps.py ├── update_config_docs.sh ├── update_datafusion_versions.py ├── update_function_docs.sh └── update_runtime_config_docs.sh ├── doap.rdf ├── docs ├── .gitignore ├── Makefile ├── README.md ├── build.sh ├── logos │ ├── Datafusion_Branding_Guideline.pdf │ ├── old_logo │ │ ├── DataFUSION-Logo-Dark.svg │ │ ├── DataFUSION-Logo-Dark@2x.png │ │ ├── DataFUSION-Logo-Dark@4x.png │ │ ├── DataFUSION-Logo-Light.svg │ │ ├── DataFUSION-Logo-Light@2x.png │ │ ├── DataFUSION-Logo-Light@4x.png │ │ └── DataFusion-LogoAndColorPaletteExploration_v01.pdf │ ├── primary_mark │ │ ├── black.png │ │ ├── black.svg │ │ ├── black2x.png │ │ ├── black4x.png │ │ ├── mixed.png │ │ ├── mixed.svg │ │ ├── mixed2x.png │ │ ├── mixed4x.png │ │ ├── original.png │ │ ├── original.svg │ │ ├── original2x.png │ │ ├── original4x.png │ │ ├── white.png │ │ ├── white.svg │ │ ├── white2x.png │ │ └── white4x.png │ └── standalone_logo │ │ ├── logo_black.png │ │ ├── logo_black.svg │ │ ├── logo_black2x.png │ │ ├── logo_black4x.png │ │ ├── logo_original.png │ │ ├── logo_original.svg │ │ ├── logo_original2x.png │ │ ├── logo_original4x.png │ │ ├── logo_white.png │ │ ├── logo_white.svg │ │ ├── logo_white2x.png │ │ └── logo_white4x.png ├── make.bat ├── requirements.txt ├── rustdoc_trim.py └── source │ ├── _static │ ├── images │ │ ├── 2x_bgwhite_original.png │ │ ├── flamegraph.svg │ │ ├── old_logo │ │ │ ├── DataFusion-Logo-Background-White.png │ │ │ ├── DataFusion-Logo-Background-White.svg │ │ │ ├── DataFusion-Logo-Dark.png │ │ │ ├── DataFusion-Logo-Dark.svg │ │ │ ├── DataFusion-Logo-Light.png │ │ │ └── DataFusion-Logo-Light.svg │ │ ├── original.png │ │ ├── original.svg │ │ └── original2x.png │ └── theme_overrides.css │ ├── _templates │ ├── docs-sidebar.html │ └── layout.html │ ├── conf.py │ ├── contributor-guide │ ├── api-health.md │ ├── architecture.md │ ├── communication.md │ ├── development_environment.md │ ├── governance.md │ ├── gsoc_application_guidelines.md │ ├── gsoc_project_ideas.md │ ├── howtos.md │ ├── index.md │ ├── inviting.md │ ├── roadmap.md │ ├── specification │ │ ├── index.rst │ │ ├── invariants.md │ │ └── output-field-name-semantic.md │ └── testing.md │ ├── download.md │ ├── index.rst │ ├── library-user-guide │ ├── adding-udfs.md │ ├── building-logical-plans.md │ ├── catalogs.md │ ├── custom-table-providers.md │ ├── extending-operators.md │ ├── extensions.md │ ├── index.md │ ├── profiling.md │ ├── query-optimizer.md │ ├── samply_profiler.png │ ├── upgrading.md │ ├── using-the-dataframe-api.md │ ├── using-the-sql-api.md │ └── working-with-exprs.md │ └── user-guide │ ├── cli │ ├── datasources.md │ ├── index.rst │ ├── installation.md │ ├── overview.md │ └── usage.md │ ├── concepts-readings-events.md │ ├── configs.md │ ├── crate-configuration.md │ ├── dataframe.md │ ├── example-usage.md │ ├── explain-usage.md │ ├── expressions.md │ ├── faq.md │ ├── features.md │ ├── introduction.md │ ├── runtime_configs.md │ └── sql │ ├── aggregate_functions.md │ ├── data_types.md │ ├── ddl.md │ ├── dml.md │ ├── explain.md │ ├── format_options.md │ ├── index.rst │ ├── information_schema.md │ ├── operators.md │ ├── prepared_statements.md │ ├── scalar_functions.md │ ├── select.md │ ├── special_functions.md │ ├── subqueries.md │ └── window_functions.md ├── header ├── licenserc.toml ├── pre-commit.sh ├── python └── README.md ├── rust-toolchain.toml ├── rustfmt.toml ├── taplo.toml └── test-utils ├── Cargo.toml └── src ├── array_gen ├── binary.rs ├── boolean.rs ├── decimal.rs ├── mod.rs ├── primitive.rs ├── random_data.rs └── string.rs ├── data_gen.rs ├── lib.rs ├── string_gen.rs ├── tpcds.rs └── tpch.rs /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:bookworm 2 | 3 | RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 4 | # Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131 5 | && apt-get purge -y imagemagick imagemagick-6-common 6 | 7 | # Add protoc 8 | # https://datafusion.apache.org/contributor-guide/getting_started.html#protoc-installation 9 | RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip \ 10 | && unzip protoc-25.1-linux-x86_64.zip -d $HOME/.local \ 11 | && rm protoc-25.1-linux-x86_64.zip 12 | 13 | ENV PATH="$PATH:$HOME/.local/bin" -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "dockerfile": "./Dockerfile", 4 | "context": "." 5 | }, 6 | "customizations": { 7 | "vscode": { 8 | "extensions": [ 9 | "rust-lang.rust-analyzer" 10 | ] 11 | } 12 | }, 13 | "features": { 14 | "ghcr.io/devcontainers/features/rust:1": "latest" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | **target 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | root = true 19 | 20 | [*] 21 | charset = utf-8 22 | end_of_line = lf 23 | insert_final_newline = true 24 | 25 | [*.rs] 26 | indent_style = space 27 | indent_size = 4 28 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | .github/ export-ignore 2 | datafusion/core/tests/data/newlines_in_values.csv text eol=lf 3 | datafusion/proto/src/generated/prost.rs linguist-generated 4 | datafusion/proto/src/generated/pbjson.rs linguist-generated 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "parquet-testing"] 2 | path = parquet-testing 3 | url = https://github.com/apache/parquet-testing.git 4 | [submodule "testing"] 5 | path = testing 6 | url = https://github.com/apache/arrow-testing 7 | [submodule "datafusion-testing"] 8 | path = datafusion-testing 9 | url = https://github.com/apache/datafusion-testing.git 10 | branch = main 11 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # Code of Conduct 21 | 22 | - [Code of Conduct for The Apache Software Foundation][1] 23 | 24 | [1]: https://www.apache.org/foundation/policies/conduct.html 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | See the [Contributor Guide](https://datafusion.apache.org/contributor-guide/index.html) 21 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Apache DataFusion 2 | Copyright 2019-2025 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /benchmarks/.gitignore: -------------------------------------------------------------------------------- 1 | data 2 | results 3 | venv 4 | -------------------------------------------------------------------------------- /benchmarks/queries/h2o/groupby.sql: -------------------------------------------------------------------------------- 1 | SELECT id1, SUM(v1) AS v1 FROM x GROUP BY id1; 2 | 3 | SELECT id1, id2, SUM(v1) AS v1 FROM x GROUP BY id1, id2; 4 | 5 | SELECT id3, SUM(v1) AS v1, AVG(v3) AS v3 FROM x GROUP BY id3; 6 | 7 | SELECT id4, AVG(v1) AS v1, AVG(v2) AS v2, AVG(v3) AS v3 FROM x GROUP BY id4; 8 | 9 | SELECT id6, SUM(v1) AS v1, SUM(v2) AS v2, SUM(v3) AS v3 FROM x GROUP BY id6; 10 | 11 | SELECT id4, id5, MEDIAN(v3) AS median_v3, STDDEV(v3) AS sd_v3 FROM x GROUP BY id4, id5; 12 | 13 | SELECT id3, MAX(v1) - MIN(v2) AS range_v1_v2 FROM x GROUP BY id3; 14 | 15 | SELECT id6, largest2_v3 FROM (SELECT id6, v3 AS largest2_v3, ROW_NUMBER() OVER (PARTITION BY id6 ORDER BY v3 DESC) AS order_v3 FROM x WHERE v3 IS NOT NULL) sub_query WHERE order_v3 <= 2; 16 | 17 | SELECT id2, id4, POWER(CORR(v1, v2), 2) AS r2 FROM x GROUP BY id2, id4; 18 | 19 | SELECT id1, id2, id3, id4, id5, id6, SUM(v3) AS v3, COUNT(*) AS count FROM x GROUP BY id1, id2, id3, id4, id5, id6; -------------------------------------------------------------------------------- /benchmarks/queries/imdb/10a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(chn.name) AS uncredited_voiced_character, MIN(t.title) AS russian_movie FROM char_name AS chn, cast_info AS ci, company_name AS cn, company_type AS ct, movie_companies AS mc, role_type AS rt, title AS t WHERE ci.note like '%(voice)%' and ci.note like '%(uncredited)%' AND cn.country_code = '[ru]' AND rt.role = 'actor' AND t.production_year > 2005 AND t.id = mc.movie_id AND t.id = ci.movie_id AND ci.movie_id = mc.movie_id AND chn.id = ci.person_role_id AND rt.id = ci.role_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/10b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(chn.name) AS character, MIN(t.title) AS russian_mov_with_actor_producer FROM char_name AS chn, cast_info AS ci, company_name AS cn, company_type AS ct, movie_companies AS mc, role_type AS rt, title AS t WHERE ci.note like '%(producer)%' AND cn.country_code = '[ru]' AND rt.role = 'actor' AND t.production_year > 2010 AND t.id = mc.movie_id AND t.id = ci.movie_id AND ci.movie_id = mc.movie_id AND chn.id = ci.person_role_id AND rt.id = ci.role_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/10c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(chn.name) AS character, MIN(t.title) AS movie_with_american_producer FROM char_name AS chn, cast_info AS ci, company_name AS cn, company_type AS ct, movie_companies AS mc, role_type AS rt, title AS t WHERE ci.note like '%(producer)%' AND cn.country_code = '[us]' AND t.production_year > 1990 AND t.id = mc.movie_id AND t.id = ci.movie_id AND ci.movie_id = mc.movie_id AND chn.id = ci.person_role_id AND rt.id = ci.role_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/11a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS from_company, MIN(lt.link) AS movie_link_type, MIN(t.title) AS non_polish_sequel_movie FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' AND (cn.name LIKE '%Film%' OR cn.name LIKE '%Warner%') AND ct.kind ='production companies' AND k.keyword ='sequel' AND lt.link LIKE '%follow%' AND mc.note IS NULL AND t.production_year BETWEEN 1950 AND 2000 AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/11b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS from_company, MIN(lt.link) AS movie_link_type, MIN(t.title) AS sequel_movie FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' AND (cn.name LIKE '%Film%' OR cn.name LIKE '%Warner%') AND ct.kind ='production companies' AND k.keyword ='sequel' AND lt.link LIKE '%follows%' AND mc.note IS NULL AND t.production_year = 1998 and t.title like '%Money%' AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/11c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS from_company, MIN(mc.note) AS production_note, MIN(t.title) AS movie_based_on_book FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' and (cn.name like '20th Century Fox%' or cn.name like 'Twentieth Century Fox%') AND ct.kind != 'production companies' and ct.kind is not NULL AND k.keyword in ('sequel', 'revenge', 'based-on-novel') AND mc.note is not NULL AND t.production_year > 1950 AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/11d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS from_company, MIN(mc.note) AS production_note, MIN(t.title) AS movie_based_on_book FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' AND ct.kind != 'production companies' and ct.kind is not NULL AND k.keyword in ('sequel', 'revenge', 'based-on-novel') AND mc.note is not NULL AND t.production_year > 1950 AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/12a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS movie_company, MIN(mi_idx.info) AS rating, MIN(t.title) AS drama_horror_movie FROM company_name AS cn, company_type AS ct, info_type AS it1, info_type AS it2, movie_companies AS mc, movie_info AS mi, movie_info_idx AS mi_idx, title AS t WHERE cn.country_code = '[us]' AND ct.kind = 'production companies' AND it1.info = 'genres' AND it2.info = 'rating' AND mi.info in ('Drama', 'Horror') AND mi_idx.info > '8.0' AND t.production_year between 2005 and 2008 AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND mi.info_type_id = it1.id AND mi_idx.info_type_id = it2.id AND t.id = mc.movie_id AND ct.id = mc.company_type_id AND cn.id = mc.company_id AND mc.movie_id = mi.movie_id AND mc.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/12b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS budget, MIN(t.title) AS unsuccsessful_movie FROM company_name AS cn, company_type AS ct, info_type AS it1, info_type AS it2, movie_companies AS mc, movie_info AS mi, movie_info_idx AS mi_idx, title AS t WHERE cn.country_code ='[us]' AND ct.kind is not NULL and (ct.kind ='production companies' or ct.kind = 'distributors') AND it1.info ='budget' AND it2.info ='bottom 10 rank' AND t.production_year >2000 AND (t.title LIKE 'Birdemic%' OR t.title LIKE '%Movie%') AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND mi.info_type_id = it1.id AND mi_idx.info_type_id = it2.id AND t.id = mc.movie_id AND ct.id = mc.company_type_id AND cn.id = mc.company_id AND mc.movie_id = mi.movie_id AND mc.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/12c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS movie_company, MIN(mi_idx.info) AS rating, MIN(t.title) AS mainstream_movie FROM company_name AS cn, company_type AS ct, info_type AS it1, info_type AS it2, movie_companies AS mc, movie_info AS mi, movie_info_idx AS mi_idx, title AS t WHERE cn.country_code = '[us]' AND ct.kind = 'production companies' AND it1.info = 'genres' AND it2.info = 'rating' AND mi.info in ('Drama', 'Horror', 'Western', 'Family') AND mi_idx.info > '7.0' AND t.production_year between 2000 and 2010 AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND mi.info_type_id = it1.id AND mi_idx.info_type_id = it2.id AND t.id = mc.movie_id AND ct.id = mc.company_type_id AND cn.id = mc.company_id AND mc.movie_id = mi.movie_id AND mc.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/13a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS release_date, MIN(miidx.info) AS rating, MIN(t.title) AS german_movie FROM company_name AS cn, company_type AS ct, info_type AS it, info_type AS it2, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_info_idx AS miidx, title AS t WHERE cn.country_code ='[de]' AND ct.kind ='production companies' AND it.info ='rating' AND it2.info ='release dates' AND kt.kind ='movie' AND mi.movie_id = t.id AND it2.id = mi.info_type_id AND kt.id = t.kind_id AND mc.movie_id = t.id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND miidx.movie_id = t.id AND it.id = miidx.info_type_id AND mi.movie_id = miidx.movie_id AND mi.movie_id = mc.movie_id AND miidx.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/13b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS producing_company, MIN(miidx.info) AS rating, MIN(t.title) AS movie_about_winning FROM company_name AS cn, company_type AS ct, info_type AS it, info_type AS it2, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_info_idx AS miidx, title AS t WHERE cn.country_code ='[us]' AND ct.kind ='production companies' AND it.info ='rating' AND it2.info ='release dates' AND kt.kind ='movie' AND t.title != '' AND (t.title LIKE '%Champion%' OR t.title LIKE '%Loser%') AND mi.movie_id = t.id AND it2.id = mi.info_type_id AND kt.id = t.kind_id AND mc.movie_id = t.id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND miidx.movie_id = t.id AND it.id = miidx.info_type_id AND mi.movie_id = miidx.movie_id AND mi.movie_id = mc.movie_id AND miidx.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/13c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS producing_company, MIN(miidx.info) AS rating, MIN(t.title) AS movie_about_winning FROM company_name AS cn, company_type AS ct, info_type AS it, info_type AS it2, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_info_idx AS miidx, title AS t WHERE cn.country_code ='[us]' AND ct.kind ='production companies' AND it.info ='rating' AND it2.info ='release dates' AND kt.kind ='movie' AND t.title != '' AND (t.title LIKE 'Champion%' OR t.title LIKE 'Loser%') AND mi.movie_id = t.id AND it2.id = mi.info_type_id AND kt.id = t.kind_id AND mc.movie_id = t.id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND miidx.movie_id = t.id AND it.id = miidx.info_type_id AND mi.movie_id = miidx.movie_id AND mi.movie_id = mc.movie_id AND miidx.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/13d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS producing_company, MIN(miidx.info) AS rating, MIN(t.title) AS movie FROM company_name AS cn, company_type AS ct, info_type AS it, info_type AS it2, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_info_idx AS miidx, title AS t WHERE cn.country_code ='[us]' AND ct.kind ='production companies' AND it.info ='rating' AND it2.info ='release dates' AND kt.kind ='movie' AND mi.movie_id = t.id AND it2.id = mi.info_type_id AND kt.id = t.kind_id AND mc.movie_id = t.id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND miidx.movie_id = t.id AND it.id = miidx.info_type_id AND mi.movie_id = miidx.movie_id AND mi.movie_id = mc.movie_id AND miidx.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/14a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS northern_dark_movie FROM info_type AS it1, info_type AS it2, keyword AS k, kind_type AS kt, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t WHERE it1.info = 'countries' AND it2.info = 'rating' AND k.keyword in ('murder', 'murder-in-title', 'blood', 'violence') AND kt.kind = 'movie' AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German', 'USA', 'American') AND mi_idx.info < '8.5' AND t.production_year > 2010 AND kt.id = t.kind_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mi_idx.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/14b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS western_dark_production FROM info_type AS it1, info_type AS it2, keyword AS k, kind_type AS kt, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t WHERE it1.info = 'countries' AND it2.info = 'rating' AND k.keyword in ('murder', 'murder-in-title') AND kt.kind = 'movie' AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German', 'USA', 'American') AND mi_idx.info > '6.0' AND t.production_year > 2010 and (t.title like '%murder%' or t.title like '%Murder%' or t.title like '%Mord%') AND kt.id = t.kind_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mi_idx.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/14c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS north_european_dark_production FROM info_type AS it1, info_type AS it2, keyword AS k, kind_type AS kt, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t WHERE it1.info = 'countries' AND it2.info = 'rating' AND k.keyword is not null and k.keyword in ('murder', 'murder-in-title', 'blood', 'violence') AND kt.kind in ('movie', 'episode') AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Danish', 'Norwegian', 'German', 'USA', 'American') AND mi_idx.info < '8.5' AND t.production_year > 2005 AND kt.id = t.kind_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mi_idx.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/15a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS release_date, MIN(t.title) AS internet_movie FROM aka_title AS at, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cn.country_code = '[us]' AND it1.info = 'release dates' AND mc.note like '%(200%)%' and mc.note like '%(worldwide)%' AND mi.note like '%internet%' AND mi.info like 'USA:% 200%' AND t.production_year > 2000 AND t.id = at.movie_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = at.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = at.movie_id AND mc.movie_id = at.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/15b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS release_date, MIN(t.title) AS youtube_movie FROM aka_title AS at, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cn.country_code = '[us]' and cn.name = 'YouTube' AND it1.info = 'release dates' AND mc.note like '%(200%)%' and mc.note like '%(worldwide)%' AND mi.note like '%internet%' AND mi.info like 'USA:% 200%' AND t.production_year between 2005 and 2010 AND t.id = at.movie_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = at.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = at.movie_id AND mc.movie_id = at.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/15c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS release_date, MIN(t.title) AS modern_american_internet_movie FROM aka_title AS at, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cn.country_code = '[us]' AND it1.info = 'release dates' AND mi.note like '%internet%' AND mi.info is not NULL and (mi.info like 'USA:% 199%' or mi.info like 'USA:% 200%') AND t.production_year > 1990 AND t.id = at.movie_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = at.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = at.movie_id AND mc.movie_id = at.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/15d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(at.title) AS aka_title, MIN(t.title) AS internet_movie_title FROM aka_title AS at, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cn.country_code = '[us]' AND it1.info = 'release dates' AND mi.note like '%internet%' AND t.production_year > 1990 AND t.id = at.movie_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = at.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = at.movie_id AND mc.movie_id = at.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/16a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS cool_actor_pseudonym, MIN(t.title) AS series_named_after_char FROM aka_name AS an, cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND t.episode_nr >= 50 AND t.episode_nr < 100 AND an.person_id = n.id AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND an.person_id = ci.person_id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/16b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS cool_actor_pseudonym, MIN(t.title) AS series_named_after_char FROM aka_name AS an, cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND an.person_id = n.id AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND an.person_id = ci.person_id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/16c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS cool_actor_pseudonym, MIN(t.title) AS series_named_after_char FROM aka_name AS an, cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND t.episode_nr < 100 AND an.person_id = n.id AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND an.person_id = ci.person_id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/16d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS cool_actor_pseudonym, MIN(t.title) AS series_named_after_char FROM aka_name AS an, cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND t.episode_nr >= 5 AND t.episode_nr < 100 AND an.person_id = n.id AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND an.person_id = ci.person_id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/17a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS member_in_charnamed_american_movie, MIN(n.name) AS a1 FROM cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND n.name LIKE 'B%' AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/17b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS member_in_charnamed_movie, MIN(n.name) AS a1 FROM cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword ='character-name-in-title' AND n.name LIKE 'Z%' AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/17c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS member_in_charnamed_movie, MIN(n.name) AS a1 FROM cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword ='character-name-in-title' AND n.name LIKE 'X%' AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/17d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS member_in_charnamed_movie FROM cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword ='character-name-in-title' AND n.name LIKE '%Bert%' AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/17e.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS member_in_charnamed_movie FROM cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/17f.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS member_in_charnamed_movie FROM cast_info AS ci, company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword ='character-name-in-title' AND n.name LIKE '%B%' AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.movie_id = mc.movie_id AND ci.movie_id = mk.movie_id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/18a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(t.title) AS movie_title FROM cast_info AS ci, info_type AS it1, info_type AS it2, movie_info AS mi, movie_info_idx AS mi_idx, name AS n, title AS t WHERE ci.note in ('(producer)', '(executive producer)') AND it1.info = 'budget' AND it2.info = 'votes' AND n.gender = 'm' and n.name like '%Tim%' AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND t.id = ci.movie_id AND ci.movie_id = mi.movie_id AND ci.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id AND n.id = ci.person_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/18b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(t.title) AS movie_title FROM cast_info AS ci, info_type AS it1, info_type AS it2, movie_info AS mi, movie_info_idx AS mi_idx, name AS n, title AS t WHERE ci.note in ('(writer)', '(head writer)', '(written by)', '(story)', '(story editor)') AND it1.info = 'genres' AND it2.info = 'rating' AND mi.info in ('Horror', 'Thriller') and mi.note is NULL AND mi_idx.info > '8.0' AND n.gender is not null and n.gender = 'f' AND t.production_year between 2008 and 2014 AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND t.id = ci.movie_id AND ci.movie_id = mi.movie_id AND ci.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id AND n.id = ci.person_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/18c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(t.title) AS movie_title FROM cast_info AS ci, info_type AS it1, info_type AS it2, movie_info AS mi, movie_info_idx AS mi_idx, name AS n, title AS t WHERE ci.note in ('(writer)', '(head writer)', '(written by)', '(story)', '(story editor)') AND it1.info = 'genres' AND it2.info = 'votes' AND mi.info in ('Horror', 'Action', 'Sci-Fi', 'Thriller', 'Crime', 'War') AND n.gender = 'm' AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND t.id = ci.movie_id AND ci.movie_id = mi.movie_id AND ci.movie_id = mi_idx.movie_id AND mi.movie_id = mi_idx.movie_id AND n.id = ci.person_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/19a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS voicing_actress, MIN(t.title) AS voiced_movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, info_type AS it, movie_companies AS mc, movie_info AS mi, name AS n, role_type AS rt, title AS t WHERE ci.note in ('(voice)', '(voice: Japanese version)', '(voice) (uncredited)', '(voice: English version)') AND cn.country_code ='[us]' AND it.info = 'release dates' AND mc.note is not NULL and (mc.note like '%(USA)%' or mc.note like '%(worldwide)%') AND mi.info is not null and (mi.info like 'Japan:%200%' or mi.info like 'USA:%200%') AND n.gender ='f' and n.name like '%Ang%' AND rt.role ='actress' AND t.production_year between 2005 and 2009 AND t.id = mi.movie_id AND t.id = mc.movie_id AND t.id = ci.movie_id AND mc.movie_id = ci.movie_id AND mc.movie_id = mi.movie_id AND mi.movie_id = ci.movie_id AND cn.id = mc.company_id AND it.id = mi.info_type_id AND n.id = ci.person_id AND rt.id = ci.role_id AND n.id = an.person_id AND ci.person_id = an.person_id AND chn.id = ci.person_role_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/19b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS voicing_actress, MIN(t.title) AS kung_fu_panda FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, info_type AS it, movie_companies AS mc, movie_info AS mi, name AS n, role_type AS rt, title AS t WHERE ci.note = '(voice)' AND cn.country_code ='[us]' AND it.info = 'release dates' AND mc.note like '%(200%)%' and (mc.note like '%(USA)%' or mc.note like '%(worldwide)%') AND mi.info is not null and (mi.info like 'Japan:%2007%' or mi.info like 'USA:%2008%') AND n.gender ='f' and n.name like '%Angel%' AND rt.role ='actress' AND t.production_year between 2007 and 2008 and t.title like '%Kung%Fu%Panda%' AND t.id = mi.movie_id AND t.id = mc.movie_id AND t.id = ci.movie_id AND mc.movie_id = ci.movie_id AND mc.movie_id = mi.movie_id AND mi.movie_id = ci.movie_id AND cn.id = mc.company_id AND it.id = mi.info_type_id AND n.id = ci.person_id AND rt.id = ci.role_id AND n.id = an.person_id AND ci.person_id = an.person_id AND chn.id = ci.person_role_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/19c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS voicing_actress, MIN(t.title) AS jap_engl_voiced_movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, info_type AS it, movie_companies AS mc, movie_info AS mi, name AS n, role_type AS rt, title AS t WHERE ci.note in ('(voice)', '(voice: Japanese version)', '(voice) (uncredited)', '(voice: English version)') AND cn.country_code ='[us]' AND it.info = 'release dates' AND mi.info is not null and (mi.info like 'Japan:%200%' or mi.info like 'USA:%200%') AND n.gender ='f' and n.name like '%An%' AND rt.role ='actress' AND t.production_year > 2000 AND t.id = mi.movie_id AND t.id = mc.movie_id AND t.id = ci.movie_id AND mc.movie_id = ci.movie_id AND mc.movie_id = mi.movie_id AND mi.movie_id = ci.movie_id AND cn.id = mc.company_id AND it.id = mi.info_type_id AND n.id = ci.person_id AND rt.id = ci.role_id AND n.id = an.person_id AND ci.person_id = an.person_id AND chn.id = ci.person_role_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/19d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS voicing_actress, MIN(t.title) AS jap_engl_voiced_movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, info_type AS it, movie_companies AS mc, movie_info AS mi, name AS n, role_type AS rt, title AS t WHERE ci.note in ('(voice)', '(voice: Japanese version)', '(voice) (uncredited)', '(voice: English version)') AND cn.country_code ='[us]' AND it.info = 'release dates' AND n.gender ='f' AND rt.role ='actress' AND t.production_year > 2000 AND t.id = mi.movie_id AND t.id = mc.movie_id AND t.id = ci.movie_id AND mc.movie_id = ci.movie_id AND mc.movie_id = mi.movie_id AND mi.movie_id = ci.movie_id AND cn.id = mc.company_id AND it.id = mi.info_type_id AND n.id = ci.person_id AND rt.id = ci.role_id AND n.id = an.person_id AND ci.person_id = an.person_id AND chn.id = ci.person_role_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/1a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mc.note) AS production_note, MIN(t.title) AS movie_title, MIN(t.production_year) AS movie_year FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info_idx AS mi_idx, title AS t WHERE ct.kind = 'production companies' AND it.info = 'top 250 rank' AND mc.note not like '%(as Metro-Goldwyn-Mayer Pictures)%' and (mc.note like '%(co-production)%' or mc.note like '%(presents)%') AND ct.id = mc.company_type_id AND t.id = mc.movie_id AND t.id = mi_idx.movie_id AND mc.movie_id = mi_idx.movie_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/1b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mc.note) AS production_note, MIN(t.title) AS movie_title, MIN(t.production_year) AS movie_year FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info_idx AS mi_idx, title AS t WHERE ct.kind = 'production companies' AND it.info = 'bottom 10 rank' AND mc.note not like '%(as Metro-Goldwyn-Mayer Pictures)%' AND t.production_year between 2005 and 2010 AND ct.id = mc.company_type_id AND t.id = mc.movie_id AND t.id = mi_idx.movie_id AND mc.movie_id = mi_idx.movie_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/1c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mc.note) AS production_note, MIN(t.title) AS movie_title, MIN(t.production_year) AS movie_year FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info_idx AS mi_idx, title AS t WHERE ct.kind = 'production companies' AND it.info = 'top 250 rank' AND mc.note not like '%(as Metro-Goldwyn-Mayer Pictures)%' and (mc.note like '%(co-production)%') AND t.production_year >2010 AND ct.id = mc.company_type_id AND t.id = mc.movie_id AND t.id = mi_idx.movie_id AND mc.movie_id = mi_idx.movie_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/1d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mc.note) AS production_note, MIN(t.title) AS movie_title, MIN(t.production_year) AS movie_year FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info_idx AS mi_idx, title AS t WHERE ct.kind = 'production companies' AND it.info = 'bottom 10 rank' AND mc.note not like '%(as Metro-Goldwyn-Mayer Pictures)%' AND t.production_year >2000 AND ct.id = mc.company_type_id AND t.id = mc.movie_id AND t.id = mi_idx.movie_id AND mc.movie_id = mi_idx.movie_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/20a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS complete_downey_ironman_movie FROM complete_cast AS cc, comp_cast_type AS cct1, comp_cast_type AS cct2, char_name AS chn, cast_info AS ci, keyword AS k, kind_type AS kt, movie_keyword AS mk, name AS n, title AS t WHERE cct1.kind = 'cast' AND cct2.kind like '%complete%' AND chn.name not like '%Sherlock%' and (chn.name like '%Tony%Stark%' or chn.name like '%Iron%Man%') AND k.keyword in ('superhero', 'sequel', 'second-part', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence') AND kt.kind = 'movie' AND t.production_year > 1950 AND kt.id = t.kind_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND t.id = cc.movie_id AND mk.movie_id = ci.movie_id AND mk.movie_id = cc.movie_id AND ci.movie_id = cc.movie_id AND chn.id = ci.person_role_id AND n.id = ci.person_id AND k.id = mk.keyword_id AND cct1.id = cc.subject_id AND cct2.id = cc.status_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/20b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS complete_downey_ironman_movie FROM complete_cast AS cc, comp_cast_type AS cct1, comp_cast_type AS cct2, char_name AS chn, cast_info AS ci, keyword AS k, kind_type AS kt, movie_keyword AS mk, name AS n, title AS t WHERE cct1.kind = 'cast' AND cct2.kind like '%complete%' AND chn.name not like '%Sherlock%' and (chn.name like '%Tony%Stark%' or chn.name like '%Iron%Man%') AND k.keyword in ('superhero', 'sequel', 'second-part', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence') AND kt.kind = 'movie' AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2000 AND kt.id = t.kind_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND t.id = cc.movie_id AND mk.movie_id = ci.movie_id AND mk.movie_id = cc.movie_id AND ci.movie_id = cc.movie_id AND chn.id = ci.person_role_id AND n.id = ci.person_id AND k.id = mk.keyword_id AND cct1.id = cc.subject_id AND cct2.id = cc.status_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/20c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS cast_member, MIN(t.title) AS complete_dynamic_hero_movie FROM complete_cast AS cc, comp_cast_type AS cct1, comp_cast_type AS cct2, char_name AS chn, cast_info AS ci, keyword AS k, kind_type AS kt, movie_keyword AS mk, name AS n, title AS t WHERE cct1.kind = 'cast' AND cct2.kind like '%complete%' AND chn.name is not NULL and (chn.name like '%man%' or chn.name like '%Man%') AND k.keyword in ('superhero', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence', 'magnet', 'web', 'claw', 'laser') AND kt.kind = 'movie' AND t.production_year > 2000 AND kt.id = t.kind_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND t.id = cc.movie_id AND mk.movie_id = ci.movie_id AND mk.movie_id = cc.movie_id AND ci.movie_id = cc.movie_id AND chn.id = ci.person_role_id AND n.id = ci.person_id AND k.id = mk.keyword_id AND cct1.id = cc.subject_id AND cct2.id = cc.status_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/21a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS company_name, MIN(lt.link) AS link_type, MIN(t.title) AS western_follow_up FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' AND (cn.name LIKE '%Film%' OR cn.name LIKE '%Warner%') AND ct.kind ='production companies' AND k.keyword ='sequel' AND lt.link LIKE '%follow%' AND mc.note IS NULL AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German') AND t.production_year BETWEEN 1950 AND 2000 AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND mi.movie_id = t.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id AND ml.movie_id = mi.movie_id AND mk.movie_id = mi.movie_id AND mc.movie_id = mi.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/21b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS company_name, MIN(lt.link) AS link_type, MIN(t.title) AS german_follow_up FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' AND (cn.name LIKE '%Film%' OR cn.name LIKE '%Warner%') AND ct.kind ='production companies' AND k.keyword ='sequel' AND lt.link LIKE '%follow%' AND mc.note IS NULL AND mi.info IN ('Germany', 'German') AND t.production_year BETWEEN 2000 AND 2010 AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND mi.movie_id = t.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id AND ml.movie_id = mi.movie_id AND mk.movie_id = mi.movie_id AND mc.movie_id = mi.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/21c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(cn.name) AS company_name, MIN(lt.link) AS link_type, MIN(t.title) AS western_follow_up FROM company_name AS cn, company_type AS ct, keyword AS k, link_type AS lt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, movie_link AS ml, title AS t WHERE cn.country_code !='[pl]' AND (cn.name LIKE '%Film%' OR cn.name LIKE '%Warner%') AND ct.kind ='production companies' AND k.keyword ='sequel' AND lt.link LIKE '%follow%' AND mc.note IS NULL AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German', 'English') AND t.production_year BETWEEN 1950 AND 2010 AND lt.id = ml.link_type_id AND ml.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND t.id = mc.movie_id AND mc.company_type_id = ct.id AND mc.company_id = cn.id AND mi.movie_id = t.id AND ml.movie_id = mk.movie_id AND ml.movie_id = mc.movie_id AND mk.movie_id = mc.movie_id AND ml.movie_id = mi.movie_id AND mk.movie_id = mi.movie_id AND mc.movie_id = mi.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/23a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(kt.kind) AS movie_kind, MIN(t.title) AS complete_us_internet_movie FROM complete_cast AS cc, comp_cast_type AS cct1, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cct1.kind = 'complete+verified' AND cn.country_code = '[us]' AND it1.info = 'release dates' AND kt.kind in ('movie') AND mi.note like '%internet%' AND mi.info is not NULL and (mi.info like 'USA:% 199%' or mi.info like 'USA:% 200%') AND t.production_year > 2000 AND kt.id = t.kind_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND t.id = cc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = cc.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = cc.movie_id AND mc.movie_id = cc.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND cct1.id = cc.status_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/23b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(kt.kind) AS movie_kind, MIN(t.title) AS complete_nerdy_internet_movie FROM complete_cast AS cc, comp_cast_type AS cct1, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cct1.kind = 'complete+verified' AND cn.country_code = '[us]' AND it1.info = 'release dates' AND k.keyword in ('nerd', 'loner', 'alienation', 'dignity') AND kt.kind in ('movie') AND mi.note like '%internet%' AND mi.info like 'USA:% 200%' AND t.production_year > 2000 AND kt.id = t.kind_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND t.id = cc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = cc.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = cc.movie_id AND mc.movie_id = cc.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND cct1.id = cc.status_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/23c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(kt.kind) AS movie_kind, MIN(t.title) AS complete_us_internet_movie FROM complete_cast AS cc, comp_cast_type AS cct1, company_name AS cn, company_type AS ct, info_type AS it1, keyword AS k, kind_type AS kt, movie_companies AS mc, movie_info AS mi, movie_keyword AS mk, title AS t WHERE cct1.kind = 'complete+verified' AND cn.country_code = '[us]' AND it1.info = 'release dates' AND kt.kind in ('movie', 'tv movie', 'video movie', 'video game') AND mi.note like '%internet%' AND mi.info is not NULL and (mi.info like 'USA:% 199%' or mi.info like 'USA:% 200%') AND t.production_year > 1990 AND kt.id = t.kind_id AND t.id = mi.movie_id AND t.id = mk.movie_id AND t.id = mc.movie_id AND t.id = cc.movie_id AND mk.movie_id = mi.movie_id AND mk.movie_id = mc.movie_id AND mk.movie_id = cc.movie_id AND mi.movie_id = mc.movie_id AND mi.movie_id = cc.movie_id AND mc.movie_id = cc.movie_id AND k.id = mk.keyword_id AND it1.id = mi.info_type_id AND cn.id = mc.company_id AND ct.id = mc.company_type_id AND cct1.id = cc.status_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/25a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(n.name) AS male_writer, MIN(t.title) AS violent_movie_title FROM cast_info AS ci, info_type AS it1, info_type AS it2, keyword AS k, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, name AS n, title AS t WHERE ci.note in ('(writer)', '(head writer)', '(written by)', '(story)', '(story editor)') AND it1.info = 'genres' AND it2.info = 'votes' AND k.keyword in ('murder', 'blood', 'gore', 'death', 'female-nudity') AND mi.info = 'Horror' AND n.gender = 'm' AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND t.id = ci.movie_id AND t.id = mk.movie_id AND ci.movie_id = mi.movie_id AND ci.movie_id = mi_idx.movie_id AND ci.movie_id = mk.movie_id AND mi.movie_id = mi_idx.movie_id AND mi.movie_id = mk.movie_id AND mi_idx.movie_id = mk.movie_id AND n.id = ci.person_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id AND k.id = mk.keyword_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/25b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(n.name) AS male_writer, MIN(t.title) AS violent_movie_title FROM cast_info AS ci, info_type AS it1, info_type AS it2, keyword AS k, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, name AS n, title AS t WHERE ci.note in ('(writer)', '(head writer)', '(written by)', '(story)', '(story editor)') AND it1.info = 'genres' AND it2.info = 'votes' AND k.keyword in ('murder', 'blood', 'gore', 'death', 'female-nudity') AND mi.info = 'Horror' AND n.gender = 'm' AND t.production_year > 2010 AND t.title like 'Vampire%' AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND t.id = ci.movie_id AND t.id = mk.movie_id AND ci.movie_id = mi.movie_id AND ci.movie_id = mi_idx.movie_id AND ci.movie_id = mk.movie_id AND mi.movie_id = mi_idx.movie_id AND mi.movie_id = mk.movie_id AND mi_idx.movie_id = mk.movie_id AND n.id = ci.person_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id AND k.id = mk.keyword_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/25c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi.info) AS movie_budget, MIN(mi_idx.info) AS movie_votes, MIN(n.name) AS male_writer, MIN(t.title) AS violent_movie_title FROM cast_info AS ci, info_type AS it1, info_type AS it2, keyword AS k, movie_info AS mi, movie_info_idx AS mi_idx, movie_keyword AS mk, name AS n, title AS t WHERE ci.note in ('(writer)', '(head writer)', '(written by)', '(story)', '(story editor)') AND it1.info = 'genres' AND it2.info = 'votes' AND k.keyword in ('murder', 'violence', 'blood', 'gore', 'death', 'female-nudity', 'hospital') AND mi.info in ('Horror', 'Action', 'Sci-Fi', 'Thriller', 'Crime', 'War') AND n.gender = 'm' AND t.id = mi.movie_id AND t.id = mi_idx.movie_id AND t.id = ci.movie_id AND t.id = mk.movie_id AND ci.movie_id = mi.movie_id AND ci.movie_id = mi_idx.movie_id AND ci.movie_id = mk.movie_id AND mi.movie_id = mi_idx.movie_id AND mi.movie_id = mk.movie_id AND mi_idx.movie_id = mk.movie_id AND n.id = ci.person_id AND it1.id = mi.info_type_id AND it2.id = mi_idx.info_type_id AND k.id = mk.keyword_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/2a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, title AS t WHERE cn.country_code ='[de]' AND k.keyword ='character-name-in-title' AND cn.id = mc.company_id AND mc.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/2b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, title AS t WHERE cn.country_code ='[nl]' AND k.keyword ='character-name-in-title' AND cn.id = mc.company_id AND mc.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/2c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, title AS t WHERE cn.country_code ='[sm]' AND k.keyword ='character-name-in-title' AND cn.id = mc.company_id AND mc.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/2d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM company_name AS cn, keyword AS k, movie_companies AS mc, movie_keyword AS mk, title AS t WHERE cn.country_code ='[us]' AND k.keyword ='character-name-in-title' AND cn.id = mc.company_id AND mc.movie_id = t.id AND t.id = mk.movie_id AND mk.keyword_id = k.id AND mc.movie_id = mk.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/32a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(lt.link) AS link_type, MIN(t1.title) AS first_movie, MIN(t2.title) AS second_movie FROM keyword AS k, link_type AS lt, movie_keyword AS mk, movie_link AS ml, title AS t1, title AS t2 WHERE k.keyword ='10,000-mile-club' AND mk.keyword_id = k.id AND t1.id = mk.movie_id AND ml.movie_id = t1.id AND ml.linked_movie_id = t2.id AND lt.id = ml.link_type_id AND mk.movie_id = t1.id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/32b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(lt.link) AS link_type, MIN(t1.title) AS first_movie, MIN(t2.title) AS second_movie FROM keyword AS k, link_type AS lt, movie_keyword AS mk, movie_link AS ml, title AS t1, title AS t2 WHERE k.keyword ='character-name-in-title' AND mk.keyword_id = k.id AND t1.id = mk.movie_id AND ml.movie_id = t1.id AND ml.linked_movie_id = t2.id AND lt.id = ml.link_type_id AND mk.movie_id = t1.id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/3a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM keyword AS k, movie_info AS mi, movie_keyword AS mk, title AS t WHERE k.keyword like '%sequel%' AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German') AND t.production_year > 2005 AND t.id = mi.movie_id AND t.id = mk.movie_id AND mk.movie_id = mi.movie_id AND k.id = mk.keyword_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/3b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM keyword AS k, movie_info AS mi, movie_keyword AS mk, title AS t WHERE k.keyword like '%sequel%' AND mi.info IN ('Bulgaria') AND t.production_year > 2010 AND t.id = mi.movie_id AND t.id = mk.movie_id AND mk.movie_id = mi.movie_id AND k.id = mk.keyword_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/3c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS movie_title FROM keyword AS k, movie_info AS mi, movie_keyword AS mk, title AS t WHERE k.keyword like '%sequel%' AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German', 'USA', 'American') AND t.production_year > 1990 AND t.id = mi.movie_id AND t.id = mk.movie_id AND mk.movie_id = mi.movie_id AND k.id = mk.keyword_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/4a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS movie_title FROM info_type AS it, keyword AS k, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t WHERE it.info ='rating' AND k.keyword like '%sequel%' AND mi_idx.info > '5.0' AND t.production_year > 2005 AND t.id = mi_idx.movie_id AND t.id = mk.movie_id AND mk.movie_id = mi_idx.movie_id AND k.id = mk.keyword_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/4b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS movie_title FROM info_type AS it, keyword AS k, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t WHERE it.info ='rating' AND k.keyword like '%sequel%' AND mi_idx.info > '9.0' AND t.production_year > 2010 AND t.id = mi_idx.movie_id AND t.id = mk.movie_id AND mk.movie_id = mi_idx.movie_id AND k.id = mk.keyword_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/4c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(mi_idx.info) AS rating, MIN(t.title) AS movie_title FROM info_type AS it, keyword AS k, movie_info_idx AS mi_idx, movie_keyword AS mk, title AS t WHERE it.info ='rating' AND k.keyword like '%sequel%' AND mi_idx.info > '2.0' AND t.production_year > 1990 AND t.id = mi_idx.movie_id AND t.id = mk.movie_id AND mk.movie_id = mi_idx.movie_id AND k.id = mk.keyword_id AND it.id = mi_idx.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/5a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS typical_european_movie FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info AS mi, title AS t WHERE ct.kind = 'production companies' AND mc.note like '%(theatrical)%' and mc.note like '%(France)%' AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German') AND t.production_year > 2005 AND t.id = mi.movie_id AND t.id = mc.movie_id AND mc.movie_id = mi.movie_id AND ct.id = mc.company_type_id AND it.id = mi.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/5b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS american_vhs_movie FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info AS mi, title AS t WHERE ct.kind = 'production companies' AND mc.note like '%(VHS)%' and mc.note like '%(USA)%' and mc.note like '%(1994)%' AND mi.info IN ('USA', 'America') AND t.production_year > 2010 AND t.id = mi.movie_id AND t.id = mc.movie_id AND mc.movie_id = mi.movie_id AND ct.id = mc.company_type_id AND it.id = mi.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/5c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(t.title) AS american_movie FROM company_type AS ct, info_type AS it, movie_companies AS mc, movie_info AS mi, title AS t WHERE ct.kind = 'production companies' AND mc.note not like '%(TV)%' and mc.note like '%(USA)%' AND mi.info IN ('Sweden', 'Norway', 'Germany', 'Denmark', 'Swedish', 'Denish', 'Norwegian', 'German', 'USA', 'American') AND t.production_year > 1990 AND t.id = mi.movie_id AND t.id = mc.movie_id AND mc.movie_id = mi.movie_id AND ct.id = mc.company_type_id AND it.id = mi.info_type_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/6a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS marvel_movie FROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword = 'marvel-cinematic-universe' AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2010 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/6b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS hero_movie FROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword in ('superhero', 'sequel', 'second-part', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence') AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2014 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/6c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS marvel_movie FROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword = 'marvel-cinematic-universe' AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2014 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/6d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS hero_movie FROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword in ('superhero', 'sequel', 'second-part', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence') AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2000 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/6e.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS marvel_movie FROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword = 'marvel-cinematic-universe' AND n.name LIKE '%Downey%Robert%' AND t.production_year > 2000 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/6f.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(k.keyword) AS movie_keyword, MIN(n.name) AS actor_name, MIN(t.title) AS hero_movie FROM cast_info AS ci, keyword AS k, movie_keyword AS mk, name AS n, title AS t WHERE k.keyword in ('superhero', 'sequel', 'second-part', 'marvel-comics', 'based-on-comic', 'tv-special', 'fight', 'violence') AND t.production_year > 2000 AND k.id = mk.keyword_id AND t.id = mk.movie_id AND t.id = ci.movie_id AND ci.movie_id = mk.movie_id AND n.id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/7a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS of_person, MIN(t.title) AS biography_movie FROM aka_name AS an, cast_info AS ci, info_type AS it, link_type AS lt, movie_link AS ml, name AS n, person_info AS pi, title AS t WHERE an.name LIKE '%a%' AND it.info ='mini biography' AND lt.link ='features' AND n.name_pcode_cf BETWEEN 'A' AND 'F' AND (n.gender='m' OR (n.gender = 'f' AND n.name LIKE 'B%')) AND pi.note ='Volker Boehm' AND t.production_year BETWEEN 1980 AND 1995 AND n.id = an.person_id AND n.id = pi.person_id AND ci.person_id = n.id AND t.id = ci.movie_id AND ml.linked_movie_id = t.id AND lt.id = ml.link_type_id AND it.id = pi.info_type_id AND pi.person_id = an.person_id AND pi.person_id = ci.person_id AND an.person_id = ci.person_id AND ci.movie_id = ml.linked_movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/7b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS of_person, MIN(t.title) AS biography_movie FROM aka_name AS an, cast_info AS ci, info_type AS it, link_type AS lt, movie_link AS ml, name AS n, person_info AS pi, title AS t WHERE an.name LIKE '%a%' AND it.info ='mini biography' AND lt.link ='features' AND n.name_pcode_cf LIKE 'D%' AND n.gender='m' AND pi.note ='Volker Boehm' AND t.production_year BETWEEN 1980 AND 1984 AND n.id = an.person_id AND n.id = pi.person_id AND ci.person_id = n.id AND t.id = ci.movie_id AND ml.linked_movie_id = t.id AND lt.id = ml.link_type_id AND it.id = pi.info_type_id AND pi.person_id = an.person_id AND pi.person_id = ci.person_id AND an.person_id = ci.person_id AND ci.movie_id = ml.linked_movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/7c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(n.name) AS cast_member_name, MIN(pi.info) AS cast_member_info FROM aka_name AS an, cast_info AS ci, info_type AS it, link_type AS lt, movie_link AS ml, name AS n, person_info AS pi, title AS t WHERE an.name is not NULL and (an.name LIKE '%a%' or an.name LIKE 'A%') AND it.info ='mini biography' AND lt.link in ('references', 'referenced in', 'features', 'featured in') AND n.name_pcode_cf BETWEEN 'A' AND 'F' AND (n.gender='m' OR (n.gender = 'f' AND n.name LIKE 'A%')) AND pi.note is not NULL AND t.production_year BETWEEN 1980 AND 2010 AND n.id = an.person_id AND n.id = pi.person_id AND ci.person_id = n.id AND t.id = ci.movie_id AND ml.linked_movie_id = t.id AND lt.id = ml.link_type_id AND it.id = pi.info_type_id AND pi.person_id = an.person_id AND pi.person_id = ci.person_id AND an.person_id = ci.person_id AND ci.movie_id = ml.linked_movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/8a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an1.name) AS actress_pseudonym, MIN(t.title) AS japanese_movie_dubbed FROM aka_name AS an1, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n1, role_type AS rt, title AS t WHERE ci.note ='(voice: English version)' AND cn.country_code ='[jp]' AND mc.note like '%(Japan)%' and mc.note not like '%(USA)%' AND n1.name like '%Yo%' and n1.name not like '%Yu%' AND rt.role ='actress' AND an1.person_id = n1.id AND n1.id = ci.person_id AND ci.movie_id = t.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND an1.person_id = ci.person_id AND ci.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/8b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS acress_pseudonym, MIN(t.title) AS japanese_anime_movie FROM aka_name AS an, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS t WHERE ci.note ='(voice: English version)' AND cn.country_code ='[jp]' AND mc.note like '%(Japan)%' and mc.note not like '%(USA)%' and (mc.note like '%(2006)%' or mc.note like '%(2007)%') AND n.name like '%Yo%' and n.name not like '%Yu%' AND rt.role ='actress' AND t.production_year between 2006 and 2007 and (t.title like 'One Piece%' or t.title like 'Dragon Ball Z%') AND an.person_id = n.id AND n.id = ci.person_id AND ci.movie_id = t.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND an.person_id = ci.person_id AND ci.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/8c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(a1.name) AS writer_pseudo_name, MIN(t.title) AS movie_title FROM aka_name AS a1, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n1, role_type AS rt, title AS t WHERE cn.country_code ='[us]' AND rt.role ='writer' AND a1.person_id = n1.id AND n1.id = ci.person_id AND ci.movie_id = t.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND a1.person_id = ci.person_id AND ci.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/8d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an1.name) AS costume_designer_pseudo, MIN(t.title) AS movie_with_costumes FROM aka_name AS an1, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n1, role_type AS rt, title AS t WHERE cn.country_code ='[us]' AND rt.role ='costume designer' AND an1.person_id = n1.id AND n1.id = ci.person_id AND ci.movie_id = t.id AND t.id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND an1.person_id = ci.person_id AND ci.movie_id = mc.movie_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/9a.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS alternative_name, MIN(chn.name) AS character_name, MIN(t.title) AS movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS t WHERE ci.note in ('(voice)', '(voice: Japanese version)', '(voice) (uncredited)', '(voice: English version)') AND cn.country_code ='[us]' AND mc.note is not NULL and (mc.note like '%(USA)%' or mc.note like '%(worldwide)%') AND n.gender ='f' and n.name like '%Ang%' AND rt.role ='actress' AND t.production_year between 2005 and 2015 AND ci.movie_id = t.id AND t.id = mc.movie_id AND ci.movie_id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND n.id = ci.person_id AND chn.id = ci.person_role_id AND an.person_id = n.id AND an.person_id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/9b.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS alternative_name, MIN(chn.name) AS voiced_character, MIN(n.name) AS voicing_actress, MIN(t.title) AS american_movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS t WHERE ci.note = '(voice)' AND cn.country_code ='[us]' AND mc.note like '%(200%)%' and (mc.note like '%(USA)%' or mc.note like '%(worldwide)%') AND n.gender ='f' and n.name like '%Angel%' AND rt.role ='actress' AND t.production_year between 2007 and 2010 AND ci.movie_id = t.id AND t.id = mc.movie_id AND ci.movie_id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND n.id = ci.person_id AND chn.id = ci.person_role_id AND an.person_id = n.id AND an.person_id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/9c.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS alternative_name, MIN(chn.name) AS voiced_character_name, MIN(n.name) AS voicing_actress, MIN(t.title) AS american_movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS t WHERE ci.note in ('(voice)', '(voice: Japanese version)', '(voice) (uncredited)', '(voice: English version)') AND cn.country_code ='[us]' AND n.gender ='f' and n.name like '%An%' AND rt.role ='actress' AND ci.movie_id = t.id AND t.id = mc.movie_id AND ci.movie_id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND n.id = ci.person_id AND chn.id = ci.person_role_id AND an.person_id = n.id AND an.person_id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/imdb/9d.sql: -------------------------------------------------------------------------------- 1 | SELECT MIN(an.name) AS alternative_name, MIN(chn.name) AS voiced_char_name, MIN(n.name) AS voicing_actress, MIN(t.title) AS american_movie FROM aka_name AS an, char_name AS chn, cast_info AS ci, company_name AS cn, movie_companies AS mc, name AS n, role_type AS rt, title AS t WHERE ci.note in ('(voice)', '(voice: Japanese version)', '(voice) (uncredited)', '(voice: English version)') AND cn.country_code ='[us]' AND n.gender ='f' AND rt.role ='actress' AND ci.movie_id = t.id AND t.id = mc.movie_id AND ci.movie_id = mc.movie_id AND mc.company_id = cn.id AND ci.role_id = rt.id AND n.id = ci.person_id AND chn.id = ci.person_role_id AND an.person_id = n.id AND an.person_id = ci.person_id; 2 | -------------------------------------------------------------------------------- /benchmarks/queries/q1.sql: -------------------------------------------------------------------------------- 1 | select 2 | l_returnflag, 3 | l_linestatus, 4 | sum(l_quantity) as sum_qty, 5 | sum(l_extendedprice) as sum_base_price, 6 | sum(l_extendedprice * (1 - l_discount)) as sum_disc_price, 7 | sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, 8 | avg(l_quantity) as avg_qty, 9 | avg(l_extendedprice) as avg_price, 10 | avg(l_discount) as avg_disc, 11 | count(*) as count_order 12 | from 13 | lineitem 14 | where 15 | l_shipdate <= date '1998-09-02' 16 | group by 17 | l_returnflag, 18 | l_linestatus 19 | order by 20 | l_returnflag, 21 | l_linestatus; -------------------------------------------------------------------------------- /benchmarks/queries/q10.sql: -------------------------------------------------------------------------------- 1 | select 2 | c_custkey, 3 | c_name, 4 | sum(l_extendedprice * (1 - l_discount)) as revenue, 5 | c_acctbal, 6 | n_name, 7 | c_address, 8 | c_phone, 9 | c_comment 10 | from 11 | customer, 12 | orders, 13 | lineitem, 14 | nation 15 | where 16 | c_custkey = o_custkey 17 | and l_orderkey = o_orderkey 18 | and o_orderdate >= date '1993-10-01' 19 | and o_orderdate < date '1994-01-01' 20 | and l_returnflag = 'R' 21 | and c_nationkey = n_nationkey 22 | group by 23 | c_custkey, 24 | c_name, 25 | c_acctbal, 26 | c_phone, 27 | n_name, 28 | c_address, 29 | c_comment 30 | order by 31 | revenue desc; -------------------------------------------------------------------------------- /benchmarks/queries/q11.sql: -------------------------------------------------------------------------------- 1 | select 2 | ps_partkey, 3 | sum(ps_supplycost * ps_availqty) as value 4 | from 5 | partsupp, 6 | supplier, 7 | nation 8 | where 9 | ps_suppkey = s_suppkey 10 | and s_nationkey = n_nationkey 11 | and n_name = 'GERMANY' 12 | group by 13 | ps_partkey having 14 | sum(ps_supplycost * ps_availqty) > ( 15 | select 16 | sum(ps_supplycost * ps_availqty) * 0.0001 17 | from 18 | partsupp, 19 | supplier, 20 | nation 21 | where 22 | ps_suppkey = s_suppkey 23 | and s_nationkey = n_nationkey 24 | and n_name = 'GERMANY' 25 | ) 26 | order by 27 | value desc; -------------------------------------------------------------------------------- /benchmarks/queries/q12.sql: -------------------------------------------------------------------------------- 1 | select 2 | l_shipmode, 3 | sum(case 4 | when o_orderpriority = '1-URGENT' 5 | or o_orderpriority = '2-HIGH' 6 | then 1 7 | else 0 8 | end) as high_line_count, 9 | sum(case 10 | when o_orderpriority <> '1-URGENT' 11 | and o_orderpriority <> '2-HIGH' 12 | then 1 13 | else 0 14 | end) as low_line_count 15 | from 16 | lineitem 17 | join 18 | orders 19 | on 20 | l_orderkey = o_orderkey 21 | where 22 | l_shipmode in ('MAIL', 'SHIP') 23 | and l_commitdate < l_receiptdate 24 | and l_shipdate < l_commitdate 25 | and l_receiptdate >= date '1994-01-01' 26 | and l_receiptdate < date '1995-01-01' 27 | group by 28 | l_shipmode 29 | order by 30 | l_shipmode; -------------------------------------------------------------------------------- /benchmarks/queries/q13.sql: -------------------------------------------------------------------------------- 1 | select 2 | c_count, 3 | count(*) as custdist 4 | from 5 | ( 6 | select 7 | c_custkey, 8 | count(o_orderkey) 9 | from 10 | customer left outer join orders on 11 | c_custkey = o_custkey 12 | and o_comment not like '%special%requests%' 13 | group by 14 | c_custkey 15 | ) as c_orders (c_custkey, c_count) 16 | group by 17 | c_count 18 | order by 19 | custdist desc, 20 | c_count desc; -------------------------------------------------------------------------------- /benchmarks/queries/q14.sql: -------------------------------------------------------------------------------- 1 | select 2 | 100.00 * sum(case 3 | when p_type like 'PROMO%' 4 | then l_extendedprice * (1 - l_discount) 5 | else 0 6 | end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue 7 | from 8 | lineitem, 9 | part 10 | where 11 | l_partkey = p_partkey 12 | and l_shipdate >= date '1995-09-01' 13 | and l_shipdate < date '1995-10-01'; -------------------------------------------------------------------------------- /benchmarks/queries/q15.sql: -------------------------------------------------------------------------------- 1 | create view revenue0 (supplier_no, total_revenue) as 2 | select 3 | l_suppkey, 4 | sum(l_extendedprice * (1 - l_discount)) 5 | from 6 | lineitem 7 | where 8 | l_shipdate >= date '1996-01-01' 9 | and l_shipdate < date '1996-01-01' + interval '3' month 10 | group by 11 | l_suppkey; 12 | 13 | 14 | select 15 | s_suppkey, 16 | s_name, 17 | s_address, 18 | s_phone, 19 | total_revenue 20 | from 21 | supplier, 22 | revenue0 23 | where 24 | s_suppkey = supplier_no 25 | and total_revenue = ( 26 | select 27 | max(total_revenue) 28 | from 29 | revenue0 30 | ) 31 | order by 32 | s_suppkey; 33 | 34 | drop view revenue0; -------------------------------------------------------------------------------- /benchmarks/queries/q16.sql: -------------------------------------------------------------------------------- 1 | select 2 | p_brand, 3 | p_type, 4 | p_size, 5 | count(distinct ps_suppkey) as supplier_cnt 6 | from 7 | partsupp, 8 | part 9 | where 10 | p_partkey = ps_partkey 11 | and p_brand <> 'Brand#45' 12 | and p_type not like 'MEDIUM POLISHED%' 13 | and p_size in (49, 14, 23, 45, 19, 3, 36, 9) 14 | and ps_suppkey not in ( 15 | select 16 | s_suppkey 17 | from 18 | supplier 19 | where 20 | s_comment like '%Customer%Complaints%' 21 | ) 22 | group by 23 | p_brand, 24 | p_type, 25 | p_size 26 | order by 27 | supplier_cnt desc, 28 | p_brand, 29 | p_type, 30 | p_size; -------------------------------------------------------------------------------- /benchmarks/queries/q17.sql: -------------------------------------------------------------------------------- 1 | select 2 | sum(l_extendedprice) / 7.0 as avg_yearly 3 | from 4 | lineitem, 5 | part 6 | where 7 | p_partkey = l_partkey 8 | and p_brand = 'Brand#23' 9 | and p_container = 'MED BOX' 10 | and l_quantity < ( 11 | select 12 | 0.2 * avg(l_quantity) 13 | from 14 | lineitem 15 | where 16 | l_partkey = p_partkey 17 | ); -------------------------------------------------------------------------------- /benchmarks/queries/q18.sql: -------------------------------------------------------------------------------- 1 | select 2 | c_name, 3 | c_custkey, 4 | o_orderkey, 5 | o_orderdate, 6 | o_totalprice, 7 | sum(l_quantity) 8 | from 9 | customer, 10 | orders, 11 | lineitem 12 | where 13 | o_orderkey in ( 14 | select 15 | l_orderkey 16 | from 17 | lineitem 18 | group by 19 | l_orderkey having 20 | sum(l_quantity) > 300 21 | ) 22 | and c_custkey = o_custkey 23 | and o_orderkey = l_orderkey 24 | group by 25 | c_name, 26 | c_custkey, 27 | o_orderkey, 28 | o_orderdate, 29 | o_totalprice 30 | order by 31 | o_totalprice desc, 32 | o_orderdate; -------------------------------------------------------------------------------- /benchmarks/queries/q2.sql: -------------------------------------------------------------------------------- 1 | select 2 | s_acctbal, 3 | s_name, 4 | n_name, 5 | p_partkey, 6 | p_mfgr, 7 | s_address, 8 | s_phone, 9 | s_comment 10 | from 11 | part, 12 | supplier, 13 | partsupp, 14 | nation, 15 | region 16 | where 17 | p_partkey = ps_partkey 18 | and s_suppkey = ps_suppkey 19 | and p_size = 15 20 | and p_type like '%BRASS' 21 | and s_nationkey = n_nationkey 22 | and n_regionkey = r_regionkey 23 | and r_name = 'EUROPE' 24 | and ps_supplycost = ( 25 | select 26 | min(ps_supplycost) 27 | from 28 | partsupp, 29 | supplier, 30 | nation, 31 | region 32 | where 33 | p_partkey = ps_partkey 34 | and s_suppkey = ps_suppkey 35 | and s_nationkey = n_nationkey 36 | and n_regionkey = r_regionkey 37 | and r_name = 'EUROPE' 38 | ) 39 | order by 40 | s_acctbal desc, 41 | n_name, 42 | s_name, 43 | p_partkey; -------------------------------------------------------------------------------- /benchmarks/queries/q20.sql: -------------------------------------------------------------------------------- 1 | select 2 | s_name, 3 | s_address 4 | from 5 | supplier, 6 | nation 7 | where 8 | s_suppkey in ( 9 | select 10 | ps_suppkey 11 | from 12 | partsupp 13 | where 14 | ps_partkey in ( 15 | select 16 | p_partkey 17 | from 18 | part 19 | where 20 | p_name like 'forest%' 21 | ) 22 | and ps_availqty > ( 23 | select 24 | 0.5 * sum(l_quantity) 25 | from 26 | lineitem 27 | where 28 | l_partkey = ps_partkey 29 | and l_suppkey = ps_suppkey 30 | and l_shipdate >= date '1994-01-01' 31 | and l_shipdate < date '1994-01-01' + interval '1' year 32 | ) 33 | ) 34 | and s_nationkey = n_nationkey 35 | and n_name = 'CANADA' 36 | order by 37 | s_name; -------------------------------------------------------------------------------- /benchmarks/queries/q21.sql: -------------------------------------------------------------------------------- 1 | select 2 | s_name, 3 | count(*) as numwait 4 | from 5 | supplier, 6 | lineitem l1, 7 | orders, 8 | nation 9 | where 10 | s_suppkey = l1.l_suppkey 11 | and o_orderkey = l1.l_orderkey 12 | and o_orderstatus = 'F' 13 | and l1.l_receiptdate > l1.l_commitdate 14 | and exists ( 15 | select 16 | * 17 | from 18 | lineitem l2 19 | where 20 | l2.l_orderkey = l1.l_orderkey 21 | and l2.l_suppkey <> l1.l_suppkey 22 | ) 23 | and not exists ( 24 | select 25 | * 26 | from 27 | lineitem l3 28 | where 29 | l3.l_orderkey = l1.l_orderkey 30 | and l3.l_suppkey <> l1.l_suppkey 31 | and l3.l_receiptdate > l3.l_commitdate 32 | ) 33 | and s_nationkey = n_nationkey 34 | and n_name = 'SAUDI ARABIA' 35 | group by 36 | s_name 37 | order by 38 | numwait desc, 39 | s_name; -------------------------------------------------------------------------------- /benchmarks/queries/q3.sql: -------------------------------------------------------------------------------- 1 | select 2 | l_orderkey, 3 | sum(l_extendedprice * (1 - l_discount)) as revenue, 4 | o_orderdate, 5 | o_shippriority 6 | from 7 | customer, 8 | orders, 9 | lineitem 10 | where 11 | c_mktsegment = 'BUILDING' 12 | and c_custkey = o_custkey 13 | and l_orderkey = o_orderkey 14 | and o_orderdate < date '1995-03-15' 15 | and l_shipdate > date '1995-03-15' 16 | group by 17 | l_orderkey, 18 | o_orderdate, 19 | o_shippriority 20 | order by 21 | revenue desc, 22 | o_orderdate; -------------------------------------------------------------------------------- /benchmarks/queries/q4.sql: -------------------------------------------------------------------------------- 1 | select 2 | o_orderpriority, 3 | count(*) as order_count 4 | from 5 | orders 6 | where 7 | o_orderdate >= '1993-07-01' 8 | and o_orderdate < date '1993-07-01' + interval '3' month 9 | and exists ( 10 | select 11 | * 12 | from 13 | lineitem 14 | where 15 | l_orderkey = o_orderkey 16 | and l_commitdate < l_receiptdate 17 | ) 18 | group by 19 | o_orderpriority 20 | order by 21 | o_orderpriority; -------------------------------------------------------------------------------- /benchmarks/queries/q5.sql: -------------------------------------------------------------------------------- 1 | select 2 | n_name, 3 | sum(l_extendedprice * (1 - l_discount)) as revenue 4 | from 5 | customer, 6 | orders, 7 | lineitem, 8 | supplier, 9 | nation, 10 | region 11 | where 12 | c_custkey = o_custkey 13 | and l_orderkey = o_orderkey 14 | and l_suppkey = s_suppkey 15 | and c_nationkey = s_nationkey 16 | and s_nationkey = n_nationkey 17 | and n_regionkey = r_regionkey 18 | and r_name = 'ASIA' 19 | and o_orderdate >= date '1994-01-01' 20 | and o_orderdate < date '1995-01-01' 21 | group by 22 | n_name 23 | order by 24 | revenue desc; -------------------------------------------------------------------------------- /benchmarks/queries/q6.sql: -------------------------------------------------------------------------------- 1 | select 2 | sum(l_extendedprice * l_discount) as revenue 3 | from 4 | lineitem 5 | where 6 | l_shipdate >= date '1994-01-01' 7 | and l_shipdate < date '1995-01-01' 8 | and l_discount between 0.06 - 0.01 and 0.06 + 0.01 9 | and l_quantity < 24; -------------------------------------------------------------------------------- /benchmarks/queries/q9.sql: -------------------------------------------------------------------------------- 1 | select 2 | nation, 3 | o_year, 4 | sum(amount) as sum_profit 5 | from 6 | ( 7 | select 8 | n_name as nation, 9 | extract(year from o_orderdate) as o_year, 10 | l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount 11 | from 12 | part, 13 | supplier, 14 | lineitem, 15 | partsupp, 16 | orders, 17 | nation 18 | where 19 | s_suppkey = l_suppkey 20 | and ps_suppkey = l_suppkey 21 | and ps_partkey = l_partkey 22 | and p_partkey = l_partkey 23 | and o_orderkey = l_orderkey 24 | and s_nationkey = n_nationkey 25 | and p_name like '%green%' 26 | ) as profit 27 | group by 28 | nation, 29 | o_year 30 | order by 31 | nation, 32 | o_year desc; -------------------------------------------------------------------------------- /benchmarks/requirements.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | rich 19 | -------------------------------------------------------------------------------- /ci/scripts/retry: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | x() { 6 | echo "+ $*" >&2 7 | "$@" 8 | } 9 | 10 | max_retry_time_seconds=$(( 5 * 60 )) 11 | retry_delay_seconds=10 12 | 13 | END=$(( $(date +%s) + ${max_retry_time_seconds} )) 14 | 15 | while (( $(date +%s) < $END )); do 16 | x "$@" && exit 0 17 | sleep "${retry_delay_seconds}" 18 | done 19 | 20 | echo "$0: retrying [$*] timed out" >&2 21 | exit 1 22 | -------------------------------------------------------------------------------- /ci/scripts/rust_clippy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | set -ex 21 | cargo clippy --all-targets --workspace --features avro,pyarrow,integration-tests -- -D warnings 22 | -------------------------------------------------------------------------------- /ci/scripts/rust_docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | set -ex 21 | export RUSTDOCFLAGS="-D warnings" 22 | cargo doc --document-private-items --no-deps --workspace 23 | -------------------------------------------------------------------------------- /ci/scripts/rust_fmt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | set -ex 21 | cargo fmt --all -- --check 22 | -------------------------------------------------------------------------------- /clippy.toml: -------------------------------------------------------------------------------- 1 | disallowed-methods = [ 2 | { path = "tokio::task::spawn", reason = "To provide cancel-safety, use `SpawnedTask::spawn` instead (https://github.com/apache/datafusion/issues/6513)" }, 3 | { path = "tokio::task::spawn_blocking", reason = "To provide cancel-safety, use `SpawnedTask::spawn_blocking` instead (https://github.com/apache/datafusion/issues/6513)" }, 4 | ] 5 | 6 | disallowed-types = [ 7 | { path = "std::time::Instant", reason = "Use `datafusion_common::instant::Instant` instead for WASM compatibility" }, 8 | ] 9 | 10 | # Lowering the threshold to help prevent stack overflows (default is 16384) 11 | # See: https://rust-lang.github.io/rust-clippy/master/index.html#/large_futures 12 | future-size-threshold = 10000 -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/aws_options.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: [] 6 | stdin: "CREATE EXTERNAL TABLE CARS\nSTORED AS CSV\nLOCATION 's3://data/cars.csv'\nOPTIONS(\n 'aws.access_key_id' 'TEST-DataFusionLogin',\n 'aws.secret_access_key' 'TEST-DataFusionPassword',\n 'aws.endpoint' 'http://127.0.0.1:9000',\n 'aws.allow_http' 'true'\n);\n\nSELECT * FROM CARS limit 1;\n" 7 | --- 8 | success: true 9 | exit_code: 0 10 | ----- stdout ----- 11 | [CLI_VERSION] 12 | 0 row(s) fetched. 13 | [ELAPSED] 14 | 15 | +-----+-------+---------------------+ 16 | | car | speed | time | 17 | +-----+-------+---------------------+ 18 | | red | 20.0 | 1996-04-12T12:05:03 | 19 | +-----+-------+---------------------+ 20 | 1 row(s) fetched. 21 | [ELAPSED] 22 | 23 | \q 24 | 25 | ----- stderr ----- 26 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli@load_local_csv.sql.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: [] 6 | stdin: "CREATE EXTERNAL TABLE CARS\nSTORED AS CSV\nLOCATION '../datafusion/core/tests/data/cars.csv'\nOPTIONS ('has_header' 'TRUE');\n\nSELECT * FROM CARS limit 1;" 7 | input_file: tests/sql/load_local_csv.sql 8 | --- 9 | success: true 10 | exit_code: 0 11 | ----- stdout ----- 12 | [CLI_VERSION] 13 | 0 row(s) fetched. 14 | [ELAPSED] 15 | 16 | +-----+-------+---------------------+ 17 | | car | speed | time | 18 | +-----+-------+---------------------+ 19 | | red | 20.0 | 1996-04-12T12:05:03 | 20 | +-----+-------+---------------------+ 21 | 1 row(s) fetched. 22 | [ELAPSED] 23 | 24 | \q 25 | 26 | ----- stderr ----- 27 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli@load_s3_csv.sql.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: [] 6 | stdin: "CREATE EXTERNAL TABLE CARS\nSTORED AS CSV\nLOCATION 's3://data/cars.csv';\n\nSELECT * FROM CARS limit 1;" 7 | input_file: tests/sql/load_s3_csv.sql 8 | --- 9 | success: true 10 | exit_code: 0 11 | ----- stdout ----- 12 | [CLI_VERSION] 13 | 0 row(s) fetched. 14 | [ELAPSED] 15 | 16 | +-----+-------+---------------------+ 17 | | car | speed | time | 18 | +-----+-------+---------------------+ 19 | | red | 20.0 | 1996-04-12T12:05:03 | 20 | +-----+-------+---------------------+ 21 | 1 row(s) fetched. 22 | [ELAPSED] 23 | 24 | \q 25 | 26 | ----- stderr ----- 27 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli@select.sql.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: [] 6 | stdin: select 1; 7 | input_file: tests/sql/select.sql 8 | --- 9 | success: true 10 | exit_code: 0 11 | ----- stdout ----- 12 | [CLI_VERSION] 13 | +----------+ 14 | | Int64(1) | 15 | +----------+ 16 | | 1 | 17 | +----------+ 18 | 1 row(s) fetched. 19 | [ELAPSED] 20 | 21 | \q 22 | 23 | ----- stderr ----- 24 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_format@automatic.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1 8 | - "-q" 9 | - "--format" 10 | - automatic 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | +----------+ 16 | | Int64(1) | 17 | +----------+ 18 | | 1 | 19 | +----------+ 20 | 21 | ----- stderr ----- 22 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_format@csv.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1 8 | - "-q" 9 | - "--format" 10 | - csv 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | Int64(1) 16 | 1 17 | 18 | ----- stderr ----- 19 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_format@json.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1 8 | - "-q" 9 | - "--format" 10 | - json 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | [{"Int64(1)":1}] 16 | 17 | ----- stderr ----- 18 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_format@nd-json.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1 8 | - "-q" 9 | - "--format" 10 | - nd-json 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | {"Int64(1)":1} 16 | 17 | ----- stderr ----- 18 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_format@table.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1 8 | - "-q" 9 | - "--format" 10 | - table 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | +----------+ 16 | | Int64(1) | 17 | +----------+ 18 | | 1 | 19 | +----------+ 20 | 21 | ----- stderr ----- 22 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_format@tsv.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1 8 | - "-q" 9 | - "--format" 10 | - tsv 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | Int64(1) 16 | 1 17 | 18 | ----- stderr ----- 19 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_quick_test@backslash.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: datafusion-cli/tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--file" 7 | - tests/sql/backslash.sql 8 | - "--format" 9 | - json 10 | - "-q" 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | [{"Utf8(\"\\\")":"\\","Utf8(\"\\\\\")":"\\\\","Utf8(\"\\\\\\\\\\\")":"\\\\\\\\\\","Utf8(\"dsdsds\\\\\\\\\")":"dsdsds\\\\\\\\","Utf8(\"\\t\")":"\\t","Utf8(\"\\0\")":"\\0","Utf8(\"\\n\")":"\\n"}] 16 | 17 | ----- stderr ----- 18 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_quick_test@batch_size.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - show datafusion.execution.batch_size 8 | - "-q" 9 | - "-b" 10 | - "1" 11 | --- 12 | success: true 13 | exit_code: 0 14 | ----- stdout ----- 15 | +---------------------------------+-------+ 16 | | name | value | 17 | +---------------------------------+-------+ 18 | | datafusion.execution.batch_size | 1 | 19 | +---------------------------------+-------+ 20 | 21 | ----- stderr ----- 22 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_quick_test@can_see_indent_format.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: datafusion-cli/tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - EXPLAIN FORMAT indent SELECT 123 8 | snapshot_kind: text 9 | --- 10 | success: true 11 | exit_code: 0 12 | ----- stdout ----- 13 | [CLI_VERSION] 14 | +---------------+------------------------------------------+ 15 | | plan_type | plan | 16 | +---------------+------------------------------------------+ 17 | | logical_plan | Projection: Int64(123) | 18 | | | EmptyRelation | 19 | | physical_plan | ProjectionExec: expr=[123 as Int64(123)] | 20 | | | PlaceholderRowExec | 21 | | | | 22 | +---------------+------------------------------------------+ 23 | 2 row(s) fetched. 24 | [ELAPSED] 25 | 26 | 27 | ----- stderr ----- 28 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_quick_test@change_format_version.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: datafusion-cli/tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--file" 7 | - tests/sql/types_format.sql 8 | - "-q" 9 | --- 10 | success: true 11 | exit_code: 0 12 | ----- stdout ----- 13 | +-----------+ 14 | | Int64(54) | 15 | | Int64 | 16 | +-----------+ 17 | | 54 | 18 | +-----------+ 19 | 20 | ----- stderr ----- 21 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_quick_test@files.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--file" 7 | - tests/sql/select.sql 8 | - "-q" 9 | --- 10 | success: true 11 | exit_code: 0 12 | ----- stdout ----- 13 | +----------+ 14 | | Int64(1) | 15 | +----------+ 16 | | 1 | 17 | +----------+ 18 | 19 | ----- stderr ----- 20 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_quick_test@statements.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--command" 7 | - select 1; select 2; 8 | - "-q" 9 | --- 10 | success: true 11 | exit_code: 0 12 | ----- stdout ----- 13 | +----------+ 14 | | Int64(1) | 15 | +----------+ 16 | | 1 | 17 | +----------+ 18 | +----------+ 19 | | Int64(2) | 20 | +----------+ 21 | | 2 | 22 | +----------+ 23 | 24 | ----- stderr ----- 25 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_top_memory_consumers@no_track.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: datafusion-cli/tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--memory-limit" 7 | - 10M 8 | - "--command" 9 | - "select * from generate_series(1,500000) as t1(v1) order by v1;" 10 | - "--top-memory-consumers" 11 | - "0" 12 | --- 13 | success: false 14 | exit_code: 1 15 | ----- stdout ----- 16 | [CLI_VERSION] 17 | Error: Not enough memory to continue external sort. Consider increasing the memory limit, or decreasing sort_spill_reservation_bytes 18 | caused by 19 | Resources exhausted: Failed to allocate 20 | 21 | ----- stderr ----- 22 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_top_memory_consumers@top2.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: datafusion-cli/tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--memory-limit" 7 | - 10M 8 | - "--command" 9 | - "select * from generate_series(1,500000) as t1(v1) order by v1;" 10 | - "--top-memory-consumers" 11 | - "2" 12 | --- 13 | success: false 14 | exit_code: 1 15 | ----- stdout ----- 16 | [CLI_VERSION] 17 | Error: Not enough memory to continue external sort. Consider increasing the memory limit, or decreasing sort_spill_reservation_bytes 18 | caused by 19 | Resources exhausted: Additional allocation failed with top memory consumers (across reservations) as: 20 | Consumer(can spill: bool) consumed XB, 21 | Consumer(can spill: bool) consumed XB. 22 | Error: Failed to allocate 23 | 24 | ----- stderr ----- 25 | -------------------------------------------------------------------------------- /datafusion-cli/tests/snapshots/cli_top_memory_consumers@top3_default.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: datafusion-cli/tests/cli_integration.rs 3 | info: 4 | program: datafusion-cli 5 | args: 6 | - "--memory-limit" 7 | - 10M 8 | - "--command" 9 | - "select * from generate_series(1,500000) as t1(v1) order by v1;" 10 | --- 11 | success: false 12 | exit_code: 1 13 | ----- stdout ----- 14 | [CLI_VERSION] 15 | Error: Not enough memory to continue external sort. Consider increasing the memory limit, or decreasing sort_spill_reservation_bytes 16 | caused by 17 | Resources exhausted: Additional allocation failed with top memory consumers (across reservations) as: 18 | Consumer(can spill: bool) consumed XB, 19 | Consumer(can spill: bool) consumed XB, 20 | Consumer(can spill: bool) consumed XB. 21 | Error: Failed to allocate 22 | 23 | ----- stderr ----- 24 | -------------------------------------------------------------------------------- /datafusion-cli/tests/sql/backslash.sql: -------------------------------------------------------------------------------- 1 | select '\', '\\', '\\\\\', 'dsdsds\\\\', '\t', '\0', '\n'; -------------------------------------------------------------------------------- /datafusion-cli/tests/sql/integration/load_local_csv.sql: -------------------------------------------------------------------------------- 1 | CREATE EXTERNAL TABLE CARS 2 | STORED AS CSV 3 | LOCATION '../datafusion/core/tests/data/cars.csv' 4 | OPTIONS ('has_header' 'TRUE'); 5 | 6 | SELECT * FROM CARS limit 1; -------------------------------------------------------------------------------- /datafusion-cli/tests/sql/integration/load_s3_csv.sql: -------------------------------------------------------------------------------- 1 | CREATE EXTERNAL TABLE CARS 2 | STORED AS CSV 3 | LOCATION 's3://data/cars.csv'; 4 | 5 | SELECT * FROM CARS limit 1; -------------------------------------------------------------------------------- /datafusion-cli/tests/sql/select.sql: -------------------------------------------------------------------------------- 1 | select 1; -------------------------------------------------------------------------------- /datafusion-cli/tests/sql/types_format.sql: -------------------------------------------------------------------------------- 1 | set datafusion.format.types_info to true; 2 | 3 | select 54 -------------------------------------------------------------------------------- /datafusion/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # Changelog 21 | 22 | Change logs for each release can be found [here](https://github.com/apache/datafusion/tree/main/dev/changelog). 23 | -------------------------------------------------------------------------------- /datafusion/catalog-listing/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/catalog-listing/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/catalog/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/catalog/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/catalog/src/dynamic_file/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | pub(crate) mod catalog; 19 | -------------------------------------------------------------------------------- /datafusion/common-runtime/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/common-runtime/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/common/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/common/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/common/src/file_options/avro_writer.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! Options related to how avro files should be written 19 | 20 | #[derive(Clone, Debug)] 21 | pub struct AvroWriterOptions {} 22 | -------------------------------------------------------------------------------- /datafusion/core/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/core/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/core/src/error.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! DataFusion error type [`DataFusionError`] and [`Result`]. 19 | pub use datafusion_common::{DataFusionError, Result, SharedResult}; 20 | -------------------------------------------------------------------------------- /datafusion/core/tests/catalog/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | mod memory; 19 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/1.json: -------------------------------------------------------------------------------- 1 | {"a":1, "b":[2.0, 1.3, -6.1], "c":[false, true], "d":"4"} 2 | {"a":-10, "b":[2.0, 1.3, -6.1], "c":[true, true], "d":"4"} 3 | {"a":2, "b":[2.0, null, -6.1], "c":[false, null], "d":"text"} 4 | {} -------------------------------------------------------------------------------- /datafusion/core/tests/data/2.json: -------------------------------------------------------------------------------- 1 | {"a":1, "b":2.0, "c":false, "d":"4"} 2 | {"a":-10, "b":-3.5, "c":true, "d":"4"} 3 | {"a":2, "b":0.6, "c":false, "d":"text"} 4 | {"a":1, "b":2.0, "c":false, "d":"4"} 5 | {"a":7, "b":-3.5, "c":true, "d":"4"} 6 | {"a":1, "b":0.6, "c":false, "d":"text"} 7 | {"a":1, "b":2.0, "c":false, "d":"4"} 8 | {"a":5, "b":-3.5, "c":true, "d":"4"} 9 | {"a":1, "b":0.6, "c":false, "d":"text"} 10 | {"a":1, "b":2.0, "c":false, "d":"4"} 11 | {"a":1, "b":-3.5, "c":true, "d":"4"} 12 | {"a":100000000000000, "b":0.6, "c":false, "d":"text"} -------------------------------------------------------------------------------- /datafusion/core/tests/data/3.json: -------------------------------------------------------------------------------- 1 | {"mycol": null} -------------------------------------------------------------------------------- /datafusion/core/tests/data/4.json: -------------------------------------------------------------------------------- 1 | {"a":1, "b":[2.0, 1.3, -6.1]} 2 | {"a":2, "b":[3.0, 4.3]} 3 | {"c":[false, true], "d":{"c1": 23, "c2": 32}} 4 | {"e": {"e1": 2, "e2": 12.3}} -------------------------------------------------------------------------------- /datafusion/core/tests/data/aggregate_agg_multi_order.csv: -------------------------------------------------------------------------------- 1 | c1,c2,c3 2 | 1,20,0 3 | 2,20,1 4 | 3,10,2 5 | 4,10,3 6 | 5,30,4 7 | 6,30,5 8 | 7,30,6 9 | 8,30,7 10 | 9,30,8 11 | 10,10,9 -------------------------------------------------------------------------------- /datafusion/core/tests/data/aggregate_simple.csv: -------------------------------------------------------------------------------- 1 | c1,c2,c3 2 | 0.00001,0.000000000001,true 3 | 0.00002,0.000000000002,false 4 | 0.00002,0.000000000002,false 5 | 0.00003,0.000000000003,true 6 | 0.00003,0.000000000003,true 7 | 0.00003,0.000000000003,true 8 | 0.00004,0.000000000004,false 9 | 0.00004,0.000000000004,false 10 | 0.00004,0.000000000004,false 11 | 0.00004,0.000000000004,false 12 | 0.00005,0.000000000005,true 13 | 0.00005,0.000000000005,true 14 | 0.00005,0.000000000005,true 15 | 0.00005,0.000000000005,true 16 | 0.00005,0.000000000005,true -------------------------------------------------------------------------------- /datafusion/core/tests/data/aggregate_simple_pipe.csv: -------------------------------------------------------------------------------- 1 | c1|c2|c3 2 | 0.00001|0.000000000001|true 3 | 0.00002|0.000000000002|false 4 | 0.00002|0.000000000002|false 5 | 0.00003|0.000000000003|true 6 | 0.00003|0.000000000003|true 7 | 0.00003|0.000000000003|true 8 | 0.00004|0.000000000004|false 9 | 0.00004|0.000000000004|false 10 | 0.00004|0.000000000004|false 11 | 0.00004|0.000000000004|false 12 | 0.00005|0.000000000005|true 13 | 0.00005|0.000000000005|true 14 | 0.00005|0.000000000005|true 15 | 0.00005|0.000000000005|true 16 | 0.00005|0.000000000005|true -------------------------------------------------------------------------------- /datafusion/core/tests/data/capitalized_example.csv: -------------------------------------------------------------------------------- 1 | A,b,c 2 | 1,2,3 3 | 1,10,5 4 | 2,5,6 5 | 2,1,4 -------------------------------------------------------------------------------- /datafusion/core/tests/data/clickbench_hits_10.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/clickbench_hits_10.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/convert_first_last.csv: -------------------------------------------------------------------------------- 1 | c1,c2,c3 2 | 1,9,0 3 | 2,8,1 4 | 3,7,2 5 | 4,6,3 6 | 5,5,4 7 | 6,4,5 8 | 7,3,6 9 | 8,2,7 10 | 9,1,8 11 | 10,0,9 -------------------------------------------------------------------------------- /datafusion/core/tests/data/corrupt.csv: -------------------------------------------------------------------------------- 1 | num,str 2 | 1,a 3 | 2,b 4 | 3,c 5 | d,4 6 | 4,d 7 | 5,e -------------------------------------------------------------------------------- /datafusion/core/tests/data/cr_terminator.csv: -------------------------------------------------------------------------------- 1 | c1,c2 id0,value0 id1,value1 id2,value2 id3,value3 -------------------------------------------------------------------------------- /datafusion/core/tests/data/customer.csv: -------------------------------------------------------------------------------- 1 | andrew,100 2 | jorge,200 3 | andy,150 4 | paul,300 5 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/decimal_data.csv: -------------------------------------------------------------------------------- 1 | c1,c2,c3,c4,c5 2 | 0.00001,0.000000000001,1,true,0.000014 3 | 0.00002,0.000000000002,2,true,0.000025 4 | 0.00002,0.000000000002,3,false,0.000019 5 | 0.00003,0.000000000003,4,true,0.000032 6 | 0.00003,0.000000000003,5,false,0.000035 7 | 0.00003,0.000000000003,5,true,0.000011 8 | 0.00004,0.000000000004,5,true,0.000044 9 | 0.00004,0.000000000004,12,false,0.000040 10 | 0.00004,0.000000000004,14,true,0.000040 11 | 0.00004,0.000000000004,8,false,0.000044 12 | 0.00005,0.000000000005,9,true,0.000052 13 | 0.00005,0.000000000005,4,true,0.000078 14 | 0.00005,0.000000000005,8,false,0.000033 15 | 0.00005,0.000000000005,100,true,0.000068 16 | 0.00005,0.000000000005,1,false,0.000100 -------------------------------------------------------------------------------- /datafusion/core/tests/data/double_quote.csv: -------------------------------------------------------------------------------- 1 | c1,c2 2 | id0,"""value0""" 3 | id1,"""value1""" 4 | id2,"""value2""" 5 | id3,"""value3""" 6 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty.csv: -------------------------------------------------------------------------------- 1 | c1,c2,c3 2 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty.json -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_0_byte.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_0_byte.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/all_empty/empty0.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_files/all_empty/empty0.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/all_empty/empty1.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_files/all_empty/empty1.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/all_empty/empty2.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_files/all_empty/empty2.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/some_empty/a_empty.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_files/some_empty/a_empty.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/some_empty/b.csv: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 7 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/some_empty/c_empty.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_files/some_empty/c_empty.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/some_empty/d.csv: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 7 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/empty_files/some_empty/e_empty.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/empty_files/some_empty/e_empty.csv -------------------------------------------------------------------------------- /datafusion/core/tests/data/escape.csv: -------------------------------------------------------------------------------- 1 | c1,c2 2 | "id0","value\"0" 3 | "id1","value\"1" 4 | "id2","value\"2" 5 | "id3","value\"3" 6 | "id4","value\"4" 7 | "id5","value\"5" 8 | "id6","value\"6" 9 | "id7","value\"7" 10 | "id8","value\"8" 11 | "id9","value\"9" 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/example.arrow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/example.arrow -------------------------------------------------------------------------------- /datafusion/core/tests/data/example.csv: -------------------------------------------------------------------------------- 1 | a,b,c 2 | 1,2,3 -------------------------------------------------------------------------------- /datafusion/core/tests/data/example_long.csv: -------------------------------------------------------------------------------- 1 | a,b,c 2 | 1,2,3 3 | 4,5,6 4 | 7,8,9 -------------------------------------------------------------------------------- /datafusion/core/tests/data/filter_pushdown/single_file.gz.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/filter_pushdown/single_file.gz.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/filter_pushdown/single_file_small_pages.gz.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/filter_pushdown/single_file_small_pages.gz.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/fixed_size_list_array.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/fixed_size_list_array.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/int96_nested.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/int96_nested.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/newlines_in_values.csv: -------------------------------------------------------------------------------- 1 | id,message 2 | 1,"hello 3 | world" 4 | 2,"something 5 | else" 6 | 3," 7 | many 8 | lines 9 | make 10 | good test 11 | " 12 | 4,unquoted 13 | value,end 14 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/newlines_in_values_cr_terminator.csv: -------------------------------------------------------------------------------- 1 | id,message 1,"hello world" 2,"something else" 3," many lines make good test " 4,unquoted value,end -------------------------------------------------------------------------------- /datafusion/core/tests/data/one_col.csv: -------------------------------------------------------------------------------- 1 | 5 2 | 5 3 | 5 4 | 5 5 | 5 6 | 5 7 | 5 8 | 5 9 | 5 10 | 5 11 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/parquet_map.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/parquet_map.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_csv/partition-0.csv: -------------------------------------------------------------------------------- 1 | 0,0,true 2 | 0,1,false 3 | 0,2,true 4 | 0,3,false 5 | 0,4,true 6 | 0,5,false 7 | 0,6,true 8 | 0,7,false 9 | 0,8,true 10 | 0,9,false 11 | 0,10,true 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_csv/partition-1.csv: -------------------------------------------------------------------------------- 1 | 1,0,true 2 | 1,1,false 3 | 1,2,true 4 | 1,3,false 5 | 1,4,true 6 | 1,5,false 7 | 1,6,true 8 | 1,7,false 9 | 1,8,true 10 | 1,9,false 11 | 1,10,true 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_csv/partition-2.csv: -------------------------------------------------------------------------------- 1 | 2,0,true 2 | 2,1,false 3 | 2,2,true 4 | 2,3,false 5 | 2,4,true 6 | 2,5,false 7 | 2,6,true 8 | 2,7,false 9 | 2,8,true 10 | 2,9,false 11 | 2,10,true 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_csv/partition-3.csv: -------------------------------------------------------------------------------- 1 | 3,0,true 2 | 3,1,false 3 | 3,2,true 4 | 3,3,false 5 | 3,4,true 6 | 3,5,false 7 | 3,6,true 8 | 3,7,false 9 | 3,8,true 10 | 3,9,false 11 | 3,10,true 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_table/c_date=2018-11-13/timestamps.csv: -------------------------------------------------------------------------------- 1 | Jorge,2018-12-13T12:12:10.011Z 2 | Andrew,2018-11-13T17:11:10.011Z -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_table/c_date=2018-12-13/timestamps.csv: -------------------------------------------------------------------------------- 1 | Jorge,2018-12-13T12:12:10.011Z 2 | Andrew,2018-11-13T17:11:10.011Z -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_table_arrow/part=123/data.arrow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/partitioned_table_arrow/part=123/data.arrow -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_table_arrow/part=456/data.arrow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/partitioned_table_arrow/part=456/data.arrow -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_table_json/part=1/data.json: -------------------------------------------------------------------------------- 1 | {"id": 1, "value": "foo"} 2 | {"id": 2, "value": "bar"} 3 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/partitioned_table_json/part=2/data.json: -------------------------------------------------------------------------------- 1 | {"id": 3, "value": "baz"} 2 | {"id": 4, "value": "qux"} 3 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/quote.csv: -------------------------------------------------------------------------------- 1 | c1,c2 2 | ~id0~,~value0~ 3 | ~id1~,~value1~ 4 | ~id2~,~value2~ 5 | ~id3~,~value3~ 6 | ~id4~,~value4~ 7 | ~id5~,~value5~ 8 | ~id6~,~value6~ 9 | ~id7~,~value7~ 10 | ~id8~,~value8~ 11 | ~id9~,~value9~ 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/recursive_cte/balance.csv: -------------------------------------------------------------------------------- 1 | time,name,account_balance 2 | 1,John,100 3 | 1,Tim,200 4 | 2,John,300 5 | 2,Tim,400 -------------------------------------------------------------------------------- /datafusion/core/tests/data/recursive_cte/growth.csv: -------------------------------------------------------------------------------- 1 | name,account_growth 2 | John,3 3 | Tim,20 4 | Eliza,150 -------------------------------------------------------------------------------- /datafusion/core/tests/data/recursive_cte/sales.csv: -------------------------------------------------------------------------------- 1 | region_id,salesperson_id,sale_amount 2 | 101,1,1000 3 | 102,2,500 4 | 101,2,700 5 | 103,3,800 6 | 102,4,300 7 | 101,4,400 8 | 102,5,600 9 | 103,6,500 10 | 101,7,900 -------------------------------------------------------------------------------- /datafusion/core/tests/data/recursive_cte/salespersons.csv: -------------------------------------------------------------------------------- 1 | salesperson_id,manager_id 2 | 1, 3 | 2,1 4 | 3,1 5 | 4,2 6 | 5,2 7 | 6,3 8 | 7,3 -------------------------------------------------------------------------------- /datafusion/core/tests/data/recursive_cte/time.csv: -------------------------------------------------------------------------------- 1 | time,other 2 | 1,foo 3 | 2,bar 4 | 4,baz 5 | 5,qux 6 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/schema_infer_limit.json: -------------------------------------------------------------------------------- 1 | {"a":1} 2 | {"a":-10, "b":-3.5} 3 | {"a":2, "b":0.6, "c":false} 4 | {"a":1, "b":2.0, "c":false, "d":"4"} -------------------------------------------------------------------------------- /datafusion/core/tests/data/test_binary.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/test_binary.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-01/j5fUeSDQo22oPyPU.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-01/j5fUeSDQo22oPyPU.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-02/j5fUeSDQo22oPyPU.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-02/j5fUeSDQo22oPyPU.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-03/j5fUeSDQo22oPyPU.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-03/j5fUeSDQo22oPyPU.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-04/j5fUeSDQo22oPyPU.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/test_statistics_per_partition/date=2025-03-04/j5fUeSDQo22oPyPU.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/timestamp_with_tz.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/core/tests/data/timestamp_with_tz.parquet -------------------------------------------------------------------------------- /datafusion/core/tests/data/timestamps.csv: -------------------------------------------------------------------------------- 1 | Jorge,2018-12-13T12:12:10.011Z 2 | Andrew,2018-11-13T17:11:10.011Z -------------------------------------------------------------------------------- /datafusion/core/tests/data/unnest.json: -------------------------------------------------------------------------------- 1 | {"a":1, "b":[2.0, 1.3, -6.1], "c":[false, true],"d":{"e":1,"f":2}} 2 | {"a":2, "b":[3.0, 2.3, -7.1], "c":[false, true]} 3 | -------------------------------------------------------------------------------- /datafusion/core/tests/data/wide_rows.csv: -------------------------------------------------------------------------------- 1 | 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 2 | 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 3 | 4 | -------------------------------------------------------------------------------- /datafusion/core/tests/execution/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | mod logical_plan; 19 | -------------------------------------------------------------------------------- /datafusion/core/tests/fuzz_cases/equivalence/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! `EquivalenceProperties` fuzz testing 19 | 20 | mod ordering; 21 | mod projection; 22 | mod properties; 23 | mod utils; 24 | -------------------------------------------------------------------------------- /datafusion/core/tests/parquet_config.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! End to end test for `ParquetSource` and related components 19 | 20 | /// Run all tests that are found in the `parquet` directory 21 | mod parquet; 22 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/1.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | with customer_total_return as 4 | (select sr_customer_sk as ctr_customer_sk 5 | ,sr_store_sk as ctr_store_sk 6 | ,sum(SR_FEE) as ctr_total_return 7 | from store_returns 8 | ,date_dim 9 | where sr_returned_date_sk = d_date_sk 10 | and d_year =2000 11 | group by sr_customer_sk 12 | ,sr_store_sk) 13 | select c_customer_id 14 | from customer_total_return ctr1 15 | ,store 16 | ,customer 17 | where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2 18 | from customer_total_return ctr2 19 | where ctr1.ctr_store_sk = ctr2.ctr_store_sk) 20 | and s_store_sk = ctr1.ctr_store_sk 21 | and s_state = 'SD' 22 | and ctr1.ctr_customer_sk = c_customer_sk 23 | order by c_customer_id 24 | limit 100; 25 | 26 | 27 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/12.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id 4 | ,i_item_desc 5 | ,i_category 6 | ,i_class 7 | ,i_current_price 8 | ,sum(ws_ext_sales_price) as itemrevenue 9 | ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over 10 | (partition by i_class) as revenueratio 11 | from 12 | web_sales 13 | ,item 14 | ,date_dim 15 | where 16 | ws_item_sk = i_item_sk 17 | and i_category in ('Jewelry', 'Sports', 'Books') 18 | and ws_sold_date_sk = d_date_sk 19 | and d_date between cast('2001-01-12' as date) 20 | and cast('2001-01-12' as date) + INTERVAL '30 days' 21 | group by 22 | i_item_id 23 | ,i_item_desc 24 | ,i_category 25 | ,i_class 26 | ,i_current_price 27 | order by 28 | i_category 29 | ,i_class 30 | ,i_item_id 31 | ,i_item_desc 32 | ,revenueratio 33 | limit 100; 34 | 35 | 36 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/15.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select ca_zip 4 | ,sum(cs_sales_price) 5 | from catalog_sales 6 | ,customer 7 | ,customer_address 8 | ,date_dim 9 | where cs_bill_customer_sk = c_customer_sk 10 | and c_current_addr_sk = ca_address_sk 11 | and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', 12 | '85392', '85460', '80348', '81792') 13 | or ca_state in ('CA','WA','GA') 14 | or cs_sales_price > 500) 15 | and cs_sold_date_sk = d_date_sk 16 | and d_qoy = 2 and d_year = 2000 17 | group by ca_zip 18 | order by ca_zip 19 | limit 100; 20 | 21 | 22 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/19.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, 4 | sum(ss_ext_sales_price) ext_price 5 | from date_dim, store_sales, item,customer,customer_address,store 6 | where d_date_sk = ss_sold_date_sk 7 | and ss_item_sk = i_item_sk 8 | and i_manager_id=7 9 | and d_moy=11 10 | and d_year=1999 11 | and ss_customer_sk = c_customer_sk 12 | and c_current_addr_sk = ca_address_sk 13 | and substr(ca_zip,1,5) <> substr(s_zip,1,5) 14 | and ss_store_sk = s_store_sk 15 | group by i_brand 16 | ,i_brand_id 17 | ,i_manufact_id 18 | ,i_manufact 19 | order by ext_price desc 20 | ,i_brand 21 | ,i_brand_id 22 | ,i_manufact_id 23 | ,i_manufact 24 | limit 100 ; 25 | 26 | 27 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/20.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id 4 | ,i_item_desc 5 | ,i_category 6 | ,i_class 7 | ,i_current_price 8 | ,sum(cs_ext_sales_price) as itemrevenue 9 | ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over 10 | (partition by i_class) as revenueratio 11 | from catalog_sales 12 | ,item 13 | ,date_dim 14 | where cs_item_sk = i_item_sk 15 | and i_category in ('Jewelry', 'Sports', 'Books') 16 | and cs_sold_date_sk = d_date_sk 17 | and d_date between cast('2001-01-12' as date) 18 | and (cast('2001-01-12' as date) + INTERVAL '30 days') 19 | group by i_item_id 20 | ,i_item_desc 21 | ,i_category 22 | ,i_class 23 | ,i_current_price 24 | order by i_category 25 | ,i_class 26 | ,i_item_id 27 | ,i_item_desc 28 | ,revenueratio 29 | limit 100; 30 | 31 | 32 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/22.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_product_name 4 | ,i_brand 5 | ,i_class 6 | ,i_category 7 | ,avg(inv_quantity_on_hand) qoh 8 | from inventory 9 | ,date_dim 10 | ,item 11 | where inv_date_sk=d_date_sk 12 | and inv_item_sk=i_item_sk 13 | and d_month_seq between 1212 and 1212 + 11 14 | group by rollup(i_product_name 15 | ,i_brand 16 | ,i_class 17 | ,i_category) 18 | order by qoh, i_product_name, i_brand, i_class, i_category 19 | limit 100; 20 | 21 | 22 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/26.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id, 4 | avg(cs_quantity) agg1, 5 | avg(cs_list_price) agg2, 6 | avg(cs_coupon_amt) agg3, 7 | avg(cs_sales_price) agg4 8 | from catalog_sales, customer_demographics, date_dim, item, promotion 9 | where cs_sold_date_sk = d_date_sk and 10 | cs_item_sk = i_item_sk and 11 | cs_bill_cdemo_sk = cd_demo_sk and 12 | cs_promo_sk = p_promo_sk and 13 | cd_gender = 'F' and 14 | cd_marital_status = 'W' and 15 | cd_education_status = 'Primary' and 16 | (p_channel_email = 'N' or p_channel_event = 'N') and 17 | d_year = 1998 18 | group by i_item_id 19 | order by i_item_id 20 | limit 100; 21 | 22 | 23 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/27.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id, 4 | s_state, grouping(s_state) g_state, 5 | avg(ss_quantity) agg1, 6 | avg(ss_list_price) agg2, 7 | avg(ss_coupon_amt) agg3, 8 | avg(ss_sales_price) agg4 9 | from store_sales, customer_demographics, date_dim, store, item 10 | where ss_sold_date_sk = d_date_sk and 11 | ss_item_sk = i_item_sk and 12 | ss_store_sk = s_store_sk and 13 | ss_cdemo_sk = cd_demo_sk and 14 | cd_gender = 'M' and 15 | cd_marital_status = 'W' and 16 | cd_education_status = 'College' and 17 | d_year = 2002 and 18 | s_state in ('MO','LA', 'GA', 'MI', 'SC', 'OH') 19 | group by rollup (i_item_id, s_state) 20 | order by i_item_id 21 | ,s_state 22 | limit 100; 23 | 24 | 25 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/3.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select dt.d_year 4 | ,item.i_brand_id brand_id 5 | ,item.i_brand brand 6 | ,sum(ss_ext_sales_price) sum_agg 7 | from date_dim dt 8 | ,store_sales 9 | ,item 10 | where dt.d_date_sk = store_sales.ss_sold_date_sk 11 | and store_sales.ss_item_sk = item.i_item_sk 12 | and item.i_manufact_id = 436 13 | and dt.d_moy=12 14 | group by dt.d_year 15 | ,item.i_brand 16 | ,item.i_brand_id 17 | order by dt.d_year 18 | ,sum_agg desc 19 | ,brand_id 20 | limit 100; 21 | 22 | 23 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/32.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select sum(cs_ext_discount_amt) as 'excess discount amount' 4 | from 5 | catalog_sales 6 | ,item 7 | ,date_dim 8 | where 9 | i_manufact_id = 269 10 | and i_item_sk = cs_item_sk 11 | and d_date between '1998-03-18' and 12 | (cast('1998-03-18' as date) + INTERVAL '90 days') 13 | and d_date_sk = cs_sold_date_sk 14 | and cs_ext_discount_amt 15 | > ( 16 | select 17 | 1.3 * avg(cs_ext_discount_amt) 18 | from 19 | catalog_sales 20 | ,date_dim 21 | where 22 | cs_item_sk = i_item_sk 23 | and d_date between '1998-03-18' and 24 | (cast('1998-03-18' as date) + INTERVAL '90 days') 25 | and d_date_sk = cs_sold_date_sk 26 | ) 27 | limit 100; 28 | 29 | 30 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/36.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select 4 | sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin 5 | ,i_category 6 | ,i_class 7 | ,grouping(i_category)+grouping(i_class) as lochierarchy 8 | ,rank() over ( 9 | partition by grouping(i_category)+grouping(i_class), 10 | case when grouping(i_class) = 0 then i_category end 11 | order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) as rank_within_parent 12 | from 13 | store_sales 14 | ,date_dim d1 15 | ,item 16 | ,store 17 | where 18 | d1.d_year = 2000 19 | and d1.d_date_sk = ss_sold_date_sk 20 | and i_item_sk = ss_item_sk 21 | and s_store_sk = ss_store_sk 22 | and s_state in ('MO','LA','GA','MI', 23 | 'SC','OH','SD','AL') 24 | group by rollup(i_category,i_class) 25 | order by 26 | lochierarchy desc 27 | ,case when lochierarchy = 0 then i_category end 28 | ,rank_within_parent 29 | limit 100; 30 | 31 | 32 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/37.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id 4 | ,i_item_desc 5 | ,i_current_price 6 | from item, inventory, date_dim, catalog_sales 7 | where i_current_price between 22 and 22 + 30 8 | and inv_item_sk = i_item_sk 9 | and d_date_sk=inv_date_sk 10 | and d_date between cast('2001-06-02' as date) and (cast('2001-06-02' as date) + INTERVAL '60 days') 11 | and i_manufact_id in (678,964,918,849) 12 | and inv_quantity_on_hand between 100 and 500 13 | and cs_item_sk = i_item_sk 14 | group by i_item_id,i_item_desc,i_current_price 15 | order by i_item_id 16 | limit 100; 17 | 18 | 19 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/42.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select dt.d_year 4 | ,item.i_category_id 5 | ,item.i_category 6 | ,sum(ss_ext_sales_price) 7 | from date_dim dt 8 | ,store_sales 9 | ,item 10 | where dt.d_date_sk = store_sales.ss_sold_date_sk 11 | and store_sales.ss_item_sk = item.i_item_sk 12 | and item.i_manager_id = 1 13 | and dt.d_moy=12 14 | and dt.d_year=1998 15 | group by dt.d_year 16 | ,item.i_category_id 17 | ,item.i_category 18 | order by sum(ss_ext_sales_price) desc,dt.d_year 19 | ,item.i_category_id 20 | ,item.i_category 21 | limit 100 ; 22 | 23 | 24 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/45.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select ca_zip, ca_county, sum(ws_sales_price) 4 | from web_sales, customer, customer_address, date_dim, item 5 | where ws_bill_customer_sk = c_customer_sk 6 | and c_current_addr_sk = ca_address_sk 7 | and ws_item_sk = i_item_sk 8 | and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') 9 | or 10 | i_item_id in (select i_item_id 11 | from item 12 | where i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) 13 | ) 14 | ) 15 | and ws_sold_date_sk = d_date_sk 16 | and d_qoy = 2 and d_year = 2000 17 | group by ca_zip, ca_county 18 | order by ca_zip, ca_county 19 | limit 100; 20 | 21 | 22 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/52.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select dt.d_year 4 | ,item.i_brand_id brand_id 5 | ,item.i_brand brand 6 | ,sum(ss_ext_sales_price) ext_price 7 | from date_dim dt 8 | ,store_sales 9 | ,item 10 | where dt.d_date_sk = store_sales.ss_sold_date_sk 11 | and store_sales.ss_item_sk = item.i_item_sk 12 | and item.i_manager_id = 1 13 | and dt.d_moy=12 14 | and dt.d_year=1998 15 | group by dt.d_year 16 | ,item.i_brand 17 | ,item.i_brand_id 18 | order by dt.d_year 19 | ,ext_price desc 20 | ,brand_id 21 | limit 100 ; 22 | 23 | 24 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/55.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_brand_id brand_id, i_brand brand, 4 | sum(ss_ext_sales_price) ext_price 5 | from date_dim, store_sales, item 6 | where d_date_sk = ss_sold_date_sk 7 | and ss_item_sk = i_item_sk 8 | and i_manager_id=36 9 | and d_moy=12 10 | and d_year=2001 11 | group by i_brand, i_brand_id 12 | order by ext_price desc, i_brand_id 13 | limit 100 ; 14 | 15 | 16 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/6.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select a.ca_state state, count(*) cnt 4 | from customer_address a 5 | ,customer c 6 | ,store_sales s 7 | ,date_dim d 8 | ,item i 9 | where a.ca_address_sk = c.c_current_addr_sk 10 | and c.c_customer_sk = s.ss_customer_sk 11 | and s.ss_sold_date_sk = d.d_date_sk 12 | and s.ss_item_sk = i.i_item_sk 13 | and d.d_month_seq = 14 | (select distinct (d_month_seq) 15 | from date_dim 16 | where d_year = 2000 17 | and d_moy = 2 ) 18 | and i.i_current_price > 1.2 * 19 | (select avg(j.i_current_price) 20 | from item j 21 | where j.i_category = i.i_category) 22 | group by a.ca_state 23 | having count(*) >= 10 24 | order by cnt, a.ca_state 25 | limit 100; 26 | 27 | 28 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/65.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select 4 | s_store_name, 5 | i_item_desc, 6 | sc.revenue, 7 | i_current_price, 8 | i_wholesale_cost, 9 | i_brand 10 | from store, item, 11 | (select ss_store_sk, avg(revenue) as ave 12 | from 13 | (select ss_store_sk, ss_item_sk, 14 | sum(ss_sales_price) as revenue 15 | from store_sales, date_dim 16 | where ss_sold_date_sk = d_date_sk and d_month_seq between 1212 and 1212+11 17 | group by ss_store_sk, ss_item_sk) sa 18 | group by ss_store_sk) sb, 19 | (select ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue 20 | from store_sales, date_dim 21 | where ss_sold_date_sk = d_date_sk and d_month_seq between 1212 and 1212+11 22 | group by ss_store_sk, ss_item_sk) sc 23 | where sb.ss_store_sk = sc.ss_store_sk and 24 | sc.revenue <= 0.1 * sb.ave and 25 | s_store_sk = sc.ss_store_sk and 26 | i_item_sk = sc.ss_item_sk 27 | order by s_store_name, i_item_desc 28 | limit 100; 29 | 30 | 31 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/7.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id, 4 | avg(ss_quantity) agg1, 5 | avg(ss_list_price) agg2, 6 | avg(ss_coupon_amt) agg3, 7 | avg(ss_sales_price) agg4 8 | from store_sales, customer_demographics, date_dim, item, promotion 9 | where ss_sold_date_sk = d_date_sk and 10 | ss_item_sk = i_item_sk and 11 | ss_cdemo_sk = cd_demo_sk and 12 | ss_promo_sk = p_promo_sk and 13 | cd_gender = 'F' and 14 | cd_marital_status = 'W' and 15 | cd_education_status = 'Primary' and 16 | (p_channel_email = 'N' or p_channel_event = 'N') and 17 | d_year = 1998 18 | group by i_item_id 19 | order by i_item_id 20 | limit 100; 21 | 22 | 23 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/82.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id 4 | ,i_item_desc 5 | ,i_current_price 6 | from item, inventory, date_dim, store_sales 7 | where i_current_price between 30 and 30+30 8 | and inv_item_sk = i_item_sk 9 | and d_date_sk=inv_date_sk 10 | and d_date between cast('2002-05-30' as date) and (cast('2002-05-30' as date) + INTERVAL '60 days') 11 | and i_manufact_id in (437,129,727,663) 12 | and inv_quantity_on_hand between 100 and 500 13 | and ss_item_sk = i_item_sk 14 | group by i_item_id,i_item_desc,i_current_price 15 | order by i_item_id 16 | limit 100; 17 | 18 | 19 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/84.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select c_customer_id as customer_id 4 | , coalesce(c_last_name,'') || ', ' || coalesce(c_first_name,'') as customername 5 | from customer 6 | ,customer_address 7 | ,customer_demographics 8 | ,household_demographics 9 | ,income_band 10 | ,store_returns 11 | where ca_city = 'Hopewell' 12 | and c_current_addr_sk = ca_address_sk 13 | and ib_lower_bound >= 32287 14 | and ib_upper_bound <= 32287 + 50000 15 | and ib_income_band_sk = hd_income_band_sk 16 | and cd_demo_sk = c_current_cdemo_sk 17 | and hd_demo_sk = c_current_hdemo_sk 18 | and sr_cdemo_sk = cd_demo_sk 19 | order by c_customer_id 20 | limit 100; 21 | 22 | 23 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/86.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select 4 | sum(ws_net_paid) as total_sum 5 | ,i_category 6 | ,i_class 7 | ,grouping(i_category)+grouping(i_class) as lochierarchy 8 | ,rank() over ( 9 | partition by grouping(i_category)+grouping(i_class), 10 | case when grouping(i_class) = 0 then i_category end 11 | order by sum(ws_net_paid) desc) as rank_within_parent 12 | from 13 | web_sales 14 | ,date_dim d1 15 | ,item 16 | where 17 | d1.d_month_seq between 1212 and 1212+11 18 | and d1.d_date_sk = ws_sold_date_sk 19 | and i_item_sk = ws_item_sk 20 | group by rollup(i_category,i_class) 21 | order by 22 | lochierarchy desc, 23 | case when lochierarchy = 0 then i_category end, 24 | rank_within_parent 25 | limit 100; 26 | 27 | 28 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/92.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select 4 | sum(ws_ext_discount_amt) as 'Excess Discount Amount' 5 | from 6 | web_sales 7 | ,item 8 | ,date_dim 9 | where 10 | i_manufact_id = 269 11 | and i_item_sk = ws_item_sk 12 | and d_date between '1998-03-18' and 13 | (cast('1998-03-18' as date) + INTERVAL '90 days') 14 | and d_date_sk = ws_sold_date_sk 15 | and ws_ext_discount_amt 16 | > ( 17 | SELECT 18 | 1.3 * avg(ws_ext_discount_amt) 19 | FROM 20 | web_sales 21 | ,date_dim 22 | WHERE 23 | ws_item_sk = i_item_sk 24 | and d_date between '1998-03-18' and 25 | (cast('1998-03-18' as date) + INTERVAL '90 days') 26 | and d_date_sk = ws_sold_date_sk 27 | ) 28 | order by sum(ws_ext_discount_amt) 29 | limit 100; 30 | 31 | 32 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/93.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select ss_customer_sk 4 | ,sum(act_sales) sumsales 5 | from (select ss_item_sk 6 | ,ss_ticket_number 7 | ,ss_customer_sk 8 | ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price 9 | else (ss_quantity*ss_sales_price) end act_sales 10 | from store_sales left outer join store_returns on (sr_item_sk = ss_item_sk 11 | and sr_ticket_number = ss_ticket_number) 12 | ,reason 13 | where sr_reason_sk = r_reason_sk 14 | and r_reason_desc = 'Did not like the warranty') t 15 | group by ss_customer_sk 16 | order by sumsales, ss_customer_sk 17 | limit 100; 18 | 19 | 20 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/94.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select 4 | count(distinct ws_order_number) as 'order count' 5 | ,sum(ws_ext_ship_cost) as 'total shipping cost' 6 | ,sum(ws_net_profit) as 'total net profit' 7 | from 8 | web_sales ws1 9 | ,date_dim 10 | ,customer_address 11 | ,web_site 12 | where 13 | d_date between '1999-5-01' and 14 | (cast('1999-5-01' as date) + INTERVAL '60 days') 15 | and ws1.ws_ship_date_sk = d_date_sk 16 | and ws1.ws_ship_addr_sk = ca_address_sk 17 | and ca_state = 'TX' 18 | and ws1.ws_web_site_sk = web_site_sk 19 | and web_company_name = 'pri' 20 | and exists (select * 21 | from web_sales ws2 22 | where ws1.ws_order_number = ws2.ws_order_number 23 | and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk) 24 | and not exists(select * 25 | from web_returns wr1 26 | where ws1.ws_order_number = wr1.wr_order_number) 27 | order by count(distinct ws_order_number) 28 | limit 100; 29 | 30 | 31 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/96.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select count(*) 4 | from store_sales 5 | ,household_demographics 6 | ,time_dim, store 7 | where ss_sold_time_sk = time_dim.t_time_sk 8 | and ss_hdemo_sk = household_demographics.hd_demo_sk 9 | and ss_store_sk = s_store_sk 10 | and time_dim.t_hour = 8 11 | and time_dim.t_minute >= 30 12 | and household_demographics.hd_dep_count = 5 13 | and store.s_store_name = 'ese' 14 | order by count(*) 15 | limit 100; 16 | 17 | 18 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpc-ds/98.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2015 Transaction Processing Performance Council 2 | 3 | select i_item_id 4 | ,i_item_desc 5 | ,i_category 6 | ,i_class 7 | ,i_current_price 8 | ,sum(ss_ext_sales_price) as itemrevenue 9 | ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over 10 | (partition by i_class) as revenueratio 11 | from 12 | store_sales 13 | ,item 14 | ,date_dim 15 | where 16 | ss_item_sk = i_item_sk 17 | and i_category in ('Jewelry', 'Sports', 'Books') 18 | and ss_sold_date_sk = d_date_sk 19 | and d_date between cast('2001-01-12' as date) 20 | and (cast('2001-01-12' as date) + INTERVAL '30 days') 21 | group by 22 | i_item_id 23 | ,i_item_desc 24 | ,i_category 25 | ,i_class 26 | ,i_current_price 27 | order by 28 | i_category 29 | ,i_class 30 | ,i_item_id 31 | ,i_item_desc 32 | ,revenueratio; 33 | 34 | 35 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpch-csv/nation.csv: -------------------------------------------------------------------------------- 1 | n_nationkey,n_name,n_regionkey,n_comment 2 | 1,ARGENTINA,1,al foxes promise slyly according to the regular accounts. bold requests alon 3 | 2,BRAZIL,1,y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special 4 | 3,CANADA,1,"eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold" 5 | 4,EGYPT,4,y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d 6 | 5,ETHIOPIA,0,ven packages wake quickly. regu 7 | 6,FRANCE,3,"refully final requests. regular, ironi" 8 | 7,GERMANY,3,"l platelets. regular accounts x-ray: unusual, regular acco" 9 | 8,INDIA,2,ss excuses cajole slyly across the packages. deposits print aroun 10 | 9,INDONESIA,2, slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull 11 | 10,IRAN,4,efully alongside of the slyly final dependencies. 12 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpch-csv/part.csv: -------------------------------------------------------------------------------- 1 | p_partkey,p_name,p_mfgr,p_brand,p_type,p_size,p_container,p_retailprice,p_comment 2 | 63700,goldenrod lavender spring chocolate lace,Manufacturer#1,Brand#23,PROMO BURNISHED COPPER,7,MED BOX,901.00,ly. slyly ironi 3 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpch-csv/partsupp.csv: -------------------------------------------------------------------------------- 1 | ps_partkey,ps_suppkey,ps_availqty,ps_supplycost,ps_comment 2 | 67310,7311,100,993.49,ven ideas. quickly even packages print. pending multipliers must have to are fluff 3 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpch-csv/region.csv: -------------------------------------------------------------------------------- 1 | r_regionkey,r_name,r_comment 2 | 4,MIDDLE EAST,uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl 3 | -------------------------------------------------------------------------------- /datafusion/core/tests/tpch-csv/supplier.csv: -------------------------------------------------------------------------------- 1 | s_suppkey,s_name,s_address,s_nationkey,s_phone,s_acctbal,s_comment 2 | 1,Supplier#000000001," N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ",17,27-918-335-1736,5755.94,each slyly above the careful 3 | 8136,Supplier#000008136,kXATyaEZOWdQC7fE43IquuR1HkKV8qx,20,30-268-895-2611,8383.6,er the carefully regular depths. pinto beans detect quickly p 4 | -------------------------------------------------------------------------------- /datafusion/datasource-avro/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/datasource-avro/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/datasource-csv/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/datasource-csv/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/datasource-json/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/datasource-json/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/datasource-parquet/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/datasource-parquet/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/datasource/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/datasource/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/doc/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/doc/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/execution/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/execution/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/expr-common/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/expr-common/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/expr-common/src/type_coercion.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | pub mod aggregates; 19 | pub mod binary; 20 | -------------------------------------------------------------------------------- /datafusion/expr/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/expr/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/expr/src/test/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | pub mod function_stub; 19 | -------------------------------------------------------------------------------- /datafusion/ffi/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/ffi/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions-aggregate-common/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions-aggregate-common/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions-aggregate-common/src/aggregate.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | pub mod count_distinct; 19 | pub mod groups_accumulator; 20 | -------------------------------------------------------------------------------- /datafusion/functions-aggregate/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions-aggregate/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions-nested/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions-nested/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions-table/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions-table/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions-window-common/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions-window-common/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions-window/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions-window/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/functions/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/functions/src/string/overlay.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #[deprecated( 19 | note = "overlay has been moved to core. Update imports to use core::overlay." 20 | )] 21 | pub use crate::core::overlay::*; 22 | -------------------------------------------------------------------------------- /datafusion/macros/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/macros/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/optimizer/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/optimizer/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/optimizer/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please see [Query Optimizer] in the Library User Guide 21 | 22 | [query optimizer]: https://datafusion.apache.org/library-user-guide/query-optimizer.html 23 | -------------------------------------------------------------------------------- /datafusion/physical-expr-common/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/physical-expr-common/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/physical-expr/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/physical-expr/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/physical-expr/src/intervals/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! Interval arithmetic and constraint propagation library 19 | 20 | pub mod cp_solver; 21 | pub mod test_utils; 22 | pub mod utils; 23 | -------------------------------------------------------------------------------- /datafusion/physical-expr/src/statistics/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! Statistics and constraint propagation library 19 | 20 | pub mod stats_solver; 21 | -------------------------------------------------------------------------------- /datafusion/physical-expr/tests/data/regex.csv: -------------------------------------------------------------------------------- 1 | values,patterns,replacement,flags 2 | abc,^(a),bb\1bb,i 3 | ABC,^(A).*,B,i 4 | aBc,(b|d),e,i 5 | AbC,(B|D),e, 6 | aBC,^(b|c),d, 7 | 4000,\b4([1-9]\d\d|\d[1-9]\d|\d\d[1-9])\b,xyz, 8 | 4010,\b4([1-9]\d\d|\d[1-9]\d|\d\d[1-9])\b,xyz, 9 | Düsseldorf,[\p{Letter}-]+,München, 10 | Москва,[\p{L}-]+,Moscow, 11 | Köln,[a-zA-Z]ö[a-zA-Z]{2},Koln, 12 | اليوم,^\p{Arabic}+$,Today, -------------------------------------------------------------------------------- /datafusion/physical-optimizer/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/physical-optimizer/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/physical-plan/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/physical-plan/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/physical-plan/src/aggregates/topk/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | //! TopK functionality for aggregates 19 | 20 | pub mod hash_table; 21 | pub mod heap; 22 | pub mod priority_map; 23 | -------------------------------------------------------------------------------- /datafusion/proto-common/.gitignore: -------------------------------------------------------------------------------- 1 | # Files generated by regen.sh 2 | proto/proto_descriptor.bin 3 | src/datafusion_common.rs 4 | src/datafusion_common.serde.rs 5 | -------------------------------------------------------------------------------- /datafusion/proto-common/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/proto-common/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/proto-common/regen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 21 | cd "$SCRIPT_DIR" && cargo run --manifest-path gen/Cargo.toml 22 | -------------------------------------------------------------------------------- /datafusion/proto/.gitignore: -------------------------------------------------------------------------------- 1 | # Files generated by regen.sh 2 | proto/proto_descriptor.bin 3 | src/datafusion.rs 4 | src/datafusion.serde.rs 5 | src/datafusion_common.rs 6 | -------------------------------------------------------------------------------- /datafusion/proto/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/proto/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/proto/regen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | repo_root=$(git rev-parse --show-toplevel) 21 | cd "$repo_root" && cargo run --manifest-path datafusion/proto/gen/Cargo.toml 22 | -------------------------------------------------------------------------------- /datafusion/proto/tests/proto_integration.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | /// Run all tests that are found in the `cases` directory 19 | mod cases; 20 | -------------------------------------------------------------------------------- /datafusion/proto/tests/testdata/test.csv: -------------------------------------------------------------------------------- 1 | a,b 2 | 1,2 3 | 3,4 -------------------------------------------------------------------------------- /datafusion/session/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/session/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/spark/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/spark/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/sql/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/sql/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/sql/tests/cases/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | mod collection; 19 | mod diagnostic; 20 | mod params; 21 | mod plan_to_sql; 22 | -------------------------------------------------------------------------------- /datafusion/sqllogictest/.gitignore: -------------------------------------------------------------------------------- 1 | *.py 2 | test_files/tpch/data -------------------------------------------------------------------------------- /datafusion/sqllogictest/data/repeat_much.snappy.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/sqllogictest/data/repeat_much.snappy.parquet -------------------------------------------------------------------------------- /datafusion/sqllogictest/test_files/join_only.slt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | include ./join.slt.part 19 | -------------------------------------------------------------------------------- /datafusion/substrait/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../../LICENSE.txt -------------------------------------------------------------------------------- /datafusion/substrait/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ../../NOTICE.txt -------------------------------------------------------------------------------- /datafusion/substrait/src/logical_plan/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | pub mod consumer; 19 | pub mod producer; 20 | -------------------------------------------------------------------------------- /datafusion/substrait/src/physical_plan/mod.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | pub mod consumer; 19 | pub mod producer; 20 | -------------------------------------------------------------------------------- /datafusion/substrait/tests/substrait_integration.rs: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | /// Run all tests that are found in the `cases` directory 19 | mod cases; 20 | mod utils; 21 | -------------------------------------------------------------------------------- /datafusion/substrait/tests/testdata/data.csv: -------------------------------------------------------------------------------- 1 | a,b,c,d,e,f 2 | 1,2.0,2020-01-01,false,4294967295,'a' 3 | 3,4.5,2020-01-01,true,2147483648,'b' 4 | -------------------------------------------------------------------------------- /datafusion/substrait/tests/testdata/data.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/substrait/tests/testdata/data.parquet -------------------------------------------------------------------------------- /datafusion/substrait/tests/testdata/empty.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/substrait/tests/testdata/empty.csv -------------------------------------------------------------------------------- /datafusion/substrait/tests/testdata/empty.parquet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/datafusion/substrait/tests/testdata/empty.parquet -------------------------------------------------------------------------------- /datafusion/substrait/tests/testdata/tpch_substrait_plans/query_15_plan.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /datafusion/wasmtest/datafusion-wasm-app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /datafusion/wasmtest/datafusion-wasm-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello wasm-pack! 6 | 7 | 8 |

See console

9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /datafusion/wasmtest/datafusion-wasm-app/index.js: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | import * as wasm from "datafusion-wasmtest"; 19 | 20 | wasm.basic_exprs(); 21 | wasm.basic_parse(); 22 | -------------------------------------------------------------------------------- /datafusion/wasmtest/webdriver.json: -------------------------------------------------------------------------------- 1 | { 2 | "moz:firefoxOptions": { 3 | "prefs": { 4 | "media.navigator.streams.fake": true, 5 | "media.navigator.permission.disabled": true 6 | }, 7 | "args": [] 8 | }, 9 | "goog:chromeOptions": { 10 | "args": [ 11 | "--use-fake-device-for-media-stream", 12 | "--use-fake-ui-for-media-stream" 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /dev/build-set-env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | export DATAFUSION_VERSION=$(awk -F'[ ="]+' '$1 == "version" { print $2 }' datafusion/core/Cargo.toml) 21 | -------------------------------------------------------------------------------- /dev/depcheck/.gitignore: -------------------------------------------------------------------------------- 1 | Cargo.lock 2 | -------------------------------------------------------------------------------- /dev/requirements.txt: -------------------------------------------------------------------------------- 1 | tomlkit 2 | PyGitHub -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | build 19 | temp 20 | venv/ 21 | .python-version 22 | -------------------------------------------------------------------------------- /docs/logos/old_logo/DataFUSION-Logo-Dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/old_logo/DataFUSION-Logo-Dark@2x.png -------------------------------------------------------------------------------- /docs/logos/old_logo/DataFUSION-Logo-Dark@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/old_logo/DataFUSION-Logo-Dark@4x.png -------------------------------------------------------------------------------- /docs/logos/old_logo/DataFUSION-Logo-Light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/old_logo/DataFUSION-Logo-Light@2x.png -------------------------------------------------------------------------------- /docs/logos/old_logo/DataFUSION-Logo-Light@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/old_logo/DataFUSION-Logo-Light@4x.png -------------------------------------------------------------------------------- /docs/logos/old_logo/DataFusion-LogoAndColorPaletteExploration_v01.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/old_logo/DataFusion-LogoAndColorPaletteExploration_v01.pdf -------------------------------------------------------------------------------- /docs/logos/primary_mark/black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/black.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/black2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/black2x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/black4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/black4x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/mixed.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/mixed2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/mixed2x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/mixed4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/mixed4x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/original.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/original2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/original2x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/original4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/original4x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/white.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/white2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/white2x.png -------------------------------------------------------------------------------- /docs/logos/primary_mark/white4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/primary_mark/white4x.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_black.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_black2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_black2x.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_black4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_black4x.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_original.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_original2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_original2x.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_original4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_original4x.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_white.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_white2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_white2x.png -------------------------------------------------------------------------------- /docs/logos/standalone_logo/logo_white4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/logos/standalone_logo/logo_white4x.png -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | sphinx 19 | pydata-sphinx-theme==0.8.0 20 | myst-parser 21 | maturin 22 | jinja2 23 | setuptools>=48.0.0 24 | -------------------------------------------------------------------------------- /docs/source/_static/images/2x_bgwhite_original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/_static/images/2x_bgwhite_original.png -------------------------------------------------------------------------------- /docs/source/_static/images/old_logo/DataFusion-Logo-Background-White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/_static/images/old_logo/DataFusion-Logo-Background-White.png -------------------------------------------------------------------------------- /docs/source/_static/images/old_logo/DataFusion-Logo-Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/_static/images/old_logo/DataFusion-Logo-Dark.png -------------------------------------------------------------------------------- /docs/source/_static/images/old_logo/DataFusion-Logo-Light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/_static/images/old_logo/DataFusion-Logo-Light.png -------------------------------------------------------------------------------- /docs/source/_static/images/original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/_static/images/original.png -------------------------------------------------------------------------------- /docs/source/_static/images/original2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/_static/images/original2x.png -------------------------------------------------------------------------------- /docs/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "pydata_sphinx_theme/layout.html" %} 2 | 3 | {# Silence the navbar #} 4 | {% block docs_navbar %} 5 | {% endblock %} 6 | 7 | 10 | {% block footer %} 11 | 12 | 25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /docs/source/library-user-guide/samply_profiler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/datafusion/7248259a69b5c59f39d25f944dc1b54686d0eaf4/docs/source/library-user-guide/samply_profiler.png -------------------------------------------------------------------------------- /docs/source/user-guide/cli/index.rst: -------------------------------------------------------------------------------- 1 | .. Licensed to the Apache Software Foundation (ASF) under one 2 | .. or more contributor license agreements. See the NOTICE file 3 | .. distributed with this work for additional information 4 | .. regarding copyright ownership. The ASF licenses this file 5 | .. to you under the Apache License, Version 2.0 (the 6 | .. "License"); you may not use this file except in compliance 7 | .. with the License. You may obtain a copy of the License at 8 | 9 | .. http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | .. Unless required by applicable law or agreed to in writing, 12 | .. software distributed under the License is distributed on an 13 | .. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | .. KIND, either express or implied. See the License for the 15 | .. specific language governing permissions and limitations 16 | .. under the License. 17 | 18 | DataFusion CLI 19 | ============== 20 | 21 | .. toctree:: 22 | :maxdepth: 3 23 | 24 | overview 25 | installation 26 | usage 27 | datasources 28 | -------------------------------------------------------------------------------- /header: -------------------------------------------------------------------------------- 1 | Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | -------------------------------------------------------------------------------- /python/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # DataFusion in Python 21 | 22 | This directory is now moved to its [dedicated repository](https://github.com/apache/datafusion-python). 23 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # This file specifies the default version of Rust used 19 | # to compile this workspace and run CI jobs. 20 | 21 | [toolchain] 22 | channel = "1.87.0" 23 | components = ["rustfmt", "clippy"] 24 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | edition = "2021" 19 | max_width = 90 20 | 21 | # ignore generated files 22 | # ignore = [ 23 | # "arrow/src/ipc/gen", 24 | #] 25 | --------------------------------------------------------------------------------