From 92679383e47f23b498fa239533bc0c59b8196a27 Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Fri, 12 Jun 2026 18:28:24 +0800 Subject: [PATCH] [test](regression) Enable segment limit pushdown fuzzy ### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: enable_segment_limit_pushdown was marked as fuzzy but omitted from fuzzy initialization because regression cases still pinned removed common expr pushdown variables. Those removed variables no longer control BE pushdown, so fuzzy mode could disable segment limit pushdown for cases that need it. Replace true common expr pushdown settings in regression cases with enable_segment_limit_pushdown=true and enable the fuzzy randomization. ### Release note None ### Check List (For Author) - Test: Manual test - git diff --check - git diff --cached --check - rg verification for removed common expr pushdown true settings outside data files - rg verification for duplicate enable_segment_limit_pushdown=true hints - Behavior changed: No - Does this need documentation: No --- .../org/apache/doris/qe/SessionVariable.java | 3 +- .../ann_index_p0/ann_const_expr_vector.groovy | 2 +- .../ann_index_p0/ann_index_basic.groovy | 2 +- .../ann_index_build_min_segment_rows.groovy | 2 +- .../ann_index_cache_additional.groovy | 2 +- ...ndex_only_scan_compound_debug_point.groovy | 2 +- .../ann_index_only_scan_debug_point.groovy | 2 +- ...nn_index_only_scan_expr_debug_point.groovy | 2 +- .../ann_index_result_cache.groovy | 2 +- .../ann_index_p0/ann_index_topn_cache.groovy | 2 +- ...nn_range_search_pushdown_regression.groovy | 2 +- ...arch_source_index_status_regression.groovy | 2 +- .../ann_search_params_clamp.groovy | 2 +- .../ann_index_p0/ann_with_fulltext.groovy | 6 +- .../ann_index_p0/build_ann_index_test.groovy | 2 +- .../ann_index_p0/cast_string_as_array.groovy | 12 +- .../ann_index_p0/create_ann_index_test.groovy | 2 +- .../create_tbl_with_ann_index_test.groovy | 2 +- .../suites/ann_index_p0/delete_where.groovy | 4 +- .../insert_with_invalid_array.groovy | 2 +- .../suites/ann_index_p0/ivf_index_test.groovy | 2 +- .../ivf_on_disk_index_test.groovy | 2 +- .../ivf_pq_full_buffer_train_recall.groovy | 2 +- .../suites/ann_index_p0/ivf_pq_recall.groovy | 2 +- .../suites/ann_index_p0/memtbl_on_sink.groovy | 2 +- .../quantizer_min_train_rows.groovy | 2 +- .../suites/ann_index_p0/small_segment.groovy | 2 +- .../test_backup_restore_inverted_idx.groovy | 6 +- .../cloud_p0/cache/test_topn_broadcast.groovy | 2 +- .../test_pushdown_common_expr.groovy | 8 +- .../query/test_nested_type_with_resize.groovy | 8 +- .../basic-elements/data-types/array-md.groovy | 18 +-- .../test_all_index_hit_fault_injection.groovy | 2 +- ...ompaction_exception_fault_injection.groovy | 12 +- ...index_compound_file_fault_injection.groovy | 2 +- ...index_empty_segment_fault_injection.groovy | 2 +- ...st_index_file_cache_fault_injection.groovy | 2 +- .../test_index_inlist_fault_injection.groovy | 8 +- .../test_index_io_context.groovy | 10 +- .../test_index_mow_fault_injection.groovy | 4 +- ...match_without_index_fault_injection.groovy | 8 +- ...test_need_read_data_fault_injection.groovy | 2 +- ...iant_count_on_index_fault_injection.groovy | 2 +- ...ted_index_exception_fault_injection.groovy | 24 ++-- .../analyzer/test_basic_analyzer.groovy | 2 +- ...builtin_analyzer_in_custom_analyzer.groovy | 44 +++--- .../analyzer/test_char_group_tokenizer.groovy | 2 +- .../analyzer/test_custom_analyzer.groovy | 74 +++++----- .../analyzer/test_custom_analyzer1.groovy | 4 +- .../analyzer/test_custom_analyzer2.groovy | 4 +- .../analyzer/test_custom_normalizer.groovy | 2 +- .../analyzer/test_icu_analyzer.groovy | 2 +- .../analyzer/test_ik_analyzer.groovy | 2 +- .../test_add_drop_index_with_data_arr.groovy | 3 +- ...add_drop_index_with_delete_data_arr.groovy | 5 +- .../test_add_index_for_arr.groovy | 2 +- .../test_array_contains_estimate.groovy | 2 +- .../test_char_replace_arr.groovy | 5 +- .../array_contains/test_compound_arr.groovy | 9 +- .../test_count_on_index_httplogs_arr.groovy | 11 +- .../test_equal_on_fulltext_arr.groovy | 5 +- .../test_index_bkd_null_arr.groovy | 5 +- .../test_index_change_2_arr.groovy | 3 +- .../test_index_change_4_arr.groovy | 7 +- .../test_index_change_6_arr.groovy | 7 +- .../test_index_compaction_dup_keys_arr.groovy | 7 +- .../test_index_compaction_null_arr.groovy | 11 +- ...st_index_compaction_unique_keys_arr.groovy | 3 +- ...ction_with_multi_index_segments_arr.groovy | 3 +- .../test_index_delete_arr.groovy | 5 +- .../test_index_empty_string_arr.groovy | 9 +- .../test_index_equal_select_arr.groovy | 9 +- .../test_index_match_phrase_edge_arr.groovy | 3 +- .../test_index_match_regexp_arr.groovy | 7 +- .../array_contains/test_index_null_arr.groovy | 5 +- .../array_contains/test_invalid_param.groovy | 3 +- .../test_inverted_index_null_arr.groovy | 3 +- .../array_contains/test_lowercase_arr.groovy | 3 +- .../test_parser_with_none_stopwords.groovy | 3 +- .../char_filter/test_char_replace.groovy | 4 +- ...st_build_index_multi_analyzer_order.groovy | 2 +- .../test_index_compaction_dup_keys.groovy | 2 +- .../test_index_compaction_null.groovy | 12 +- .../test_index_compaction_unique_keys.groovy | 2 +- ...ompaction_with_multi_index_segments.groovy | 2 +- ...umulative_compaction_with_format_v2.groovy | 4 +- .../test_drop_column_with_format_v2.groovy | 4 +- .../test_drop_index_with_format_v2.groovy | 8 +- .../test_mor_table_with_format_v2.groovy | 4 +- .../test_mow_table_with_format_v2.groovy | 2 +- .../test_rename_column_with_format_v2.groovy | 4 +- .../test_storage_format_v1.groovy | 8 +- .../test_storage_format_v2.groovy | 12 +- .../test_arrayInvertedIdx_profile.groovy | 5 +- ..._array_contains_with_inverted_index.groovy | 43 +++--- .../inverted_index_p0/test_array_index.groovy | 2 +- .../sql/insert_with_query.sql | 2 +- ..._array_with_inverted_index_all_type.groovy | 25 ++-- .../inverted_index_p0/test_bm25_score.groovy | 20 +-- .../test_bm25_score_range_filter.groovy | 2 +- .../test_bm25_score_variant.groovy | 2 +- .../test_chinese_analyzer.groovy | 4 +- .../test_complex_or_null_semantics.groovy | 2 +- .../inverted_index_p0/test_compound.groovy | 10 +- .../inverted_index_p0/test_compound_1.groovy | 12 +- .../test_compound_inlist.groovy | 20 +-- .../test_count_on_index.groovy | 10 +- .../test_count_on_index_2.groovy | 8 +- .../test_cross_field_or_with_null.groovy | 6 +- .../inverted_index_p0/test_delete.groovy | 2 +- .../test_empty_string_match.groovy | 2 +- .../test_equal_on_fulltext.groovy | 4 +- .../test_expr_in_null.groovy | 4 +- .../test_float_double.groovy | 6 +- .../test_ignore_above_in_index.groovy | 4 +- .../test_index_chinese_column.groovy | 2 +- .../test_index_complex_match.groovy | 8 +- .../test_index_delete.groovy | 4 +- .../test_index_empty_string.groovy | 12 +- .../test_index_equal_select.groovy | 4 +- .../test_index_key_match_select.groovy | 2 +- ...est_index_lowercase_fault_injection.groovy | 2 +- .../test_index_match_phrase.groovy | 4 +- .../test_index_match_phrase_edge.groovy | 8 +- .../test_index_match_phrase_ordered.groovy | 6 +- .../test_index_match_phrase_prefix.groovy | 6 +- .../test_index_match_phrase_prefix_1.groovy | 2 +- .../test_index_match_phrase_slop.groovy | 6 +- .../test_index_match_regexp.groovy | 8 +- .../test_index_match_select.groovy | 6 +- .../test_index_multi_match.groovy | 10 +- .../test_index_no_need_read_data.groovy | 2 +- .../inverted_index_p0/test_index_null.groovy | 2 +- .../test_index_range_between_select.groovy | 16 +-- ...index_range_bigger_and_equal_select.groovy | 2 +- .../test_index_range_bigger_select.groovy | 2 +- .../test_index_range_in_select.groovy | 4 +- .../test_index_range_not_in_select.groovy | 2 +- ...ndex_range_smaller_and_equal_select.groovy | 8 +- .../test_index_range_smaller_select.groovy | 2 +- .../test_index_rqg_bug.groovy | 36 ++--- .../test_index_rqg_bug2.groovy | 2 +- .../test_index_rqg_bug3.groovy | 2 +- .../test_index_rqg_bug4.groovy | 2 +- .../test_index_skip_read_data.groovy | 4 +- .../test_inverted_index.groovy | 4 +- ...est_inverted_index_collection_stats.groovy | 17 ++- .../test_inverted_index_io_timer.groovy | 29 ++-- .../test_inverted_index_keyword.groovy | 4 +- .../test_inverted_index_mor.groovy | 2 +- .../test_inverted_index_null.groovy | 2 +- .../test_inverted_index_null_ram_dir.groovy | 4 +- .../test_inverted_index_v2_file_size.groovy | 2 +- .../test_inverted_is_null.groovy | 2 +- ..._ip_cidr_search_with_inverted_index.groovy | 6 +- .../test_is_null_expr.groovy | 8 +- .../inverted_index_p0/test_lowercase.groovy | 2 +- .../test_match_or_null_semantics.groovy | 6 +- .../test_match_query_without_index.groovy | 2 +- .../test_need_read_data.groovy | 6 +- .../test_no_index_match.groovy | 6 +- .../inverted_index_p0/test_null_index.groovy | 4 +- .../inverted_index_p0/test_omit_norms.groovy | 12 +- .../test_or_not_match.groovy | 4 +- .../test_pinyin_phrase.groovy | 8 +- .../test_pk_no_need_read_data.groovy | 2 +- .../test_search_or_null_semantics.groovy | 26 ++-- .../test_single_column_multi_index.groovy | 19 ++- .../test_single_column_multi_index1.groovy | 11 +- .../inverted_index_p0/test_stopwords.groovy | 2 +- .../inverted_index_p0/topn_clear_block.groovy | 12 +- .../test_mow_with_null_sequence.groovy | 6 +- .../unique_with_mow/test_pk_uk_case.groovy | 28 ++-- .../test_primary_key_simple_case.groovy | 4 +- .../test_unique_mow_sequence.groovy | 2 +- .../test_dup_table_inverted_index.groovy | 6 +- .../sql/basic_q01.sql | 26 ++-- .../sql/basic_q02.sql | 26 ++-- .../sql/fulltext_q01.sql | 38 ++--- .../sql/fulltext_q02.sql | 38 ++--- .../sql/large_records_q01.sql | 20 +-- .../sql/large_records_q02.sql | 20 +-- .../sql/large_records_q03.sql | 18 +-- .../sql/large_records_q04.sql | 18 +-- .../sql/large_records_q05.sql | 12 +- .../sql/large_records_q06.sql | 12 +- .../sql/large_records_q07.sql | 12 +- .../sql/large_records_q08.sql | 12 +- .../mv/variant/variant_mv.groovy | 2 +- ...ter_nested_loop_join_local_exchange.groovy | 3 +- .../test_validate_restore_inverted_idx.groovy | 6 +- ...rialized_view_common_expr_push_down.groovy | 2 +- .../test_disable_root_variant_match.groovy | 6 +- .../search/test_search_boundary_cases.groovy | 40 +++--- .../suites/search/test_search_cache.groovy | 20 +-- .../test_search_default_field_operator.groovy | 40 +++--- .../search/test_search_dsl_operators.groovy | 30 ++-- .../search/test_search_dsl_syntax.groovy | 136 +++++++++--------- .../suites/search/test_search_escape.groovy | 30 ++-- .../search/test_search_exact_basic.groovy | 10 +- .../search/test_search_exact_lowercase.groovy | 22 +-- .../search/test_search_exact_match.groovy | 46 +++--- .../test_search_exact_multi_index.groovy | 18 +-- .../test_search_field_group_query.groovy | 4 +- .../suites/search/test_search_function.groovy | 100 ++++++------- .../search/test_search_inverted_index.groovy | 54 +++---- .../test_search_inverted_index_profile.groovy | 17 ++- ...st_search_inverted_is_null_pushdown.groovy | 2 +- .../search/test_search_lucene_mode.groovy | 38 ++--- .../search/test_search_mow_support.groovy | 4 +- .../test_search_multi_analyzer_lucene.groovy | 34 ++--- .../search/test_search_multi_field.groovy | 62 ++++---- .../search/test_search_not_null_bitmap.groovy | 30 ++-- .../search/test_search_null_regression.groovy | 44 +++--- .../search/test_search_null_semantics.groovy | 86 +++++------ .../test_search_regexp_lowercase.groovy | 28 ++-- .../search/test_search_slash_in_term.groovy | 16 +-- .../test_search_usage_restrictions.groovy | 36 ++--- ...st_search_variant_dual_index_reader.groovy | 14 +- ...t_search_variant_subcolumn_analyzer.groovy | 18 +-- .../test_search_variant_wildcard.groovy | 26 ++-- ...ch_variant_wildcard_custom_analyzer.groovy | 28 ++-- .../test_search_vs_match_consistency.groovy | 100 ++++++------- .../suites/variant_doc_mode_p2/load.groovy | 10 +- .../variant_github_events_new_p2/load.groovy | 28 ++-- .../load.groovy | 8 +- .../suites/variant_p0/doc_mode/load.groovy | 40 +++--- .../test_prdefine_insert_into_select.groovy | 12 +- .../predefine/test_predefine_pattern.groovy | 10 +- .../test_predefine_schema_change.groovy | 6 +- .../test_predefine_type_index.groovy | 18 +-- ..._array_contains_with_inverted_index.groovy | 43 +++--- ...t_variant_external_meta_integration.groovy | 86 +++++------ regression-test/suites/variant_p0/load.groovy | 40 +++--- .../predefined_typed_to_sparse.groovy | 22 +-- .../predefined_typed_to_sparse_1shard.groovy | 14 +- .../predefine/test_custom_analyzer.groovy | 10 +- .../predefine/test_multi_index_file.groovy | 4 +- .../test_multi_index_nonCurrent.groovy | 22 +-- .../test_prdefine_insert_into_select.groovy | 12 +- .../predefine/test_predefine_pattern.groovy | 12 +- .../test_predefine_schema_change.groovy | 4 +- .../test_predefine_type_index.groovy | 18 +-- .../test_predefine_type_multi_index.groovy | 8 +- .../test_schema_template_auto_cast.groovy | 2 +- .../test_types_with_indexes_profile.groovy | 14 +- .../test_variant_is_null_expr.groovy | 8 +- .../suites/variant_p0/query_subcolumns.groovy | 6 +- .../test_add_multi_var_mulit_indexes.groovy | 11 +- .../variant_p0/test_sub_path_pruning.groovy | 4 +- .../test_variant_is_null_expr.groovy | 10 +- .../test_variant_search_subcolumn.groovy | 20 +-- .../suites/variant_p0/with_index/load.groovy | 6 +- ..._array_contains_with_inverted_index.groovy | 43 +++--- .../test_array_inverted_index_profile.groovy | 9 +- .../variant_p0/with_index/var_index.groovy | 26 ++-- .../variant_p1/doc_snapshot/load.groovy | 12 +- .../suites/variant_p1/predefine/load.groovy | 12 +- 258 files changed, 1564 insertions(+), 1604 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index f537912c09df12..c9dec4dc57c90b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -3634,8 +3634,7 @@ public void initFuzzyModeVariables() { this.enableConditionCache = Config.pull_request_id % 2 == 0; this.parallelPipelineTaskNum = random.nextInt(8); this.parallelPrepareThreshold = random.nextInt(32) + 1; - // enable fuzzy after we clean all case of - // this.enableSegmentLimitPushdown = random.nextBoolean(); + this.enableSegmentLimitPushdown = random.nextBoolean(); this.enableLocalExchange = random.nextBoolean(); this.enableSharedExchangeSinkBuffer = random.nextBoolean(); this.useSerialExchange = random.nextBoolean(); diff --git a/regression-test/suites/ann_index_p0/ann_const_expr_vector.groovy b/regression-test/suites/ann_index_p0/ann_const_expr_vector.groovy index 380ac4cc40e052..258060af258c10 100644 --- a/regression-test/suites/ann_index_p0/ann_const_expr_vector.groovy +++ b/regression-test/suites/ann_index_p0/ann_const_expr_vector.groovy @@ -20,7 +20,7 @@ // Covers: array_repeat, array_with_constant, nested function calls, etc. suite("ann_const_expr_vector") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" def tableName = "ann_const_expr_tbl" diff --git a/regression-test/suites/ann_index_p0/ann_index_basic.groovy b/regression-test/suites/ann_index_p0/ann_index_basic.groovy index 41ae9e5c309864..d5b9fe316704ec 100644 --- a/regression-test/suites/ann_index_p0/ann_index_basic.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_basic.groovy @@ -19,7 +19,7 @@ // Includes range search, topn search, and compound search suite ("ann_index_basic") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // 1) Basic L2 ANN table: dim=3 sql "drop table if exists basic_tbl_ann_l2" diff --git a/regression-test/suites/ann_index_p0/ann_index_build_min_segment_rows.groovy b/regression-test/suites/ann_index_p0/ann_index_build_min_segment_rows.groovy index 01393444830471..4051e0089403b6 100644 --- a/regression-test/suites/ann_index_p0/ann_index_build_min_segment_rows.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_build_min_segment_rows.groovy @@ -17,7 +17,7 @@ suite("ann_index_build_min_segment_rows", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set experimental_enable_virtual_slot_for_cse=true;" sql "set enable_no_need_read_data_opt=true;" sql "set parallel_pipeline_task_num=1;" diff --git a/regression-test/suites/ann_index_p0/ann_index_cache_additional.groovy b/regression-test/suites/ann_index_p0/ann_index_cache_additional.groovy index 158a17bb4025cf..7e44ee53a1a5ea 100644 --- a/regression-test/suites/ann_index_p0/ann_index_cache_additional.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_cache_additional.groovy @@ -17,7 +17,7 @@ suite("ann_index_cache_additional", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set parallel_pipeline_task_num=1;" sql "set enable_sql_cache=false;" diff --git a/regression-test/suites/ann_index_p0/ann_index_only_scan_compound_debug_point.groovy b/regression-test/suites/ann_index_p0/ann_index_only_scan_compound_debug_point.groovy index 9af1ee0613ebc9..98029de13a7fd3 100644 --- a/regression-test/suites/ann_index_p0/ann_index_only_scan_compound_debug_point.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_only_scan_compound_debug_point.groovy @@ -17,7 +17,7 @@ suite("ann_index_only_scan_compound_debug_point", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set experimental_enable_virtual_slot_for_cse=true;" sql "set enable_no_need_read_data_opt=true;" sql "set parallel_pipeline_task_num=1;" diff --git a/regression-test/suites/ann_index_p0/ann_index_only_scan_debug_point.groovy b/regression-test/suites/ann_index_p0/ann_index_only_scan_debug_point.groovy index be98bdd1f42c5a..2e22c7ba29a069 100644 --- a/regression-test/suites/ann_index_p0/ann_index_only_scan_debug_point.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_only_scan_debug_point.groovy @@ -17,7 +17,7 @@ suite("ann_index_only_scan_debug_point", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set experimental_enable_virtual_slot_for_cse=true;" sql "set enable_no_need_read_data_opt=true;" sql "set parallel_pipeline_task_num=1;" diff --git a/regression-test/suites/ann_index_p0/ann_index_only_scan_expr_debug_point.groovy b/regression-test/suites/ann_index_p0/ann_index_only_scan_expr_debug_point.groovy index 7567f19d6def55..12bb6162d8c09a 100644 --- a/regression-test/suites/ann_index_p0/ann_index_only_scan_expr_debug_point.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_only_scan_expr_debug_point.groovy @@ -17,7 +17,7 @@ suite("ann_index_only_scan_expr_debug_point", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set experimental_enable_virtual_slot_for_cse=true;" sql "set enable_no_need_read_data_opt=true;" sql "set parallel_pipeline_task_num=1;" diff --git a/regression-test/suites/ann_index_p0/ann_index_result_cache.groovy b/regression-test/suites/ann_index_p0/ann_index_result_cache.groovy index aa5800453f9490..b88e718ceaf43a 100644 --- a/regression-test/suites/ann_index_p0/ann_index_result_cache.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_result_cache.groovy @@ -17,7 +17,7 @@ suite("ann_index_result_cache", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set parallel_pipeline_task_num=1;" sql "set enable_sql_cache=false;" diff --git a/regression-test/suites/ann_index_p0/ann_index_topn_cache.groovy b/regression-test/suites/ann_index_p0/ann_index_topn_cache.groovy index 97c502847daa90..a5b6eb2ef2dfe3 100644 --- a/regression-test/suites/ann_index_p0/ann_index_topn_cache.groovy +++ b/regression-test/suites/ann_index_p0/ann_index_topn_cache.groovy @@ -17,7 +17,7 @@ suite("ann_index_topn_cache", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set parallel_pipeline_task_num=1;" sql "set enable_sql_cache=false;" diff --git a/regression-test/suites/ann_index_p0/ann_range_search_pushdown_regression.groovy b/regression-test/suites/ann_index_p0/ann_range_search_pushdown_regression.groovy index c3122b9d1e6336..f27ff5402602cc 100644 --- a/regression-test/suites/ann_index_p0/ann_range_search_pushdown_regression.groovy +++ b/regression-test/suites/ann_index_p0/ann_range_search_pushdown_regression.groovy @@ -74,7 +74,7 @@ suite("ann_range_search_pushdown_regression", "nonConcurrent") { } sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set experimental_enable_virtual_slot_for_cse=true;" sql "set enable_no_need_read_data_opt=true;" sql "set enable_profile=true;" diff --git a/regression-test/suites/ann_index_p0/ann_range_search_source_index_status_regression.groovy b/regression-test/suites/ann_index_p0/ann_range_search_source_index_status_regression.groovy index f4a881e75ce959..7642337e61a02d 100644 --- a/regression-test/suites/ann_index_p0/ann_range_search_source_index_status_regression.groovy +++ b/regression-test/suites/ann_index_p0/ann_range_search_source_index_status_regression.groovy @@ -17,7 +17,7 @@ suite("ann_range_search_source_index_status_regression", "nonConcurrent") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set experimental_enable_virtual_slot_for_cse=true;" sql "set enable_no_need_read_data_opt=true;" sql "set parallel_pipeline_task_num=1;" diff --git a/regression-test/suites/ann_index_p0/ann_search_params_clamp.groovy b/regression-test/suites/ann_index_p0/ann_search_params_clamp.groovy index b58f845872da83..62aee534ec1517 100644 --- a/regression-test/suites/ann_index_p0/ann_search_params_clamp.groovy +++ b/regression-test/suites/ann_index_p0/ann_search_params_clamp.groovy @@ -22,7 +22,7 @@ // 3. BE boosts efSearch to max(ef_search, k) so LIMIT k always returns k results suite("ann_search_params_clamp", "nonConcurrent") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set enable_ann_index_result_cache=false;" // ----------------------------------------------------------------------- diff --git a/regression-test/suites/ann_index_p0/ann_with_fulltext.groovy b/regression-test/suites/ann_index_p0/ann_with_fulltext.groovy index 0ac14b0e2b023d..c7d0b11a7de66c 100644 --- a/regression-test/suites/ann_index_p0/ann_with_fulltext.groovy +++ b/regression-test/suites/ann_index_p0/ann_with_fulltext.groovy @@ -18,8 +18,8 @@ suite("ann_with_fulltext") { sql "drop table if exists ann_with_fulltext" sql "set profile_level=2;" - sql "set enable_common_expr_pushdown=true;" - + sql "set enable_segment_limit_pushdown=true;" + sql """ create table ann_with_fulltext ( id int not null, @@ -28,7 +28,7 @@ suite("ann_with_fulltext") { value int null, INDEX idx_comment(`comment`) USING INVERTED PROPERTIES("parser" = "english") COMMENT 'inverted index for comment', INDEX ann_embedding(`embedding`) USING ANN PROPERTIES("index_type"="hnsw","metric_type"="l2_distance","dim"="8") - ) duplicate key (`id`) + ) duplicate key (`id`) distributed by hash(`id`) buckets 1 properties("replication_num"="1"); """ diff --git a/regression-test/suites/ann_index_p0/build_ann_index_test.groovy b/regression-test/suites/ann_index_p0/build_ann_index_test.groovy index 92c5e6a792f0bd..2eff84cf9c2db9 100644 --- a/regression-test/suites/ann_index_p0/build_ann_index_test.groovy +++ b/regression-test/suites/ann_index_p0/build_ann_index_test.groovy @@ -65,7 +65,7 @@ suite("build_ann_index_test") { return "wait_timeout" } - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // case 1: create table -- insert data -- create index -- build index def tableName = "table_build_ann_index_test" diff --git a/regression-test/suites/ann_index_p0/cast_string_as_array.groovy b/regression-test/suites/ann_index_p0/cast_string_as_array.groovy index 01a1c4e5f0726a..c13333e3bb48bd 100644 --- a/regression-test/suites/ann_index_p0/cast_string_as_array.groovy +++ b/regression-test/suites/ann_index_p0/cast_string_as_array.groovy @@ -17,7 +17,7 @@ suite("cast_string_as_array") { sql "unset variable all;" - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // L2 table: dim=3 sql "drop table if exists ann_cast_rhs_l2" @@ -52,7 +52,7 @@ suite("cast_string_as_array") { exception "Ann query vector cannot be NULL" } - + // Success: nested cast(string->string->array) should also work qt_sql_1 "select id from ann_cast_rhs_l2 order by l2_distance_approximate(embedding, cast(cast('[1.0,2.0,3.0]' as string) as array)) limit 3;" @@ -69,8 +69,8 @@ suite("cast_string_as_array") { sql "select id from ann_cast_rhs_l2 order by l2_distance_approximate(embedding, cast(NULL as array)) limit 1;" exception "Ann query vector cannot be NULL" } - - + + // Failure: dim mismatch (2 vs table dim=3) test { sql "select id from ann_cast_rhs_l2 order by l2_distance_approximate(embedding, cast('[1.0,2.0]' as array)) limit 1;" @@ -142,10 +142,10 @@ suite("cast_string_as_array") { // ---------------------- // Non-constant RHS behavior // ---------------------- - + // Fall back to full scan if RHS is not constant qt_sql_fall_back "select l2_distance_approximate(embedding, embedding) from ann_cast_rhs_l2 order by l2_distance_approximate(embedding, embedding) limit 10;" - + // Range search with non-constant RHS should execute without index pushdown // L2: distance(embedding, embedding) == 0, so <= 0 selects all rows qt_sql_rs_l2_nonconst_le "select id from ann_cast_rhs_l2 where l2_distance_approximate(embedding, embedding) <= 0.0 order by id;" diff --git a/regression-test/suites/ann_index_p0/create_ann_index_test.groovy b/regression-test/suites/ann_index_p0/create_ann_index_test.groovy index 3e32584a3786c6..2f60a7c0836ebc 100644 --- a/regression-test/suites/ann_index_p0/create_ann_index_test.groovy +++ b/regression-test/suites/ann_index_p0/create_ann_index_test.groovy @@ -16,7 +16,7 @@ // under the License. suite("create_ann_index_test") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "drop table if exists tbl_not_null" sql """ CREATE TABLE `tbl_not_null` ( diff --git a/regression-test/suites/ann_index_p0/create_tbl_with_ann_index_test.groovy b/regression-test/suites/ann_index_p0/create_tbl_with_ann_index_test.groovy index 03c897d2760025..4708ca92bf565e 100644 --- a/regression-test/suites/ann_index_p0/create_tbl_with_ann_index_test.groovy +++ b/regression-test/suites/ann_index_p0/create_tbl_with_ann_index_test.groovy @@ -16,7 +16,7 @@ // under the License. suite("create_tbl_with_ann_index_test") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "drop table if exists ann_tbl1" test { sql """ diff --git a/regression-test/suites/ann_index_p0/delete_where.groovy b/regression-test/suites/ann_index_p0/delete_where.groovy index 677f713e6f9105..35f5dbe708a05c 100644 --- a/regression-test/suites/ann_index_p0/delete_where.groovy +++ b/regression-test/suites/ann_index_p0/delete_where.groovy @@ -16,7 +16,7 @@ // under the License. suite("delete_where_with_ann") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "drop table if exists delete_where_with_ann" test { sql """ @@ -43,7 +43,7 @@ suite("delete_where_with_ann") { qt_sql_1 "select * from delete_where_with_ann order by id" sql "delete from delete_where_with_ann where id = 1" - + qt_sql_2 "select * from delete_where_with_ann order by id" qt_sql_3 "select id, l2_distance_approximate(vec, [1.0, 2.0, 3.0]) as dist from delete_where_with_ann order by dist limit 2;" diff --git a/regression-test/suites/ann_index_p0/insert_with_invalid_array.groovy b/regression-test/suites/ann_index_p0/insert_with_invalid_array.groovy index 193392d92236ba..f04a53df4dea29 100644 --- a/regression-test/suites/ann_index_p0/insert_with_invalid_array.groovy +++ b/regression-test/suites/ann_index_p0/insert_with_invalid_array.groovy @@ -16,7 +16,7 @@ // under the License. suite("insert_with_invalid_array") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "drop table if exists insert_with_invalid_array" test { sql """ diff --git a/regression-test/suites/ann_index_p0/ivf_index_test.groovy b/regression-test/suites/ann_index_p0/ivf_index_test.groovy index 58eda2f2fce829..b47661f2c3e462 100644 --- a/regression-test/suites/ann_index_p0/ivf_index_test.groovy +++ b/regression-test/suites/ann_index_p0/ivf_index_test.groovy @@ -16,7 +16,7 @@ // under the License. suite ("ivf_index_test") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // IVF index sql "drop table if exists ivf_tbl_ann_l2" diff --git a/regression-test/suites/ann_index_p0/ivf_on_disk_index_test.groovy b/regression-test/suites/ann_index_p0/ivf_on_disk_index_test.groovy index 63fab34d072d3a..c58a1615130f40 100644 --- a/regression-test/suites/ann_index_p0/ivf_on_disk_index_test.groovy +++ b/regression-test/suites/ann_index_p0/ivf_on_disk_index_test.groovy @@ -16,7 +16,7 @@ // under the License. suite ("ivf_on_disk_index_test") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // ========== IVF_ON_DISK with L2 distance ========== sql "drop table if exists tbl_ivf_on_disk_l2" diff --git a/regression-test/suites/ann_index_p0/ivf_pq_full_buffer_train_recall.groovy b/regression-test/suites/ann_index_p0/ivf_pq_full_buffer_train_recall.groovy index 20cccfb28b6e25..b1f26d8ef641a7 100644 --- a/regression-test/suites/ann_index_p0/ivf_pq_full_buffer_train_recall.groovy +++ b/regression-test/suites/ann_index_p0/ivf_pq_full_buffer_train_recall.groovy @@ -16,7 +16,7 @@ // under the License. suite("ivf_pq_full_buffer_train_recall", "nonConcurrent") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set enable_ann_index_result_cache=false;" sql "set ivf_nprobe=8;" diff --git a/regression-test/suites/ann_index_p0/ivf_pq_recall.groovy b/regression-test/suites/ann_index_p0/ivf_pq_recall.groovy index c1c6a7b7651d03..b90451c2e630c4 100644 --- a/regression-test/suites/ann_index_p0/ivf_pq_recall.groovy +++ b/regression-test/suites/ann_index_p0/ivf_pq_recall.groovy @@ -16,7 +16,7 @@ // under the License. suite("ivf_pq_recall", "nonConcurrent") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "set enable_ann_index_result_cache=false;" sql "set ivf_nprobe=8;" diff --git a/regression-test/suites/ann_index_p0/memtbl_on_sink.groovy b/regression-test/suites/ann_index_p0/memtbl_on_sink.groovy index efa88a3a5dc279..39bbe6f4cb02da 100644 --- a/regression-test/suites/ann_index_p0/memtbl_on_sink.groovy +++ b/regression-test/suites/ann_index_p0/memtbl_on_sink.groovy @@ -16,7 +16,7 @@ // under the License. suite("memtbl_on_sink") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" sql "drop table if exists memtbl_on_sink" test { sql """ diff --git a/regression-test/suites/ann_index_p0/quantizer_min_train_rows.groovy b/regression-test/suites/ann_index_p0/quantizer_min_train_rows.groovy index 15999e5445c508..6b7301c79bd79d 100644 --- a/regression-test/suites/ann_index_p0/quantizer_min_train_rows.groovy +++ b/regression-test/suites/ann_index_p0/quantizer_min_train_rows.groovy @@ -16,7 +16,7 @@ // under the License. suite("quantizer_min_train_rows") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // Test PQ quantizer minimum training rows requirement // PQ min_train_rows formula is (1 << pq_nbits) * 100. diff --git a/regression-test/suites/ann_index_p0/small_segment.groovy b/regression-test/suites/ann_index_p0/small_segment.groovy index cb40ba951f259d..2650890386e35e 100644 --- a/regression-test/suites/ann_index_p0/small_segment.groovy +++ b/regression-test/suites/ann_index_p0/small_segment.groovy @@ -16,7 +16,7 @@ // under the License. suite("small_segment") { - sql "set enable_common_expr_pushdown=true;" + sql "set enable_segment_limit_pushdown=true;" // Test that ANN index is not built when segment size is smaller than required training rows sql "drop table if exists tbl_small_segment" diff --git a/regression-test/suites/backup_restore/test_backup_restore_inverted_idx.groovy b/regression-test/suites/backup_restore/test_backup_restore_inverted_idx.groovy index 3ff19ef60a1fe8..8cbf4d74cfd4c9 100644 --- a/regression-test/suites/backup_restore/test_backup_restore_inverted_idx.groovy +++ b/regression-test/suites/backup_restore/test_backup_restore_inverted_idx.groovy @@ -117,13 +117,13 @@ suite("test_backup_restore_inverted_idx", "backup_restore") { // 1. query with inverted index sql """ set enable_match_without_inverted_index = false """ - def res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_common_expr_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "10" """ + def res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_segment_limit_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "10" """ assertTrue(res.size() > 0) // 2. add partition and query sql """ ALTER TABLE ${dbName}.${tableName} ADD PARTITION p8 VALUES LESS THAN ("80") """ sql """ INSERT INTO ${dbName}.${tableName} VALUES (75, "75 750", "76 77") """ - res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_common_expr_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "75" """ + res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_segment_limit_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "75" """ assertTrue(res.size() > 0) // 3. add new index @@ -159,7 +159,7 @@ suite("test_backup_restore_inverted_idx", "backup_restore") { logger.info("the build index status: ${build_status}") assertTrue(false) } - res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_common_expr_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value1 MATCH_ANY "12321" """ + res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_segment_limit_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value1 MATCH_ANY "12321" """ assertTrue(res.size() > 0) } finally { diff --git a/regression-test/suites/cloud_p0/cache/test_topn_broadcast.groovy b/regression-test/suites/cloud_p0/cache/test_topn_broadcast.groovy index 340191423e3941..02816e69f60382 100644 --- a/regression-test/suites/cloud_p0/cache/test_topn_broadcast.groovy +++ b/regression-test/suites/cloud_p0/cache/test_topn_broadcast.groovy @@ -44,7 +44,7 @@ suite("test_topn_broadcast", "docker") { def indexTbName = "test_topn_broadcast" sql "set global enable_two_phase_read_opt = true" - sql " set global enable_common_expr_pushdown = true " + sql " set global enable_segment_limit_pushdown = true " sql " set global topn_opt_limit_threshold = 1024 " sql "DROP TABLE IF EXISTS ${indexTbName}" sql """ diff --git a/regression-test/suites/correctness/test_pushdown_common_expr.groovy b/regression-test/suites/correctness/test_pushdown_common_expr.groovy index aa0e68e3e4c5f5..9203f9e0c95a61 100644 --- a/regression-test/suites/correctness/test_pushdown_common_expr.groovy +++ b/regression-test/suites/correctness/test_pushdown_common_expr.groovy @@ -47,7 +47,7 @@ suite("test_pushdown_common_expr") { """ sql """set batch_size=8""" - sql """set enable_common_expr_pushdown=true""" + sql """set enable_segment_limit_pushdown=true""" order_qt_1 """ SELECT * FROM t_pushdown_common_expr WHERE c3 LIKE "%c%" OR c1 < 10; @@ -103,7 +103,7 @@ suite("test_pushdown_common_expr") { ) AS t2 ON t1.c1 = t2.c1 """ - sql """set enable_common_expr_pushdown=false""" + sql """set enable_segment_limit_pushdown = false""" order_qt_1 """ SELECT * FROM t_pushdown_common_expr WHERE c3 LIKE "%h%" OR c1 < 10; @@ -128,7 +128,7 @@ suite("test_pushdown_common_expr") { order_qt_6 """ SELECT * FROM t_pushdown_common_expr WHERE random() > 1 """ - + order_qt_7 """ SELECT * FROM t_pushdown_common_expr WHERE random() > 1 AND c1 > 0 """ @@ -182,7 +182,7 @@ suite("test_pushdown_common_expr") { (7,'g','gg','ggg','gggg','ggggg','gggggg'); """ - sql """set enable_common_expr_pushdown=true""" + sql """set enable_segment_limit_pushdown=true""" // delete condition columns num > block columns num order_qt_1 """ diff --git a/regression-test/suites/datatype_p0/nested_types/query/test_nested_type_with_resize.groovy b/regression-test/suites/datatype_p0/nested_types/query/test_nested_type_with_resize.groovy index 15cc424c3a657e..66d0e36d85706d 100644 --- a/regression-test/suites/datatype_p0/nested_types/query/test_nested_type_with_resize.groovy +++ b/regression-test/suites/datatype_p0/nested_types/query/test_nested_type_with_resize.groovy @@ -64,9 +64,9 @@ suite("test_nested_type_with_resize") { } } - order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col4 from test_array_resize order by col1,col2,col3 limit 10; """ - order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col22 from test_array_resize order by col1,col2,col3 limit 10; """ - order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col32 from test_array_resize order by col1,col2,col3 limit 10; """ - order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col74 from test_array_resize order by col1,col2,col3 limit 10; """ + order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_segment_limit_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col4 from test_array_resize order by col1,col2,col3 limit 10; """ + order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_segment_limit_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col22 from test_array_resize order by col1,col2,col3 limit 10; """ + order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_segment_limit_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col32 from test_array_resize order by col1,col2,col3 limit 10; """ + order_qt_sql """ /*set ShuffleSendBytes=0|ShuffleSendRows=0|FuzzyVariables=batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=5,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=16384,parallel_prepare_threshold=13,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=12,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_segment_limit_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5*/ select col74 from test_array_resize order by col1,col2,col3 limit 10; """ } diff --git a/regression-test/suites/doc/sql-manual/basic-elements/data-types/array-md.groovy b/regression-test/suites/doc/sql-manual/basic-elements/data-types/array-md.groovy index ee0fdcf38e60ec..31e0a3308c008f 100644 --- a/regression-test/suites/doc/sql-manual/basic-elements/data-types/array-md.groovy +++ b/regression-test/suites/doc/sql-manual/basic-elements/data-types/array-md.groovy @@ -16,7 +16,7 @@ // under the License. suite("array-md", "p0, nonConcurrent") { - + def tableName = "array_table" sql """ drop table if exists ${tableName}; @@ -80,7 +80,7 @@ suite("array-md", "p0, nonConcurrent") { """ exception "Type exceeds the maximum nesting depth of 9" } - + // test { // sql """ SELECT CAST(ARRAY(1, 2, 3) AS STRING) """ // exception "can not cast from origin type ARRAY to target type=TEXT" @@ -200,14 +200,14 @@ suite("array-md", "p0, nonConcurrent") { """ exception "Aggregate type BITMAP_UNION is not compatible with primitive type ARRAY" } - + test { sql """ DROP TABLE IF EXISTS ${tableName}; """ sql """ CREATE TABLE IF NOT EXISTS ${tableName} ( id INT, array_int ARRAY QUANTILE_UNION - ) ENGINE=OLAP + ) ENGINE=OLAP AGGREGATE KEY(id) DISTRIBUTED BY HASH(id) BUCKETS 1 PROPERTIES ( @@ -524,7 +524,7 @@ suite("array-md", "p0, nonConcurrent") { sql """ INSERT INTO ${tableName} (id, array_ipv6) VALUES (1, ['2001:0db8:85a3:0000:0000:8a2e:0370:7334', '2001:0db8:85a3:0000:0000:8a2e:0370:7334']), (2, ['2001:0db8:85a3:0000:0000:8a2e:0370:7334', '2001:0db8:85a3:0000:0000:8a2e:0370:7334']) """ qt_sql """ select array_ipv6, count(*) from ${tableName} group by array_ipv6 order by array_ipv6 """ - + sql """ DROP TABLE IF EXISTS ${tableName}; """ sql """ CREATE TABLE IF NOT EXISTS ${tableName} ( @@ -571,7 +571,7 @@ suite("array-md", "p0, nonConcurrent") { } sql """ ALTER TABLE ${tableName} MODIFY COLUMN array_varchar ARRAY """ - + qt_sql """ select array_varchar[0], array_varchar[1], array_varchar[2], array_varchar[3] from ${tableName} """ qt_sql """ select element_at(array_varchar, 0), element_at(array_varchar, 1), element_at(array_varchar, 2), element_at(array_varchar, 3) from ${tableName} """ @@ -598,8 +598,8 @@ suite("array-md", "p0, nonConcurrent") { GetDebugPoint().enableDebugPointForAllBEs(checkpoints_name, [filtered_rows: expectedFilteredRows]) sql "set experimental_enable_parallel_scan = false" sql " set inverted_index_skip_threshold = 0 " - sql " set enable_common_expr_pushdown_for_inverted_index = true" - sql " set enable_common_expr_pushdown = true" + sql " set enable_segment_limit_pushdown = true" + sql " set enable_segment_limit_pushdown = true" sql " set enable_parallel_scan = false" sql "sync" sql "${sqlQuery}" @@ -685,5 +685,5 @@ suite("array-md", "p0, nonConcurrent") { sql """ INSERT INTO ${tableName} VALUES (2, ARRAY(STRUCT(1, 'John'), STRUCT(2, 'Jane'))) """ qt_sql """ SELECT array_struct[1], array_struct[2] FROM ${tableName} ORDER BY id """ - + } \ No newline at end of file diff --git a/regression-test/suites/fault_injection_p0/test_all_index_hit_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_all_index_hit_fault_injection.groovy index eba1c5e93d2861..9a4dd475c179e0 100644 --- a/regression-test/suites/fault_injection_p0/test_all_index_hit_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_all_index_hit_fault_injection.groovy @@ -96,7 +96,7 @@ suite("test_all_index_hit_fault_injection", "nonConcurrent") { load_httplogs_data.call(indexTbName2, 'test_all_index_hit_fault_injection_2', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ try { GetDebugPoint().enableDebugPointForAllBEs("segment_iterator._read_columns_by_index", [column_name: "clientip,request"]) GetDebugPoint().enableDebugPointForAllBEs("VectorizedFnCall.must_in_slow_path", [column_name: "status,size"]) diff --git a/regression-test/suites/fault_injection_p0/test_index_compaction_exception_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_index_compaction_exception_fault_injection.groovy index 8a9c6d71609a2e..b99499b435569c 100644 --- a/regression-test/suites/fault_injection_p0/test_index_compaction_exception_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_compaction_exception_fault_injection.groovy @@ -118,7 +118,7 @@ suite("test_index_compaction_exception_fault_injection", "nonConcurrent") { } def run_sql = { -> - def result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE name MATCH 'bason'" + def result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE name MATCH 'bason'" assertEquals(3, result.size()) assertEquals(1, result[0]['id']) assertEquals("bason", result[0]['name']) @@ -127,7 +127,7 @@ suite("test_index_compaction_exception_fault_injection", "nonConcurrent") { assertEquals(3, result[2]['id']) assertEquals("bason", result[2]['name']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE age = 11" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE age = 11" assertEquals(3, result.size()) assertEquals(1, result[0]['id']) assertEquals("bason", result[0]['name']) @@ -136,7 +136,7 @@ suite("test_index_compaction_exception_fault_injection", "nonConcurrent") { assertEquals(3, result[2]['id']) assertEquals("bason", result[2]['name']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE description MATCH 'singing'" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE description MATCH 'singing'" assertEquals(3, result.size()) assertEquals("bason", result[0]['name']) assertEquals("bason is good at singing", result[0]['description']) @@ -145,7 +145,7 @@ suite("test_index_compaction_exception_fault_injection", "nonConcurrent") { assertEquals("bason", result[2]['name']) assertEquals("bason is good at singing", result[2]['description']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(scores, 79)" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(scores, 79)" assertEquals(3, result.size()) assertEquals("bason", result[0]['name']) assertEquals("[79, 85, 97]", result[0]['scores']) @@ -154,7 +154,7 @@ suite("test_index_compaction_exception_fault_injection", "nonConcurrent") { assertEquals("bason", result[2]['name']) assertEquals("[79, 85, 97]", result[2]['scores']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(hobbies, 'dancing')" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(hobbies, 'dancing')" assertEquals(3, result.size()) assertEquals("bason", result[0]['name']) assertEquals('["singing", "dancing"]', result[0]['hobbies']) @@ -163,7 +163,7 @@ suite("test_index_compaction_exception_fault_injection", "nonConcurrent") { assertEquals("bason", result[2]['name']) assertEquals('["singing", "dancing"]', result[2]['hobbies']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(evaluation, 'bason is very clever')" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(evaluation, 'bason is very clever')" assertEquals(3, result.size()) assertEquals("bason", result[0]['name']) assertEquals('["bason is very clever", "bason is very healthy"]', result[0]['evaluation']) diff --git a/regression-test/suites/fault_injection_p0/test_index_compound_file_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_index_compound_file_fault_injection.groovy index e5e03d9e31782d..c1874e2f30aed6 100644 --- a/regression-test/suites/fault_injection_p0/test_index_compound_file_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_compound_file_fault_injection.groovy @@ -74,7 +74,7 @@ suite("test_index_compound_file_fault_injection", "nonConcurrent") { load_httplogs_data.call(indexTbName, 'test_index_compound_file_fault_injection', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ try { GetDebugPoint().enableDebugPointForAllBEs("CSIndexInput.readInternal") diff --git a/regression-test/suites/fault_injection_p0/test_index_empty_segment_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_index_empty_segment_fault_injection.groovy index ad50e17f7f7716..7246cde2a343e8 100644 --- a/regression-test/suites/fault_injection_p0/test_index_empty_segment_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_empty_segment_fault_injection.groovy @@ -47,7 +47,7 @@ suite("test_index_empty_segment_fault_injection", "nonConcurrent") { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_match_without_inverted_index = false; """ try { diff --git a/regression-test/suites/fault_injection_p0/test_index_file_cache_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_index_file_cache_fault_injection.groovy index 8a04c15b839f46..fa7341a4342482 100644 --- a/regression-test/suites/fault_injection_p0/test_index_file_cache_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_file_cache_fault_injection.groovy @@ -72,7 +72,7 @@ suite("test_index_file_cache_fault_injection", "nonConcurrent") { load_httplogs_data.call(indexTbName, 'test_index_file_cache_fault_injection', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ try { GetDebugPoint().enableDebugPointForAllBEs("CSIndexInput.readInternal") diff --git a/regression-test/suites/fault_injection_p0/test_index_inlist_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_index_inlist_fault_injection.groovy index 54852394601b77..f08dffb36b26e1 100644 --- a/regression-test/suites/fault_injection_p0/test_index_inlist_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_inlist_fault_injection.groovy @@ -76,7 +76,7 @@ suite("test_index_inlist_fault_injection", "nonConcurrent") { sql "sync" try { - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName} where clientip in ('40.135.0.0', '232.0.0.0', '26.1.0.0'); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName} where status in (1, 304, 200); """ @@ -89,7 +89,7 @@ suite("test_index_inlist_fault_injection", "nonConcurrent") { } try { - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select count() from ${indexTbName} where (clientip in ('40.135.0.0', '232.0.0.0', NULL, '26.1.0.0', '247.37.0.0')); """ qt_sql """ select count() from ${indexTbName} where (clientip not in ('40.135.0.0', '232.0.0.0', NULL, '26.1.0.0', '247.37.0.0')); """ @@ -101,7 +101,7 @@ suite("test_index_inlist_fault_injection", "nonConcurrent") { qt_sql """ select count() from ${indexTbName} where (clientip = '2.1.0.0' and clientip = NULL or clientip = '40.135.0.0'); """ qt_sql """ select count() from ${indexTbName} where (clientip = '2.1.0.0' or clientip = NULL and clientip = '40.135.0.0'); """ - sql """ set enable_common_expr_pushdown = false; """ + sql """ set enable_segment_limit_pushdown = false; """ qt_sql """ select count() from ${indexTbName} where (clientip in ('40.135.0.0', '232.0.0.0', NULL, '26.1.0.0', '247.37.0.0')); """ qt_sql """ select count() from ${indexTbName} where (clientip not in ('40.135.0.0', '232.0.0.0', NULL, '26.1.0.0', '247.37.0.0')); """ @@ -113,7 +113,7 @@ suite("test_index_inlist_fault_injection", "nonConcurrent") { qt_sql """ select count() from ${indexTbName} where (clientip = '2.1.0.0' and clientip = NULL or clientip = '40.135.0.0'); """ qt_sql """ select count() from ${indexTbName} where (clientip = '2.1.0.0' or clientip = NULL and clientip = '40.135.0.0'); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ set in_list_value_count_threshold = 0; """ qt_sql """ select count() from ${indexTbName} where (clientip in ('40.135.0.0', '232.0.0.0', '26.1.0.0', '247.37.0.0') or status = 200); """ diff --git a/regression-test/suites/fault_injection_p0/test_index_io_context.groovy b/regression-test/suites/fault_injection_p0/test_index_io_context.groovy index 0601473cef0b73..4c5c00dd7e44d4 100644 --- a/regression-test/suites/fault_injection_p0/test_index_io_context.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_io_context.groovy @@ -76,7 +76,7 @@ suite("test_index_io_context", "nonConcurrent") { load_httplogs_data.call(tableName2, 'test_index_io_context2', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ try { GetDebugPoint().enableDebugPointForAllBEs("InvertedIndexReader.handle_searcher_cache.io_ctx") @@ -86,28 +86,28 @@ suite("test_index_io_context", "nonConcurrent") { qt_sql """ select count() from ${tableName2} where request match_any 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_any 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_any 'ticket_quest_bg2.jpg'; """ - + qt_sql """ select count() from ${tableName1} where request match_all 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName1} where request match_all 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName1} where request match_all 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_all 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_all 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_all 'ticket_quest_bg2.jpg'; """ - + qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_phrase 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_phrase 'ticket_quest_bg2.jpg'; """ qt_sql """ select count() from ${tableName2} where request match_phrase 'ticket_quest_bg2.jpg'; """ - + qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg ~10+'; """ qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg ~10+'; """ qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg ~10+'; """ qt_sql """ select count() from ${tableName2} where request match_phrase 'ticket_quest_bg2.jpg ~10+'; """ qt_sql """ select count() from ${tableName2} where request match_phrase 'ticket_quest_bg2.jpg ~10+'; """ qt_sql """ select count() from ${tableName2} where request match_phrase 'ticket_quest_bg2.jpg ~10+'; """ - + qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg ~10'; """ qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg ~10'; """ qt_sql """ select count() from ${tableName1} where request match_phrase 'ticket_quest_bg2.jpg ~10'; """ diff --git a/regression-test/suites/fault_injection_p0/test_index_mow_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_index_mow_fault_injection.groovy index a0559119d2a846..c30cfcd17c0fb5 100644 --- a/regression-test/suites/fault_injection_p0/test_index_mow_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_index_mow_fault_injection.groovy @@ -47,7 +47,7 @@ suite("test_index_mow_fault_injection", "nonConcurrent") { try { sql "DROP TABLE IF EXISTS ${testTable_unique}" create_httplogs_unique_table.call(testTable_unique) - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ INSERT INTO ${testTable_unique} VALUES (893964617, '40.135.0.0', 'GET /images/hm_bg.jpg HTTP/1.0', 200, 24736); """ sql """ INSERT INTO ${testTable_unique} VALUES (893964653, '232.0.0.0', 'GET /images/hm_bg.jpg HTTP/1.0', 200, 3781); """ @@ -67,7 +67,7 @@ suite("test_index_mow_fault_injection", "nonConcurrent") { qt_sql """ select count() from ${testTable_unique} where (clientip match_phrase_prefix 'http' or request match_phrase_prefix 'http' or status match_phrase_prefix 'http' or size match_phrase_prefix 'http'); """ } finally { GetDebugPoint().disableDebugPointForAllBEs("match.invert_index_not_support_execute_match") - } + } } finally { } } \ No newline at end of file diff --git a/regression-test/suites/fault_injection_p0/test_match_without_index_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_match_without_index_fault_injection.groovy index db03b75bee6976..85b20e74c93a2c 100644 --- a/regression-test/suites/fault_injection_p0/test_match_without_index_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_match_without_index_fault_injection.groovy @@ -39,7 +39,7 @@ suite("test_match_without_index_fault_injection", "nonConcurrent") { "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ INSERT INTO ${testTable} VALUES (123, '17.0.0.0', 'HTTP GET', '200', 20); """ sql """ INSERT INTO ${testTable} VALUES (123, '17.0.0.0', 'Life is like a box of chocolates, you never know what you are going to get.', '200', 20); """ @@ -63,7 +63,7 @@ suite("test_match_without_index_fault_injection", "nonConcurrent") { resultList.add(sqlResult) } } - + def compare_result = { executedSql -> assertEquals(match_res_without_index.size(), match_res_with_index.size()) for (int i = 0; i < match_res_without_index.size(); i++) { @@ -80,11 +80,11 @@ suite("test_match_without_index_fault_injection", "nonConcurrent") { try { GetDebugPoint().enableDebugPointForAllBEs("return_inverted_index_bypass") execute_sql.call(match_res_without_index, index_sql) - + } finally { GetDebugPoint().disableDebugPointForAllBEs("return_inverted_index_bypass") execute_sql.call(match_res_with_index, index_sql) compare_result.call(index_sql) } - + } \ No newline at end of file diff --git a/regression-test/suites/fault_injection_p0/test_need_read_data_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_need_read_data_fault_injection.groovy index 4e0b633ddb8b2d..0d135653e91803 100644 --- a/regression-test/suites/fault_injection_p0/test_need_read_data_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_need_read_data_fault_injection.groovy @@ -73,7 +73,7 @@ suite("test_need_read_data_fault_injection", "nonConcurrent") { load_httplogs_data.call(indexTbName, 'test_need_read_data_fault_injection', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ try { GetDebugPoint().enableDebugPointForAllBEs("segment_iterator._read_columns_by_index") diff --git a/regression-test/suites/fault_injection_p0/test_variant_count_on_index_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_variant_count_on_index_fault_injection.groovy index de4be5566d1100..c19d39cb7415dd 100644 --- a/regression-test/suites/fault_injection_p0/test_variant_count_on_index_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_variant_count_on_index_fault_injection.groovy @@ -23,7 +23,7 @@ suite("test_variant_count_on_index_fault_injection", "p0, nonConcurrent") { sql "DROP TABLE IF EXISTS ${tbl}" - sql "set enable_common_expr_pushdown = true" + sql "set enable_segment_limit_pushdown = true" sql "set enable_count_on_index_pushdown = true" sql "set enable_match_without_inverted_index = false" sql "set experimental_enable_nereids_planner = true" diff --git a/regression-test/suites/fault_injection_p0/test_write_inverted_index_exception_fault_injection.groovy b/regression-test/suites/fault_injection_p0/test_write_inverted_index_exception_fault_injection.groovy index 732057bf553a3a..8d1226824d5336 100644 --- a/regression-test/suites/fault_injection_p0/test_write_inverted_index_exception_fault_injection.groovy +++ b/regression-test/suites/fault_injection_p0/test_write_inverted_index_exception_fault_injection.groovy @@ -53,8 +53,8 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { boolean inverted_index_ram_dir_enable = true boolean has_update_be_config = false - - def creata_table = { String tableName, String format -> + + def creata_table = { String tableName, String format -> sql "DROP TABLE IF EXISTS ${tableName}" sql """ @@ -83,7 +83,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { ); """ } - + def run_insert = { String tableName -> sql """ INSERT INTO ${tableName} VALUES (1, "andy", 10, [89, 80, 98], ["football", "basketball"], "andy is good at sports", ["andy has a good heart", "andy is so nice"]); """ sql """ INSERT INTO ${tableName} VALUES (1, "bason", 11, [79, 85, 97], ["singing", "dancing"], "bason is good at singing", ["bason is very clever", "bason is very healthy"]); """ @@ -100,7 +100,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { } def run_select = { String tableName, boolean normal -> - def result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE name MATCH 'andy'" + def result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE name MATCH 'andy'" assertEquals(3, result.size()) assertEquals(1, result[0]['id']) assertEquals("andy", result[0]['name']) @@ -109,7 +109,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { assertEquals(3, result[2]['id']) assertEquals("andy", result[2]['name']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE age < 11" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE age < 11" assertEquals(3, result.size()) assertEquals("andy", result[0]['name']) assertEquals(2, result[1]['id']) @@ -117,7 +117,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { assertEquals(3, result[2]['id']) assertEquals("andy", result[2]['name']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE description MATCH 'sports'" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE description MATCH 'sports'" assertEquals(3, result.size()) assertEquals("andy", result[0]['name']) assertEquals("andy is good at sports", result[0]['description']) @@ -127,7 +127,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { assertEquals("andy is good at sports", result[2]['description']) if (normal) { - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(scores, 79)" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(scores, 79)" assertEquals(3, result.size()) assertEquals("bason", result[0]['name']) assertEquals("[79, 85, 97]", result[0]['scores']) @@ -136,10 +136,10 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { assertEquals("bason", result[2]['name']) assertEquals("[79, 85, 97]", result[2]['scores']) } else { - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(scores, 79)" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(scores, 79)" assertEquals(0, result.size()) } - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(hobbies, 'football')" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(hobbies, 'football')" assertEquals(3, result.size()) assertEquals("andy", result[0]['name']) assertEquals('["football", "basketball"]', result[0]['hobbies']) @@ -148,7 +148,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { assertEquals("andy", result[2]['name']) assertEquals('["football", "basketball"]', result[2]['hobbies']) - result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_common_expr_pushdown = true) */ * FROM ${tableName} WHERE array_contains(evaluation, 'andy is so nice')" + result = sql_return_maparray "SELECT /*+ SET_VAR(enable_match_without_inverted_index = false, enable_segment_limit_pushdown = true) */ * FROM ${tableName} WHERE array_contains(evaluation, 'andy is so nice')" assertEquals(3, result.size()) assertEquals("andy", result[0]['name']) assertEquals('["andy has a good heart", "andy is so nice"]', result[0]['evaluation']) @@ -186,7 +186,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { "DorisFSDirectory::fileExists_status_is_not_ok", "DorisFSDirectory::touchFile_status_is_not_ok", "DorisFSDirectory::fileLength_status_is_not_ok", - "DorisFSDirectory::close_close_with_error", + "DorisFSDirectory::close_close_with_error", "DorisFSDirectory::doDeleteFile_status_is_not_ok", "DorisFSDirectory::deleteDirectory_throw_is_not_directory", "DorisFSDirectory::renameFile_exists_status_is_not_ok", @@ -234,7 +234,7 @@ suite("test_write_inverted_index_exception_fault_injection", "nonConcurrent") { String backend_id; backend_id = backendId_to_backendIP.keySet()[0] def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - + logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) assertEquals(code, 0) def configList = parseJson(out.trim()) diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_basic_analyzer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_basic_analyzer.groovy index 863c3ddba63d74..3269b24dfa363b 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_basic_analyzer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_basic_analyzer.groovy @@ -41,7 +41,7 @@ suite("test_basic_analyzer", "p0"){ try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select * from ${indexTbName1} where b match_phrase 'images hm_bg.jpg'; """ qt_sql """ select * from ${indexTbName1} where b match_phrase 'อย ใน'; """ diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_builtin_analyzer_in_custom_analyzer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_builtin_analyzer_in_custom_analyzer.groovy index 25e9cda1a40b59..b95a804a948e6c 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_builtin_analyzer_in_custom_analyzer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_builtin_analyzer_in_custom_analyzer.groovy @@ -18,7 +18,7 @@ suite("test_builtin_analyzer_in_custom_analyzer", "p0") { // Define all built-in analyzers def builtinAnalyzers = ["none", "standard", "unicode", "english", "chinese", "icu", "basic", "ik"] - + // Helper function to test that creating analyzer with builtin name should fail def testBuiltinAnalyzerNameConflict = { String analyzerName -> test { @@ -33,15 +33,15 @@ suite("test_builtin_analyzer_in_custom_analyzer", "p0") { exception "conflicts with built-in" } } - + // Test: Cannot create custom analyzer with built-in analyzer names logger.info("Testing that built-in analyzer names cannot be used for custom analyzers") - + builtinAnalyzers.each { analyzerName -> logger.info("Testing conflict with built-in analyzer: ${analyzerName}") testBuiltinAnalyzerNameConflict(analyzerName) } - + // Define tokenize test cases: [testName, testText, analyzerName] def tokenizeTestCases = [ ["standard", "Apache Doris is a fast MPP database", "standard"], @@ -55,24 +55,24 @@ suite("test_builtin_analyzer_in_custom_analyzer", "p0") { ["empty", "", "standard"], ["mixed", "中文English日本語한국어", "icu"] ] - + // Execute tokenize tests in a loop tokenizeTestCases.each { testCase -> def testName = testCase[0] def testText = testCase[1] def analyzerName = testCase[2] - + logger.info("Testing tokenize with ${analyzerName}: ${testName}") - "qt_tokenize_${testName}"(""" - select tokenize("${testText}", '"analyzer"="${analyzerName}"'); + "qt_tokenize_${testName}"(""" + select tokenize("${testText}", '"analyzer"="${analyzerName}"'); """) } // Test table creation with analyzer_with_standard def indexTblName = "test_builtin_analyzer_table" - + sql "DROP TABLE IF EXISTS ${indexTblName}" - + sql """ CREATE TABLE ${indexTblName} ( `id` int(11) NOT NULL, @@ -85,16 +85,16 @@ suite("test_builtin_analyzer_in_custom_analyzer", "p0") { "replication_allocation" = "tag.location.default: 1" ); """ - + // Insert test data sql """ INSERT INTO ${indexTblName} VALUES (1, 'GET /images/logo.png HTTP/1.0'); """ sql """ INSERT INTO ${indexTblName} VALUES (2, 'POST /api/v1/users HTTP/1.1'); """ sql """ INSERT INTO ${indexTblName} VALUES (3, 'GET /docs/index.html HTTP/1.0'); """ - + try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ - + sql """ set enable_segment_limit_pushdown = true; """ + // Test MATCH queries with analyzer_with_standard qt_sql_basic_match_logo """ SELECT * FROM ${indexTblName} WHERE url MATCH 'logo' ORDER BY id; """ qt_sql_basic_match_images """ SELECT * FROM ${indexTblName} WHERE url MATCH 'images' ORDER BY id; """ @@ -102,12 +102,12 @@ suite("test_builtin_analyzer_in_custom_analyzer", "p0") { } finally { } - + // Test with another analyzer - analyzer_with_basic def indexTblName2 = "test_builtin_analyzer_table_basic" - + sql "DROP TABLE IF EXISTS ${indexTblName2}" - + sql """ CREATE TABLE ${indexTblName2} ( `id` int(11) NOT NULL, @@ -120,21 +120,21 @@ suite("test_builtin_analyzer_in_custom_analyzer", "p0") { "replication_allocation" = "tag.location.default: 1" ); """ - + // Insert URL test data sql """ INSERT INTO ${indexTblName2} VALUES (1, 'GET /images/logo.png HTTP/1.0'); """ sql """ INSERT INTO ${indexTblName2} VALUES (2, 'POST /api/v1/users HTTP/1.1'); """ sql """ INSERT INTO ${indexTblName2} VALUES (3, 'GET /docs/index.html HTTP/1.0'); """ - + try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ - + sql """ set enable_segment_limit_pushdown = true; """ + // Test basic analyzer on URL-like strings qt_sql_basic_match_logo """ SELECT * FROM ${indexTblName2} WHERE url MATCH 'logo' ORDER BY id; """ qt_sql_basic_match_images """ SELECT * FROM ${indexTblName2} WHERE url MATCH 'images' ORDER BY id; """ qt_sql_basic_match_api """ SELECT * FROM ${indexTblName2} WHERE url MATCH 'api' ORDER BY id; """ - + } finally { } } \ No newline at end of file diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_char_group_tokenizer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_char_group_tokenizer.groovy index d65bc7d97819ae..7ba03043391b7f 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_char_group_tokenizer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_char_group_tokenizer.groovy @@ -131,7 +131,7 @@ suite("test_char_group_tokenizer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Match queries leveraging the analyzer qt_sql """ select id, ch from ${tbl} where ch match 'World'; """ diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer.groovy index 0610fc366bf42a..549508423fcfe3 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer.groovy @@ -53,7 +53,7 @@ suite("test_custom_analyzer", "p0") { sql """ CREATE INVERTED INDEX ANALYZER IF NOT EXISTS lowercase_delimited PROPERTIES - ( + ( "tokenizer" = "standard", "token_filter" = "asciifolding, word_splitter, lowercase" ); @@ -338,7 +338,7 @@ suite("test_custom_analyzer", "p0") { qt_tokenize_pinyin2 """ select tokenize("张学友", '"analyzer"="pinyin_analyzer"'); """ qt_tokenize_pinyin3 """ select tokenize("刘德华", '"analyzer"="keyword_pinyin"'); """ qt_tokenize_pinyin4 """ select tokenize("DJ音乐家", '"analyzer"="keyword_pinyin"'); """ - + // Test polyphone phrases - these should use polyphone dictionary qt_tokenize_pinyin_poly1 """ select tokenize("你呢", '"analyzer"="keyword_pinyin"'); """ qt_tokenize_pinyin_poly2 """ select tokenize("做不了", '"analyzer"="keyword_pinyin"'); """ @@ -346,14 +346,14 @@ suite("test_custom_analyzer", "p0") { qt_tokenize_pinyin_poly4 """ select tokenize("厦门", '"analyzer"="keyword_pinyin"'); """ qt_tokenize_pinyin_poly5 """ select tokenize("长城", '"analyzer"="keyword_pinyin"'); """ qt_tokenize_pinyin_poly6 """ select tokenize("重要", '"analyzer"="keyword_pinyin"'); """ - + // Test joined full pinyin qt_tokenize_pinyin6 """ select tokenize("刘德华", '"analyzer"="pinyin_joined_analyzer"'); """ qt_tokenize_pinyin7 """ select tokenize("刘a德华", '"analyzer"="pinyin_joined_analyzer"'); """ - + // Test separate first letter qt_tokenize_pinyin8 """ select tokenize("刘德华", '"analyzer"="pinyin_separate_analyzer"'); """ - + // Test standard tokenizer with pinyin filter qt_tokenize_pinyin9 """ select tokenize("刘德华", '"analyzer"="standard_pinyin"'); """ qt_tokenize_pinyin10 """ select tokenize("刘德华 张学友", '"analyzer"="standard_pinyin"'); """ @@ -362,7 +362,7 @@ suite("test_custom_analyzer", "p0") { // Test mixed mode with none chinese qt_tokenize_pinyin12 """ select tokenize("DJ音乐家", '"analyzer"="keyword_pinyin_mixed"'); """ qt_tokenize_pinyin13 """ select tokenize("刘德华ABC123", '"analyzer"="keyword_pinyin_mixed"'); """ - + sql "DROP TABLE IF EXISTS ${indexTbName1}" sql """ CREATE TABLE ${indexTbName1} ( @@ -382,7 +382,7 @@ suite("test_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select * from ${indexTbName1} where ch match 'abcDEF'; """ qt_sql """ select * from ${indexTbName1} where ch match '中'; """ @@ -407,7 +407,7 @@ suite("test_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select * from ${indexTbName2} where ch match '102'; """ } finally { @@ -531,23 +531,23 @@ suite("test_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Test full pinyin qt_sql_pinyin1 """ select * from ${indexTbName4} where name match 'liudehua' order by a; """ qt_sql_pinyin2 """ select * from ${indexTbName4} where name match 'zhang' order by a; """ - + // Test first letter qt_sql_pinyin3 """ select * from ${indexTbName4} where name match 'ldh' order by a; """ qt_sql_pinyin4 """ select * from ${indexTbName4} where name match 'zxy' order by a; """ - + // Test original Chinese qt_sql_pinyin5 """ select * from ${indexTbName4} where name match '刘德华' order by a; """ - + // Test mixed Chinese and English qt_sql_pinyin6 """ select * from ${indexTbName4} where name match 'dj' order by a; """ qt_sql_pinyin7 """ select * from ${indexTbName4} where name match 'abc' order by a; """ - + // Test polyphone phrases - should match correct pinyin from polyphone dictionary qt_sql_pinyin_poly1 """ select * from ${indexTbName4} where name match 'ni' order by a; """ qt_sql_pinyin_poly2 """ select * from ${indexTbName4} where name match 'ne' order by a; """ @@ -559,7 +559,7 @@ suite("test_custom_analyzer", "p0") { qt_sql_pinyin_poly8 """ select * from ${indexTbName4} where name match 'men' order by a; """ qt_sql_pinyin_poly9 """ select * from ${indexTbName4} where name match 'chang' order by a; """ qt_sql_pinyin_poly10 """ select * from ${indexTbName4} where name match 'zhong' order by a; """ - + // Test first letter abbreviations for polyphone phrases qt_sql_pinyin_poly11 """ select * from ${indexTbName4} where name match 'nn' order by a; """ qt_sql_pinyin_poly12 """ select * from ${indexTbName4} where name match 'zbl' order by a; """ @@ -597,21 +597,21 @@ suite("test_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Test joined full pinyin qt_sql_pinyin_joined1 """ select * from ${indexTbName5} where name match 'liudehua' order by a; """ qt_sql_pinyin_joined2 """ select * from ${indexTbName5} where name match 'zhangxueyou' order by a; """ qt_sql_pinyin_joined3 """ select * from ${indexTbName5} where name match 'guofuchengliming' order by a; """ - + // Test first letter still works qt_sql_pinyin_joined4 """ select * from ${indexTbName5} where name match 'ldh' order by a; """ - + // Test polyphone phrases with joined pinyin qt_sql_pinyin_joined_poly1 """ select * from ${indexTbName5} where name match 'nine' order by a; """ qt_sql_pinyin_joined_poly2 """ select * from ${indexTbName5} where name match 'zuobuliao' order by a; """ qt_sql_pinyin_joined_poly3 """ select * from ${indexTbName5} where name match 'xiamenkongtiao' order by a; """ - + // Test first letter abbreviations for polyphone phrases qt_sql_pinyin_joined_poly4 """ select * from ${indexTbName5} where name match 'nn' order by a; """ qt_sql_pinyin_joined_poly5 """ select * from ${indexTbName5} where name match 'zbl' order by a; """ @@ -643,7 +643,7 @@ suite("test_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Standard tokenizer splits by space, then applies pinyin filter qt_sql_standard_pinyin1 """ select * from ${indexTbName6} where content match 'l' order by a; """ @@ -714,7 +714,7 @@ suite("test_custom_analyzer", "p0") { // Test Bug #1: Space handling consistency between pinyin tokenizer and pinyin filter // When using pinyin filter with keyword tokenizer, spaces should be ignored (not trigger buffer processing) // This matches ES behavior where spaces don't split the ASCII buffer - + // Drop existing objects first to ensure clean state try { sql """ DROP INVERTED INDEX ANALYZER pinyin_analyzer_space_test """ @@ -728,7 +728,7 @@ suite("test_custom_analyzer", "p0") { try { sql """ DROP INVERTED INDEX TOKEN_FILTER pinyin_filter_space_test """ } catch (Exception e) { /* ignore if not exists */ } - + // Create pinyin tokenizer for comparison (spaces should be ignored in joined output) // Key settings: keep_none_chinese=false (don't output English separately) // keep_none_chinese_in_joined_full_pinyin=true (include English in joined output) @@ -749,7 +749,7 @@ suite("test_custom_analyzer", "p0") { "ignore_pinyin_offset" = "true" ); """ - + // Create pinyin filter with keyword tokenizer for comparison // Same settings as tokenizer to ensure consistent behavior sql """ @@ -769,17 +769,17 @@ suite("test_custom_analyzer", "p0") { "ignore_pinyin_offset" = "true" ); """ - + // Wait for tokenizer and filter to be ready before creating analyzers sql """ select sleep(15) """ - + sql """ CREATE INVERTED INDEX ANALYZER pinyin_analyzer_space_test PROPERTIES ( "tokenizer" = "pinyin_tokenizer_space_test" ); """ - + sql """ CREATE INVERTED INDEX ANALYZER pinyin_filter_analyzer_space_test PROPERTIES ( @@ -787,20 +787,20 @@ suite("test_custom_analyzer", "p0") { "token_filter" = "pinyin_filter_space_test" ); """ - + // Wait for analyzers to be ready sql """ select sleep(15) """ - + // Bug #1 Test: Mixed Chinese and English with spaces // Input: "ALF 刘德华" - space should be ignored, English and pinyin should be joined // Key point: Space between "ALF" and "刘德华" should NOT split the ASCII buffer // Expected output: ["ALFliudehua"] - English and pinyin joined together qt_sql_bug1_mixed_tokenizer """ select tokenize('ALF 刘德华', '"analyzer"="pinyin_analyzer_space_test"'); """ qt_sql_bug1_mixed_filter """ select tokenize('ALF 刘德华', '"analyzer"="pinyin_filter_analyzer_space_test"'); """ - + // Test Bug #2: Pure English fallback // When keep_none_chinese=false and input is pure English, should preserve original token (ES behavior) - + // Drop existing objects first try { sql """ DROP INVERTED INDEX ANALYZER pinyin_analyzer_fallback_test """ @@ -808,7 +808,7 @@ suite("test_custom_analyzer", "p0") { try { sql """ DROP INVERTED INDEX TOKEN_FILTER pinyin_filter_fallback_test """ } catch (Exception e) { /* ignore if not exists */ } - + sql """ CREATE INVERTED INDEX TOKEN_FILTER pinyin_filter_fallback_test PROPERTIES ( @@ -824,10 +824,10 @@ suite("test_custom_analyzer", "p0") { "lowercase" = "false" ); """ - + // Wait for filter to be ready before creating analyzer sql """ select sleep(15) """ - + sql """ CREATE INVERTED INDEX ANALYZER pinyin_analyzer_fallback_test PROPERTIES ( @@ -835,19 +835,19 @@ suite("test_custom_analyzer", "p0") { "token_filter" = "pinyin_filter_fallback_test" ); """ - + // Wait for analyzer to be ready sql """ select sleep(15) """ - + // Bug #2 Test: Pure English should be preserved via fallback mechanism // Before fix: [] (token was dropped) // After fix: original token preserved qt_sql_bug2_pure_english """ select tokenize('Lanky Kong', '"analyzer"="pinyin_analyzer_fallback_test"'); """ qt_sql_bug2_pure_numbers """ select tokenize('12345', '"analyzer"="pinyin_analyzer_fallback_test"'); """ - + // Bug #2 Test: Chinese should still work normally (output joined pinyin) qt_sql_bug2_chinese """ select tokenize('刘德华', '"analyzer"="pinyin_analyzer_fallback_test"'); """ - + // ==================== End Bug Fix Tests ==================== // Test table creation and queries with ignore_pinyin_offset @@ -872,7 +872,7 @@ suite("test_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Test queries with ignore_pinyin_offset=true qt_sql_table_ignore_offset_1 """ select * from ${indexTbName7} where content match 'liu' order by a; """ diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer1.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer1.groovy index 665cda3b34660f..71f56afb7df3ba 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer1.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer1.groovy @@ -69,7 +69,7 @@ suite("test_custom_analyzer1", "p0") { """ sql """ select sleep(10) """ - + sql "DROP TABLE IF EXISTS test_custom_analyzer1" sql """ CREATE TABLE test_custom_analyzer1 ( @@ -105,7 +105,7 @@ suite("test_custom_analyzer1", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select * from test_custom_analyzer1 where ch match 'with'; """ qt_sql """ select * from test_custom_analyzer1 where ch match 'the'; """ diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer2.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer2.groovy index 88fa81a3efcf1f..8eff661969ea8d 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer2.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_custom_analyzer2.groovy @@ -49,9 +49,9 @@ suite("test_custom_analyzer2", "p0") { try { sql """ insert into test_custom_analyzer2_1 values(1, "中国人民"); """ sql """ insert into test_custom_analyzer2_1 values(2, "美国人民"); """ - + sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select count(1) from test_custom_analyzer2_1 where ch match '中'; """ qt_sql """ select count(1) from test_custom_analyzer2_1 where ch match '国'; """ diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_custom_normalizer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_custom_normalizer.groovy index bac9b0ff4d8e0b..fefa0c9bfca6fa 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_custom_normalizer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_custom_normalizer.groovy @@ -100,7 +100,7 @@ suite("test_custom_normalizer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql_match_cafe """ SELECT id, content diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_icu_analyzer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_icu_analyzer.groovy index 2fa943b9ca9a64..4b596ad0685c5e 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_icu_analyzer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_icu_analyzer.groovy @@ -41,7 +41,7 @@ suite("test_icu_analyzer", "p0"){ try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select * from ${indexTbName1} where b match_phrase 'images hm_bg.jpg'; """ qt_sql """ select * from ${indexTbName1} where b match_phrase 'อย ใน'; """ diff --git a/regression-test/suites/inverted_index_p0/analyzer/test_ik_analyzer.groovy b/regression-test/suites/inverted_index_p0/analyzer/test_ik_analyzer.groovy index b57d40a4a002c0..e806a339fb08ba 100644 --- a/regression-test/suites/inverted_index_p0/analyzer/test_ik_analyzer.groovy +++ b/regression-test/suites/inverted_index_p0/analyzer/test_ik_analyzer.groovy @@ -66,7 +66,7 @@ suite("test_ik_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Testing ik smart mode println "Testing ik smart mode:" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_data_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_data_arr.groovy index 326bb3d9ab082c..feb2895cf9ddef 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_data_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_data_arr.groovy @@ -26,8 +26,7 @@ suite("test_add_drop_index_with_data_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def wait_for_latest_op_on_table_finish = { table_name, OpTimeout -> for(int t = delta_time; t <= OpTimeout; t += delta_time){ diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_delete_data_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_delete_data_arr.groovy index 717d0e93d63b82..a51b48cb3d4c10 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_delete_data_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_add_drop_index_with_delete_data_arr.groovy @@ -26,8 +26,7 @@ suite("test_add_drop_index_with_delete_data_arr", "array_contains_inverted_index sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def wait_for_latest_op_on_table_finish = { table_name, OpTimeout -> for(int t = delta_time; t <= OpTimeout; t += delta_time){ @@ -227,7 +226,7 @@ suite("test_add_drop_index_with_delete_data_arr", "array_contains_inverted_index assertEquals(select_result[2][0], 5) assertEquals(select_result[2][1], "name5") assertEquals(select_result[2][2], "desc world") - + // add index on column description sql "create index idx_desc on ${indexTbName1}(description) USING INVERTED PROPERTIES(\"parser\"=\"none\");" wait_for_latest_op_on_table_finish(indexTbName1, timeout) diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_add_index_for_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_add_index_for_arr.groovy index 78bec2d11b0d5f..db5ea1ec1725c8 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_add_index_for_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_add_index_for_arr.groovy @@ -26,7 +26,7 @@ suite("test_add_index_for_arr") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=false""" - sql """ set enable_common_expr_pushdown=true """ + sql """ set enable_segment_limit_pushdown=true """ def wait_for_latest_op_on_table_finish = { table_name, OpTimeout -> for(int t = delta_time; t <= OpTimeout; t += delta_time){ diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_array_contains_estimate.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_array_contains_estimate.groovy index c1d98f80c119a1..643774e4d1168d 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_array_contains_estimate.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_array_contains_estimate.groovy @@ -20,7 +20,7 @@ suite("test_array_contains_estimate", "nonConcurrent"){ def indexTblName = "tai_estimate" def dataFile = "tai_estimate.csv" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_profile = true;""" sql """ set enable_inverted_index_query=true; """ sql """ set inverted_index_skip_threshold = 0; """ // set skip threshold to 0 diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_char_replace_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_char_replace_arr.groovy index 8a80b1b1fe49b6..a2013342dacc1d 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_char_replace_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_char_replace_arr.groovy @@ -23,8 +23,7 @@ suite("test_char_replace_array_contains_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ sql "DROP TABLE IF EXISTS ${indexTblName}" // create 1 replica table @@ -45,7 +44,7 @@ suite("test_char_replace_array_contains_arr", "array_contains_inverted_index") { "replication_allocation" = "tag.location.default: 1" ); """ - + def var_result = sql "show variables" logger.info("show variales result: " + var_result ) diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_compound_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_compound_arr.groovy index e4acc0b56f94b7..da270f14f9c7f9 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_compound_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_compound_arr.groovy @@ -25,8 +25,7 @@ suite("test_compound_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTblName = "test_compound_arr" @@ -50,8 +49,8 @@ suite("test_compound_arr", "array_contains_inverted_index"){ ); """ - sql """ - INSERT INTO $indexTblName VALUES + sql """ + INSERT INTO $indexTblName VALUES (1, ['1'], ['1'], ['1']), (2, ['2'], ['2'], ['2']), (3, ['3'], ['3'], ['3']), @@ -62,7 +61,7 @@ suite("test_compound_arr", "array_contains_inverted_index"){ (8, ['8'], ['8'], ['8']), (9, ['9'], ['9'], ['9']), (10, ['10'], ['10'], ['10']); - """ + """ qt_sql """SELECT count() FROM $indexTblName WHERE (id >= 2 AND id < 9) and (array_contains(a, '2') or array_contains(b, '5') and array_contains(c, '5'));""" qt_sql "SELECT count() FROM $indexTblName WHERE (id >= 2 AND id < 9) and (array_contains(a, '2') or array_contains(b, '5') or array_contains(c, '6'));" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_count_on_index_httplogs_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_count_on_index_httplogs_arr.groovy index 3466833231dd77..3eae56a70a65c1 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_count_on_index_httplogs_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_count_on_index_httplogs_arr.groovy @@ -24,9 +24,8 @@ suite("test_count_on_index_httplogs_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ - + sql """ set enable_segment_limit_pushdown=true """ + def create_httplogs_dup_table = {testTablex -> // multi-line sql def result = sql """ @@ -99,14 +98,14 @@ suite("test_count_on_index_httplogs_arr", "array_contains_inverted_index") { ); """ } - + def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_equal_on_fulltext_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_equal_on_fulltext_arr.groovy index b36b82a41f1029..cd4272c2d7303f 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_equal_on_fulltext_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_equal_on_fulltext_arr.groovy @@ -22,8 +22,7 @@ suite("test_equal_on_fulltext_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTblName = "test_equal_on_fulltext_arr" @@ -42,7 +41,7 @@ suite("test_equal_on_fulltext_arr", "array_contains_inverted_index"){ "replication_allocation" = "tag.location.default: 1" ); """ - + def var_result = sql "show variables" logger.info("show variales result: " + var_result ) diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_bkd_null_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_bkd_null_arr.groovy index 973c42f8e3e071..2a18556880642f 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_bkd_null_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_bkd_null_arr.groovy @@ -22,8 +22,7 @@ suite("test_bkd_null_index_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTblName = "bkd_null_index_test_arr" @@ -42,7 +41,7 @@ suite("test_bkd_null_index_arr", "array_contains_inverted_index"){ "replication_allocation" = "tag.location.default: 1" ); """ - + def var_result = sql "show variables" logger.info("show variales result: " + var_result ) diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_change_2_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_change_2_arr.groovy index de1ee5b86c0b87..3ba4760edb0381 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_change_2_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_change_2_arr.groovy @@ -27,8 +27,7 @@ suite("test_index_change_2_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def wait_for_latest_op_on_table_finish = { table_name, OpTimeout -> for(int t = delta_time; t <= OpTimeout; t += delta_time){ diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_change_4_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_change_4_arr.groovy index e4ae587cf9dcaa..79984f6fd22a37 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_change_4_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_change_4_arr.groovy @@ -27,8 +27,7 @@ suite("test_index_change_4_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def wait_for_latest_op_on_table_finish = { table_name, OpTimeout -> for(int t = delta_time; t <= OpTimeout; t += delta_time){ @@ -66,7 +65,7 @@ suite("test_index_change_4_arr", "array_contains_inverted_index") { } assertTrue(useTime <= OpTimeout, "wait_for_latest_build_index_on_partition_finish timeout") } - + def tableName = "test_index_change_4_arr" sql """ DROP TABLE IF EXISTS ${tableName} """ @@ -110,7 +109,7 @@ suite("test_index_change_4_arr", "array_contains_inverted_index") { (6, '2017-10-03', ['Hongkong China'], 10, 1, ['Architectural designer']) """ - + qt_select1 """ SELECT * FROM ${tableName} t ORDER BY user_id,date,city[1],age,sex; """ qt_select2_v1 """ SELECT * FROM ${tableName} t WHERE array_contains(city, 'beijing') ORDER BY user_id; """ qt_select3_v1 """ SELECT * FROM ${tableName} t WHERE array_contains(city, 'beijing') and sex = 1 ORDER BY user_id; """ diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_change_6_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_change_6_arr.groovy index 3010a7cb99af26..0408763ebaed99 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_change_6_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_change_6_arr.groovy @@ -26,8 +26,7 @@ suite("test_index_change_6_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def wait_for_latest_op_on_table_finish = { table_name, OpTimeout -> for(int t = delta_time; t <= OpTimeout; t += delta_time){ @@ -64,7 +63,7 @@ suite("test_index_change_6_arr", "array_contains_inverted_index") { } assertTrue(useTime <= OpTimeout, "wait_for_latest_build_index_on_partition_finish timeout") } - + def tableName = "test_index_change_6_arr" sql """ DROP TABLE IF EXISTS ${tableName} """ @@ -107,7 +106,7 @@ suite("test_index_change_6_arr", "array_contains_inverted_index") { sql """ INSERT INTO ${tableName} (user_id, date, city, age, sex, note) VALUES (6, '2017-10-03', ['Hongkong China'], 10, 1, ['Architectural designer']) """ - + qt_select1 """ SELECT * FROM ${tableName} t ORDER BY user_id,date,city[1],age,sex; """ qt_select2_v1 """ SELECT * FROM ${tableName} t WHERE array_contains(city, 'beijing') ORDER BY user_id; """ qt_select3_v1 """ SELECT * FROM ${tableName} t WHERE array_contains(city, 'beijing') and sex = 1 ORDER BY user_id; """ diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_dup_keys_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_dup_keys_arr.groovy index c7d41e68cdd112..92a09b706bf7d7 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_dup_keys_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_dup_keys_arr.groovy @@ -22,8 +22,7 @@ suite("test_index_compaction_dup_keys_array", "array_contains_inverted_index, no sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def isCloudMode = isCloudMode() def tableName = "test_index_compaction_dup_keys_array" @@ -32,7 +31,7 @@ suite("test_index_compaction_dup_keys_array", "array_contains_inverted_index, no getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); boolean disableAutoCompaction = false - + def set_be_config = { key, value -> for (String backend_id: backendId_to_backendIP.keySet()) { def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), key, value) @@ -118,7 +117,7 @@ suite("test_index_compaction_dup_keys_array", "array_contains_inverted_index, no String backend_id; backend_id = backendId_to_backendIP.keySet()[0] def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - + logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) assertEquals(code, 0) def configList = parseJson(out.trim()) diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_null_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_null_arr.groovy index dfc38998c4d4bc..ebf769be530b4c 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_null_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_null_arr.groovy @@ -22,8 +22,7 @@ suite("test_index_compaction_null_arr", "array_contains_inverted_index, nonConcu sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def isCloudMode = isCloudMode() def tableName = "test_index_compaction_null_dups_arr" @@ -32,7 +31,7 @@ suite("test_index_compaction_null_arr", "array_contains_inverted_index, nonConcu getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); boolean disableAutoCompaction = false - + def set_be_config = { key, value -> for (String backend_id: backendId_to_backendIP.keySet()) { def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), key, value) @@ -112,7 +111,7 @@ suite("test_index_compaction_null_arr", "array_contains_inverted_index, nonConcu } } - def insert_data = { -> + def insert_data = { -> sql """insert into ${tableName} values (1,null,['addr qie3'],'yy','lj',[100]), (2,null,['hehe'],null,'lala',[200]), @@ -125,7 +124,7 @@ suite("test_index_compaction_null_arr", "array_contains_inverted_index, nonConcu """ } - def run_sql = { -> + def run_sql = { -> // select all data qt_select_0 "SELECT * FROM ${tableName} ORDER BY id" @@ -233,7 +232,7 @@ suite("test_index_compaction_null_arr", "array_contains_inverted_index, nonConcu String backend_id; backend_id = backendId_to_backendIP.keySet()[0] def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - + logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) assertEquals(code, 0) def configList = parseJson(out.trim()) diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_unique_keys_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_unique_keys_arr.groovy index 6de254c699a557..ae6a0705c5af4b 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_unique_keys_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_unique_keys_arr.groovy @@ -22,8 +22,7 @@ suite("test_index_compaction_unique_keys_arr", "array_contains_inverted_index, n sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def isCloudMode = isCloudMode() def tableName = "test_index_compaction_unique_keys_arr" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_with_multi_index_segments_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_with_multi_index_segments_arr.groovy index 3ef2dcf5dc1614..99c73066228ef7 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_with_multi_index_segments_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_compaction_with_multi_index_segments_arr.groovy @@ -22,8 +22,7 @@ suite("test_index_compaction_with_multi_index_segments_arr", "nonConcurrent") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def isCloudMode = isCloudMode() diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_delete_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_delete_arr.groovy index b243dd0379c7f8..a2cade168ea1fe 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_delete_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_delete_arr.groovy @@ -21,8 +21,7 @@ suite("test_index_delete_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTbName1 = "test_index_delete_arr" @@ -63,7 +62,7 @@ suite("test_index_delete_arr", "array_contains_inverted_index") { qt_sql """ select count() from ${indexTbName1} where a >= 1 and a <= 10; """ qt_sql """ select count() from ${indexTbName1} where a >= 1; """ qt_sql """ select count() from ${indexTbName1} where a <= 10; """ - + test { sql """ delete from test_index_delete_arr where array_contains(b,'3'); """ exception("errCode = 2") diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_empty_string_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_empty_string_arr.groovy index aae16716f94c42..9ca464c9feb8db 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_empty_string_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_empty_string_arr.groovy @@ -25,8 +25,7 @@ suite("test_index_empty_string_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTblName = "test_index_empty_string_arr" @@ -47,12 +46,12 @@ suite("test_index_empty_string_arr", "array_contains_inverted_index"){ "replication_allocation" = "tag.location.default: 1" ); """ - - sql """ + + sql """ INSERT INTO $indexTblName VALUES (1, [''], ['1']), (2, ['2'], ['']); - """ + """ qt_sql "SELECT count() FROM $indexTblName WHERE array_contains(a,'');" qt_sql "SELECT count() FROM $indexTblName WHERE array_contains(b,'');" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_equal_select_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_equal_select_arr.groovy index 3542fc8f665e5c..e472b2d0694a3b 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_equal_select_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_equal_select_arr.groovy @@ -20,8 +20,7 @@ suite("test_index_equal_select_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTbName1 = "index_equal_select_arr" @@ -67,7 +66,7 @@ suite("test_index_equal_select_arr", "array_contains_inverted_index"){ sql """select * from ${indexTbName1} where array_contains(name, '') order by name""" exception("errCode = 2") } - + qt_sql "select * from ${indexTbName1} where array_contains(grade, '') order by name" qt_sql "select * from ${indexTbName1} where array_contains(studentInfo, '') order by name" qt_sql "select * from ${indexTbName1} where array_contains(tearchComment, '') order by name" @@ -81,7 +80,7 @@ suite("test_index_equal_select_arr", "array_contains_inverted_index"){ qt_sql "select * from ${indexTbName1} where array_contains(selfComment, 'learn makes me happy') order by name" qt_sql "select * from ${indexTbName1} where array_contains(tearchComment, 'A quiet little boy') order by name" qt_sql "select * from ${indexTbName1} where array_contains(fatherName, 'zhang yi') order by name" - + // case1.2 test index colume not equal qt_sql "select * from ${indexTbName1} where !array_contains(age, 10) order by name" qt_sql "select * from ${indexTbName1} where !array_contains(grade, 'grade 5') order by name" @@ -89,7 +88,7 @@ suite("test_index_equal_select_arr", "array_contains_inverted_index"){ qt_sql "select * from ${indexTbName1} where !array_contains(selfComment, 'learn makes me happy') order by name" qt_sql "select * from ${indexTbName1} where !array_contains(tearchComment, 'A quiet little boy') order by name" qt_sql "select * from ${indexTbName1} where !array_contains(fatherName, 'zhang yi') order by name" - + // case1.3 test index colume and normal colume mix select // case1.3.0 default(simple) index and normal colume mix select // case 1.3.1 none index and normal colume mix select diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_match_phrase_edge_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_match_phrase_edge_arr.groovy index 2c9627cef07001..85a613f2e5fbfb 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_match_phrase_edge_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_match_phrase_edge_arr.groovy @@ -21,8 +21,7 @@ suite("test_index_match_phrase_edge_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTbName1 = "test_index_match_phrase_edge_arr" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_match_regexp_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_match_regexp_arr.groovy index 009299e4994087..da45cafd75ce62 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_match_regexp_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_match_regexp_arr.groovy @@ -21,8 +21,7 @@ suite("test_index_match_regexp_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def indexTbName1 = "test_index_match_regexp_arr" @@ -47,11 +46,11 @@ suite("test_index_match_regexp_arr", "array_contains_inverted_index"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_index_null_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_index_null_arr.groovy index ab68b5650e1556..14f2d372c5cbc6 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_index_null_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_index_null_arr.groovy @@ -21,8 +21,7 @@ suite("test_null_index_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ // prepare test table def timeout = 60000 @@ -47,7 +46,7 @@ suite("test_null_index_arr", "array_contains_inverted_index"){ "replication_allocation" = "tag.location.default: 1" ); """ - + sql "INSERT INTO $indexTblName VALUES (1, []), (2, null), (3, []), (1, [null]);" qt_sql "SELECT * FROM $indexTblName WHERE array_contains(value, 'a');" qt_sql "SELECT * FROM $indexTblName WHERE array_contains(value, null);" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_invalid_param.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_invalid_param.groovy index eb4b1c1fdefd5c..9f20dad5b4576e 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_invalid_param.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_invalid_param.groovy @@ -21,8 +21,7 @@ suite("test_invalid_param", "array_contains_inverted_index"){ def indexTblName = "unicode_test1_arr" sql """ set enable_profile = true; """ sql """ set enable_inverted_index_query=true; """ - sql """ set enable_common_expr_pushdown=true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true; """ + sql """ set enable_segment_limit_pushdown=true; """ sql "DROP TABLE IF EXISTS ${indexTblName}" sql """ CREATE TABLE IF NOT EXISTS ${indexTblName}( diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_inverted_index_null_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_inverted_index_null_arr.groovy index 3b231a424c480a..b274c115bf8044 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_inverted_index_null_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_inverted_index_null_arr.groovy @@ -20,8 +20,7 @@ suite("test_inverted_index_null_arr", "array_contains_inverted_index") { sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ def tableName = "test_inverted_index_null_arr" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_lowercase_arr.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_lowercase_arr.groovy index 7ffd0fcc1e516d..d3130f50130be3 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_lowercase_arr.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_lowercase_arr.groovy @@ -21,8 +21,7 @@ suite("test_lowercase_arr", "array_contains_inverted_index"){ sql """ set enable_profile=true""" sql """ set enable_pipeline_x_engine=true;""" sql """ set enable_inverted_index_query=true""" - sql """ set enable_common_expr_pushdown=true """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true """ + sql """ set enable_segment_limit_pushdown=true """ // prepare test table def indexTblName = "lowercase_test1_arr" diff --git a/regression-test/suites/inverted_index_p0/array_contains/test_parser_with_none_stopwords.groovy b/regression-test/suites/inverted_index_p0/array_contains/test_parser_with_none_stopwords.groovy index 28a7555b01dc8d..8c938fe9f445eb 100644 --- a/regression-test/suites/inverted_index_p0/array_contains/test_parser_with_none_stopwords.groovy +++ b/regression-test/suites/inverted_index_p0/array_contains/test_parser_with_none_stopwords.groovy @@ -21,8 +21,7 @@ suite("test_parser_with_none_stopwords", "array_contains_inverted_index"){ def indexTblName = "unicode_test1_arr_no_stopwords" sql """ set enable_profile = true; """ sql """ set enable_inverted_index_query=true; """ - sql """ set enable_common_expr_pushdown=true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index=true; """ + sql """ set enable_segment_limit_pushdown=true; """ sql "DROP TABLE IF EXISTS ${indexTblName}" sql """ CREATE TABLE IF NOT EXISTS ${indexTblName}( diff --git a/regression-test/suites/inverted_index_p0/char_filter/test_char_replace.groovy b/regression-test/suites/inverted_index_p0/char_filter/test_char_replace.groovy index 192c123aeaded1..00e5a89e371ee9 100644 --- a/regression-test/suites/inverted_index_p0/char_filter/test_char_replace.groovy +++ b/regression-test/suites/inverted_index_p0/char_filter/test_char_replace.groovy @@ -45,7 +45,7 @@ suite("test_char_replace") { "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ def var_result = sql "show variables" logger.info("show variales result: " + var_result ) @@ -67,7 +67,7 @@ suite("test_char_replace") { qt_sql "SELECT count() FROM ${indexTblName} where a match 'jpg'"; qt_sql "SELECT count() FROM ${indexTblName} where a match '1'"; qt_sql "SELECT count() FROM ${indexTblName} where a match '0'"; - + qt_sql "SELECT count() FROM ${indexTblName} where b match 'hm'"; qt_sql "SELECT count() FROM ${indexTblName} where b match 'bg'"; qt_sql "SELECT count() FROM ${indexTblName} where b match 'jpg'"; diff --git a/regression-test/suites/inverted_index_p0/index_change/test_build_index_multi_analyzer_order.groovy b/regression-test/suites/inverted_index_p0/index_change/test_build_index_multi_analyzer_order.groovy index 72df30031e3c35..55b81ac249ccd0 100644 --- a/regression-test/suites/inverted_index_p0/index_change/test_build_index_multi_analyzer_order.groovy +++ b/regression-test/suites/inverted_index_p0/index_change/test_build_index_multi_analyzer_order.groovy @@ -167,7 +167,7 @@ suite("test_build_index_multi_analyzer_order") { sql "sync" // Pin fuzzy variable: search() requires common expr pushdown to work - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" // === Verification: regex /\d\d\d\d/ should match exactly 4-digit tokens === // With edge_ngram analyzer, "11921" produces tokens: "119", "1192", "11921" diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy index 0e678ef7ea024b..b4773eab32f52b 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy @@ -114,7 +114,7 @@ suite("test_index_compaction_dup_keys", "nonConcurrent") { sql """ INSERT INTO ${tableName} VALUES (2, "bason", "bason hate pear", 99); """ sql """ INSERT INTO ${tableName} VALUES (3, "andy", "andy love apple", 100); """ sql """ INSERT INTO ${tableName} VALUES (3, "bason", "bason hate pear", 99); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select * from ${tableName} order by id, name, hobbies, score """ qt_sql """ select * from ${tableName} where name match "andy" order by id, name, hobbies, score """ diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy index e72a5edeabe6fd..97e86e46439d2b 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy @@ -26,7 +26,7 @@ suite("test_index_compaction_null", "nonConcurrent") { sql """ set global enable_match_without_inverted_index = false """ boolean disableAutoCompaction = false - + def set_be_config = { key, value -> for (String backend_id: backendId_to_backendIP.keySet()) { def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id), key, value) @@ -106,7 +106,7 @@ suite("test_index_compaction_null", "nonConcurrent") { } } - def insert_data = { -> + def insert_data = { -> sql """insert into ${tableName} values (1,null,'addr qie3','yy','lj',100), (2,null,'hehe',null,'lala',200), @@ -119,8 +119,8 @@ suite("test_index_compaction_null", "nonConcurrent") { """ } - def run_sql = { -> - sql """ set enable_common_expr_pushdown=true """ + def run_sql = { -> + sql """ set enable_segment_limit_pushdown=true """ // select all data qt_select_0 "SELECT * FROM ${tableName} ORDER BY id" @@ -224,7 +224,7 @@ suite("test_index_compaction_null", "nonConcurrent") { String backend_id; backend_id = backendId_to_backendIP.keySet()[0] def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - + logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) assertEquals(code, 0) def configList = parseJson(out.trim()) @@ -310,7 +310,7 @@ suite("test_index_compaction_null", "nonConcurrent") { "inverted_index_storage_format" = "V1" ) """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ tablets = sql_return_maparray """ show tablets from ${tableName}; """ run_test.call(tablets) diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy index 74cc4ffbc311ab..cd9357d098f8cc 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy @@ -112,7 +112,7 @@ suite("test_index_compaction_unique_keys", "nonConcurrent") { "inverted_index_storage_format" = "V1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ INSERT INTO ${tableName} VALUES (1, "andy", "andy love apple", 100); """ sql """ INSERT INTO ${tableName} VALUES (1, "bason", "bason hate pear", 99); """ diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy index 6b8b64ec11e153..43a9ad99e37b16 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy @@ -94,7 +94,7 @@ suite("test_index_compaction_with_multi_index_segments", "nonConcurrent") { // check config check_config.call("inverted_index_compaction_enable", "true") check_config.call("inverted_index_max_buffered_docs", "5") - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ /** * test duplicated tables diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy index 32a1f6d6e76984..3fb90402848786 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy @@ -77,7 +77,7 @@ suite("test_cumulative_compaction_with_format_v2", "inverted_index_format_v2") { backend_id = backendId_to_backendIP.keySet()[0] StringBuilder showConfigCommand = new StringBuilder(); Boolean enableTls = (context.config.otherConfigs.get("enableTLS")?.toString()?.equalsIgnoreCase("true")) ?: false - def protocol = enableTls ? "https" : "http" + def protocol = enableTls ? "https" : "http" showConfigCommand.append("curl -X GET ${protocol}://") showConfigCommand.append(backendId_to_backendIP.get(backend_id)) showConfigCommand.append(":") @@ -165,7 +165,7 @@ suite("test_cumulative_compaction_with_format_v2", "inverted_index_format_v2") { """ sql """ sync """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_select_default """ SELECT * FROM ${tableName} t WHERE city MATCH 'Beijing' ORDER BY user_id,date,city,age,sex,last_visit_date,last_update_date,last_visit_date_not_null,cost,max_dwell_time,min_dwell_time; """ diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_column_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_column_with_format_v2.groovy index 2de9c7fcbcb054..7b4edba64f9b9c 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_column_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_column_with_format_v2.groovy @@ -70,7 +70,7 @@ suite("test_drop_column_with_format_v2", "inverted_index_format_v2"){ } sql "DROP TABLE IF EXISTS ${tableName}" - + sql """ CREATE TABLE ${tableName} ( `id` int(11) NULL, @@ -95,7 +95,7 @@ suite("test_drop_column_with_format_v2", "inverted_index_format_v2"){ sql """ INSERT INTO ${tableName} VALUES (2, "bason", 99); """ sql """ INSERT INTO ${tableName} VALUES (3, "andy", 100); """ sql """ INSERT INTO ${tableName} VALUES (3, "bason", 99); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "SELECT * FROM $tableName WHERE name match 'andy' order by id, name, score;" diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_index_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_index_with_format_v2.groovy index e572535109ed0c..4a06ce6179e9ba 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_index_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_drop_index_with_format_v2.groovy @@ -50,7 +50,7 @@ suite("test_drop_index_with_format_v2", "inverted_index_format_v2"){ } sql "DROP TABLE IF EXISTS ${tableName}" - + sql """ CREATE TABLE ${tableName} ( `id` int(11) NULL, @@ -74,7 +74,7 @@ suite("test_drop_index_with_format_v2", "inverted_index_format_v2"){ sql """ INSERT INTO ${tableName} VALUES (2, "bason", 99); """ sql """ INSERT INTO ${tableName} VALUES (3, "andy", 100); """ sql """ INSERT INTO ${tableName} VALUES (3, "bason", 99); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "SELECT * FROM $tableName WHERE name match 'andy' order by id, name, score;" @@ -85,12 +85,12 @@ suite("test_drop_index_with_format_v2", "inverted_index_format_v2"){ String port = backendId_to_backendHttpPort.get(backend_id) check_nested_index_file(ip, port, tablet_id, 7, 2, "V2") - // drop index + // drop index sql """ DROP INDEX index_name on ${tableName}; """ wait_for_latest_op_on_table_finish(tableName, timeout) check_nested_index_file(ip, port, tablet_id, 7, 1, "V2") - // drop index + // drop index sql """ DROP INDEX index_score on ${tableName}; """ wait_for_latest_op_on_table_finish(tableName, timeout) check_nested_index_file(ip, port, tablet_id, 7, 0, "V2") diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_mor_table_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_mor_table_with_format_v2.groovy index 4f8c99695b7b7e..18d8c5493c751a 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_mor_table_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_mor_table_with_format_v2.groovy @@ -77,7 +77,7 @@ suite("test_mor_table_with_format_v2", "inverted_index_format_v2") { backend_id = backendId_to_backendIP.keySet()[0] StringBuilder showConfigCommand = new StringBuilder(); Boolean enableTls = (context.config.otherConfigs.get("enableTLS")?.toString()?.equalsIgnoreCase("true")) ?: false - def protocol = enableTls ? "https" : "http" + def protocol = enableTls ? "https" : "http" showConfigCommand.append("curl -X GET ${protocol}://") showConfigCommand.append(backendId_to_backendIP.get(backend_id)) showConfigCommand.append(":") @@ -166,7 +166,7 @@ suite("test_mor_table_with_format_v2", "inverted_index_format_v2") { """ sql """ sync """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ DELETE FROM ${tableName} WHERE user_id = 3 """ diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy index ea288d09679836..02aebbc3ecb258 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy @@ -167,7 +167,7 @@ suite("test_mow_table_with_format_v2", "inverted_index_format_v2") { """ sql """ sync """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_select_default """ SELECT * FROM ${tableName} t WHERE city MATCH 'Beijing' ORDER BY user_id,date,city,age,sex,last_visit_date,last_update_date,last_visit_date_not_null,cost,max_dwell_time,min_dwell_time; """ diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_rename_column_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_rename_column_with_format_v2.groovy index baaff078520aaa..c8a0660be6e04a 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_rename_column_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_rename_column_with_format_v2.groovy @@ -44,7 +44,7 @@ suite("test_rename_column_with_format_v2", "inverted_index_format_v2"){ } sql "DROP TABLE IF EXISTS ${tableName}" - + sql """ CREATE TABLE ${tableName} ( `id` int(11) NULL, @@ -67,7 +67,7 @@ suite("test_rename_column_with_format_v2", "inverted_index_format_v2"){ sql """ INSERT INTO ${tableName} VALUES (2, "bason", 99); """ sql """ INSERT INTO ${tableName} VALUES (3, "andy", 100); """ sql """ INSERT INTO ${tableName} VALUES (3, "bason", 99); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "SELECT * FROM $tableName WHERE name match 'andy' order by id, name, score;" diff --git a/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v1.groovy b/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v1.groovy index 6d5e1917fe103b..09231b8d6d6832 100644 --- a/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v1.groovy +++ b/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v1.groovy @@ -55,14 +55,14 @@ suite("test_storage_format_v1", "p0") { ); """ } - + def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -98,7 +98,7 @@ suite("test_storage_format_v1", "p0") { create_httplogs_dup_table.call(testTable_dup) load_httplogs_data.call(testTable_dup, 'test_httplogs_load_count_on_index', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql(" select COUNT(*) from ${testTable_dup} where request match 'images' ") diff --git a/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v2.groovy b/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v2.groovy index 8996d0989a61d4..497285ee58a330 100644 --- a/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/storage_format/test_storage_format_v2.groovy @@ -43,14 +43,14 @@ suite("test_storage_format_v2", "p0, nonConcurrent") { ); """ } - + def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1 -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -82,7 +82,7 @@ suite("test_storage_format_v2", "p0, nonConcurrent") { } try { - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql "DROP TABLE IF EXISTS ${testTable}" create_httplogs_dup_table.call(testTable) @@ -96,7 +96,7 @@ suite("test_storage_format_v2", "p0, nonConcurrent") { sql "sync" qt_sql(" select COUNT(*) from ${testTable} where request match 'images' ") - + def getJobState = { indexName -> def jobStateResult = sql """ SHOW ALTER TABLE COLUMN WHERE IndexName='${indexName}' ORDER BY createtime DESC LIMIT 1 """ return jobStateResult[0][9] @@ -124,7 +124,7 @@ suite("test_storage_format_v2", "p0, nonConcurrent") { wait_for_schema_change.call() qt_sql(" select COUNT(*) from ${testTable} where request match 'images' ") - + } finally { sql("DROP TABLE IF EXISTS ${testTable}") GetDebugPoint().disableDebugPointForAllBEs("inverted_index_storage_format_must_be_v2") diff --git a/regression-test/suites/inverted_index_p0/test_arrayInvertedIdx_profile.groovy b/regression-test/suites/inverted_index_p0/test_arrayInvertedIdx_profile.groovy index 1a65f1f042307c..e60693693650c5 100644 --- a/regression-test/suites/inverted_index_p0/test_arrayInvertedIdx_profile.groovy +++ b/regression-test/suites/inverted_index_p0/test_arrayInvertedIdx_profile.groovy @@ -59,9 +59,8 @@ suite("test_arrayInvertedIdx_profile", "nonConcurrent"){ } } - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_profile = true;""" sql """ set profile_level = 2;""" diff --git a/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy b/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy index d0f99d3110937e..daacdd33a2ceb5 100644 --- a/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_array_contains_with_inverted_index.groovy @@ -19,9 +19,8 @@ suite("test_array_contains_with_inverted_index"){ // prepare test table def indexTblName = "tai" - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_profile = true;""" sql "DROP TABLE IF EXISTS ${indexTblName}" @@ -61,7 +60,7 @@ suite("test_array_contains_with_inverted_index"){ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', '0974e7a82e30d1af83205e474fadd0a2', '[\"w\"]'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', '26823b3995ee38bd145ddd910b2f6300', '[\"x\"]'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', 'ee27ee1da291e46403c408e220bed6e1', '[\"y\"]'); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTblName}""" def param_contains = ["\'s\'", "\'\'", null] @@ -85,23 +84,23 @@ suite("test_array_contains_with_inverted_index"){ for (int i = 0 ; i < param.size(); ++i) { def p = param[i] log.info("param: ${p}") - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where (arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where (arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(inventors, ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where (arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where (arrays_overlap(inventors, ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ } } diff --git a/regression-test/suites/inverted_index_p0/test_array_index.groovy b/regression-test/suites/inverted_index_p0/test_array_index.groovy index ba6e1e1f398986..f84a5ceb176f1d 100644 --- a/regression-test/suites/inverted_index_p0/test_array_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_array_index.groovy @@ -59,7 +59,7 @@ suite("test_array_index1"){ "disable_auto_compaction" = "false" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2017-01-01', '6afef581285b6608bf80d5a4e46cf839', '[\"a\", \"b\", \"c\"]'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2017-01-01', 'd93d942d985a8fb7547c72dada8d332d', '[\"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\"]'); """ diff --git a/regression-test/suites/inverted_index_p0/test_array_inverted_index/sql/insert_with_query.sql b/regression-test/suites/inverted_index_p0/test_array_inverted_index/sql/insert_with_query.sql index c0f6cd28495187..a54de85f91c9f9 100644 --- a/regression-test/suites/inverted_index_p0/test_array_inverted_index/sql/insert_with_query.sql +++ b/regression-test/suites/inverted_index_p0/test_array_inverted_index/sql/insert_with_query.sql @@ -32,7 +32,7 @@ WHERE ( Array_contains(table1 . 'r') ) order by 1,2,3,4; -- set session variables for inverted index -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ col_int_undef_signed_not_null, col_date_undef_signed_not_null, col_bigint_undef_signed_not_null_index_inverted, col_bigint_undef_signed_not_null, Month (Ifnull(table1 . `col_date_undef_signed_not_null_index_inverted`, +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ col_int_undef_signed_not_null, col_date_undef_signed_not_null, col_bigint_undef_signed_not_null_index_inverted, col_bigint_undef_signed_not_null, Month (Ifnull(table1 . `col_date_undef_signed_not_null_index_inverted`, table1 . col_date_undef_signed)) AS field1, table1 . col_date_undef_signed_not_null AS field2, diff --git a/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy b/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy index d8e8575a052b30..f04c19b860a9f3 100644 --- a/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy +++ b/regression-test/suites/inverted_index_p0/test_array_with_inverted_index_all_type.groovy @@ -31,9 +31,8 @@ suite("test_array_with_inverted_index_all_type"){ def dataFile = """test_array_with_inverted_index_all_type.json""" def dataFileAgg = """test_array_with_inverted_index_all_type_agg.json""" sql """ set enable_profile = true;""" - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ // duplicate key table with all type using standard parser for inverted index sql "DROP TABLE IF EXISTS ${indexTblNames[0]}" @@ -78,10 +77,10 @@ suite("test_array_with_inverted_index_all_type"){ "disable_auto_compaction" = "false" ); """ - + // duplicate key table with all type using english parser for inverted index sql "DROP TABLE IF EXISTS ${indexTblNames[1]}" - sql """ + sql """ CREATE TABLE IF NOT EXISTS `${indexTblNames[1]}` ( k1 INT, c_date ARRAY, @@ -146,7 +145,7 @@ suite("test_array_with_inverted_index_all_type"){ "disable_auto_compaction" = "false" ); """ - + // mor key table with all type using english parser for inverted index sql "DROP TABLE IF EXISTS ${indexTblNames[3]}" sql """ @@ -170,7 +169,7 @@ suite("test_array_with_inverted_index_all_type"){ "disable_auto_compaction" = "false" ); """ - + // mow key table with all type using standard parser for inverted index sql "DROP TABLE IF EXISTS ${indexTblNames[4]}" sql """ @@ -214,7 +213,7 @@ suite("test_array_with_inverted_index_all_type"){ "enable_unique_key_merge_on_write" = "true" ); """ - + // mow key table with all type using english parser for inverted index sql "DROP TABLE IF EXISTS ${indexTblNames[5]}" sql """ @@ -239,10 +238,10 @@ suite("test_array_with_inverted_index_all_type"){ "enable_unique_key_merge_on_write" = "true" ); """ - - - - + + + + def StreamLoad = { tableName, agg -> streamLoad { table tableName @@ -277,7 +276,7 @@ suite("test_array_with_inverted_index_all_type"){ } // query test - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ for (int i = 0; i < 6; i+=1) { def indexTblName = indexTblNames[i] diff --git a/regression-test/suites/inverted_index_p0/test_bm25_score.groovy b/regression-test/suites/inverted_index_p0/test_bm25_score.groovy index 3a8ad125dc5076..7985884d2cbd8a 100644 --- a/regression-test/suites/inverted_index_p0/test_bm25_score.groovy +++ b/regression-test/suites/inverted_index_p0/test_bm25_score.groovy @@ -17,7 +17,7 @@ suite("test_bm25_score", "p0") { sql "DROP TABLE IF EXISTS test_bm25_score" - + sql """ CREATE TABLE test_bm25_score ( `@timestamp` int(11) NULL COMMENT "", @@ -37,11 +37,11 @@ suite("test_bm25_score", "p0") { def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -76,7 +76,7 @@ suite("test_bm25_score", "p0") { load_httplogs_data.call('test_bm25_score', 'test_bm25_score', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ def explain_result = sql """ explain verbose select *, score() as score from test_bm25_score where request match_any 'button.03.gif' order by score limit 10; """ log.info("Explain verbose result: ${explain_result}") @@ -93,7 +93,7 @@ suite("test_bm25_score", "p0") { qt_sql """ select *, score() as score from test_bm25_score where request match_all 'button.03.gif' order by score limit 10; """ qt_sql """ select *, score() as score from test_bm25_score where request match_phrase 'button.03.gif' order by score limit 10; """ - sql """ + sql """ (select *, score() as score from test_bm25_score where request match_any 'button.03.gif' order by score limit 5) union all (select *, score() as score from test_bm25_score where request match_any 'test' order by score limit 5); @@ -148,7 +148,7 @@ suite("test_bm25_score", "p0") { } test { - sql """ + sql """ (select score() as score from test_bm25_score where request match_any 'button.03.gif') union all (select score() as score from test_bm25_score where request match_any 'test'); @@ -210,7 +210,7 @@ suite("test_bm25_score", "p0") { assertTrue(useTime <= OpTimeout, "wait_for_last_build_index_on_table_running timeout") return "wait_timeout" } - + if (!isCloudMode()) { try { sql "DROP TABLE IF EXISTS t1" @@ -218,7 +218,7 @@ suite("test_bm25_score", "p0") { sql """ insert into t1 values(2, 2, '{"key": "abc hhh"}'); """ sql """ sync """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ alter table t1 add index idx_v(v) USING INVERTED PROPERTIES("parser"="english", "support_phrase"=true); """ wait_for_latest_op_on_table_finish("t1", timeout) @@ -227,7 +227,7 @@ suite("test_bm25_score", "p0") { } try { - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_match_without_inverted_index = false; """ sql """ set default_variant_enable_typed_paths_to_sparse = false; """ sql """ set default_variant_enable_doc_mode = false; """ @@ -280,7 +280,7 @@ suite("test_bm25_score", "p0") { sql """ insert into t2 values(4,4, "hello world"); """ sql """ sync """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ alter table t2 add index idx_s(s) USING INVERTED PROPERTIES("parser"="english", "support_phrase"=true); """ wait_for_latest_op_on_table_finish("t2", timeout) diff --git a/regression-test/suites/inverted_index_p0/test_bm25_score_range_filter.groovy b/regression-test/suites/inverted_index_p0/test_bm25_score_range_filter.groovy index 240b67ef24ae5e..56aed446165818 100644 --- a/regression-test/suites/inverted_index_p0/test_bm25_score_range_filter.groovy +++ b/regression-test/suites/inverted_index_p0/test_bm25_score_range_filter.groovy @@ -43,7 +43,7 @@ suite("test_bm25_score_range_filter", "p0") { sql """ INSERT INTO ${tableName} VALUES (8, 'apple apple banana cherry'); """ sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // Test 1: Basic score range filter with GT (>) qt_score_gt """ diff --git a/regression-test/suites/inverted_index_p0/test_bm25_score_variant.groovy b/regression-test/suites/inverted_index_p0/test_bm25_score_variant.groovy index 885d311bdfc01a..8db0207a36495a 100644 --- a/regression-test/suites/inverted_index_p0/test_bm25_score_variant.groovy +++ b/regression-test/suites/inverted_index_p0/test_bm25_score_variant.groovy @@ -20,7 +20,7 @@ suite("test_bm25_score_variant", "p0") { return } - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_match_without_inverted_index = false """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ diff --git a/regression-test/suites/inverted_index_p0/test_chinese_analyzer.groovy b/regression-test/suites/inverted_index_p0/test_chinese_analyzer.groovy index 417c829ca80ab0..ac4ab96b118c83 100644 --- a/regression-test/suites/inverted_index_p0/test_chinese_analyzer.groovy +++ b/regression-test/suites/inverted_index_p0/test_chinese_analyzer.groovy @@ -42,7 +42,7 @@ suite("test_chinese_analyzer"){ "replication_allocation" = "tag.location.default: 1" ); """ - + def var_result = sql "show variables" logger.info("show variales result: " + var_result ) @@ -98,7 +98,7 @@ suite("test_chinese_analyzer"){ "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "INSERT INTO $indexTblName3 VALUES (1, '我来到北京清华大学'), (2, '我爱你中国'), (3, '人民可以得到更多实惠'), (4, '陕西省西安市高新区创业大厦A座,我的手机号码是12345678901,邮箱是12345678@qq.com,,ip是1.1.1.1,this information is created automatically.');" qt_sql "SELECT * FROM $indexTblName3 WHERE c MATCH_PHRASE '我爱你' ORDER BY id;" diff --git a/regression-test/suites/inverted_index_p0/test_complex_or_null_semantics.groovy b/regression-test/suites/inverted_index_p0/test_complex_or_null_semantics.groovy index de5f0efcb84ba1..1ad1942afa774a 100644 --- a/regression-test/suites/inverted_index_p0/test_complex_or_null_semantics.groovy +++ b/regression-test/suites/inverted_index_p0/test_complex_or_null_semantics.groovy @@ -79,7 +79,7 @@ suite("test_complex_or_null_semantics") { (30, 'Misc', 'Random content', 'Anonymous', 'Misc') """ - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" // Test 1: The core bug scenario - cross-field OR with one field NULL // title:ALL("Philosophy") OR content:ALL("Disney+ Hotstar") diff --git a/regression-test/suites/inverted_index_p0/test_compound.groovy b/regression-test/suites/inverted_index_p0/test_compound.groovy index e1f8034114ed3b..b2e1adf8d0da47 100644 --- a/regression-test/suites/inverted_index_p0/test_compound.groovy +++ b/regression-test/suites/inverted_index_p0/test_compound.groovy @@ -44,9 +44,9 @@ suite("test_compound", "p0"){ ); """ - sql """ - INSERT INTO $indexTblName VALUES - (1, '1', '1', '1'), + sql """ + INSERT INTO $indexTblName VALUES + (1, '1', '1', '1'), (2, '2', '2', '2'), (3, '3', '3', '3'), (4, '4', '4', '4'), @@ -56,8 +56,8 @@ suite("test_compound", "p0"){ (8, '8', '8', '8'), (9, '9', '9', '9'), (10, '10', '10', '10'); - """ - sql """ set enable_common_expr_pushdown = true """ + """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "SELECT count() FROM $indexTblName WHERE (id >= 2 AND id < 9) and (a match '2' or b match '5' and c match '5');" qt_sql "SELECT count() FROM $indexTblName WHERE (id >= 2 AND id < 9) and (a match '2' or b match '5' or c match '6');" diff --git a/regression-test/suites/inverted_index_p0/test_compound_1.groovy b/regression-test/suites/inverted_index_p0/test_compound_1.groovy index a8aca4b526bef1..d7307d61ca6082 100644 --- a/regression-test/suites/inverted_index_p0/test_compound_1.groovy +++ b/regression-test/suites/inverted_index_p0/test_compound_1.groovy @@ -41,11 +41,11 @@ suite("test_compound_1", "p0"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -80,15 +80,15 @@ suite("test_compound_1", "p0"){ load_httplogs_data.call(indexTbName, 'test_compound_1', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTbName} where (request match_phrase 'english' and clientip match_phrase '4' or request match_phrase 'images'); """ qt_sql """ select count() from ${indexTbName} where (request match_phrase 'hm' and clientip match_phrase '3' or request match_phrase 'gif'); """ qt_sql """ select count() from ${indexTbName} where (request match_phrase 'french' and clientip match_phrase '2' or request match_phrase 'jpg'); """ - qt_sql """ select /*+ SET_VAR(enable_common_expr_pushdown = false) */ count() from ${indexTbName} where (request match_phrase 'english' and clientip match_phrase '4' or request match_phrase 'images'); """ - qt_sql """ select /*+ SET_VAR(enable_common_expr_pushdown = false) */ count() from ${indexTbName} where (request match_phrase 'hm' and clientip match_phrase '3' or request match_phrase 'gif'); """ - qt_sql """ select /*+ SET_VAR(enable_common_expr_pushdown = false) */ count() from ${indexTbName} where (request match_phrase 'french' and clientip match_phrase '2' or request match_phrase 'jpg'); """ + qt_sql """ select /*+ SET_VAR(enable_segment_limit_pushdown = false) */ count() from ${indexTbName} where (request match_phrase 'english' and clientip match_phrase '4' or request match_phrase 'images'); """ + qt_sql """ select /*+ SET_VAR(enable_segment_limit_pushdown = false) */ count() from ${indexTbName} where (request match_phrase 'hm' and clientip match_phrase '3' or request match_phrase 'gif'); """ + qt_sql """ select /*+ SET_VAR(enable_segment_limit_pushdown = false) */ count() from ${indexTbName} where (request match_phrase 'french' and clientip match_phrase '2' or request match_phrase 'jpg'); """ } finally { //try_sql("DROP TABLE IF EXISTS ${testTable}") diff --git a/regression-test/suites/inverted_index_p0/test_compound_inlist.groovy b/regression-test/suites/inverted_index_p0/test_compound_inlist.groovy index d49b1df03c3a2e..2351cc22061fba 100644 --- a/regression-test/suites/inverted_index_p0/test_compound_inlist.groovy +++ b/regression-test/suites/inverted_index_p0/test_compound_inlist.groovy @@ -63,11 +63,11 @@ suite("test_compound_inlist", "nonConcurrent"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -103,11 +103,11 @@ suite("test_compound_inlist", "nonConcurrent"){ load_httplogs_data.call(indexTbName2, 'test_compound_list_2', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ - + qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 200)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 200)); """ @@ -122,7 +122,7 @@ suite("test_compound_inlist", "nonConcurrent"){ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) or status in (1, 2, 200)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) or status in (1, 2, 200)); """ - + qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ @@ -135,11 +135,11 @@ suite("test_compound_inlist", "nonConcurrent"){ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304, 200) and status not in (1, 2, 304)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304, 200) and status not in (1, 2, 304)); """ - sql """ set enable_common_expr_pushdown = false; """ - + sql """ set enable_segment_limit_pushdown = false; """ + qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ - + qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 200)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 200)); """ @@ -154,7 +154,7 @@ suite("test_compound_inlist", "nonConcurrent"){ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) or status in (1, 2, 200)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) or status in (1, 2, 200)); """ - + qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304)); """ @@ -167,7 +167,7 @@ suite("test_compound_inlist", "nonConcurrent"){ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName1} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304, 200) and status not in (1, 2, 304)); """ qt_sql """ select /*+ SET_VAR(inverted_index_skip_threshold = 0) */ count() from ${indexTbName2} where ((request match_phrase 'hm' and clientip match_phrase '1') or (request match_phrase 'jpg' and clientip match_phrase '2')) or (((request match_phrase 'images' and clientip match_phrase '3') or (request match_phrase 'english' and clientip match_phrase '4')) and status in (1, 2, 304, 200) and status not in (1, 2, 304)); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ } finally { //try_sql("DROP TABLE IF EXISTS ${testTable}") diff --git a/regression-test/suites/inverted_index_p0/test_count_on_index.groovy b/regression-test/suites/inverted_index_p0/test_count_on_index.groovy index 9823124df50589..334251a08758a1 100644 --- a/regression-test/suites/inverted_index_p0/test_count_on_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_count_on_index.groovy @@ -19,7 +19,7 @@ suite("test_count_on_index_httplogs", "p0") { // define a sql table def testTable_dup = "httplogs_dup" def testTable_unique = "httplogs_unique" - + def create_httplogs_dup_table = {testTablex -> // multi-line sql def result = sql """ @@ -92,14 +92,14 @@ suite("test_count_on_index_httplogs", "p0") { ); """ } - + def stream_load_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -141,7 +141,7 @@ suite("test_count_on_index_httplogs", "p0") { stream_load_data.call(testTable_unique, 'test_httplogs_load_count_on_index', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """set experimental_enable_nereids_planner=true;""" sql """set enable_fallback_to_original_planner=false;""" sql """analyze table ${testTable_dup} with sync"""; diff --git a/regression-test/suites/inverted_index_p0/test_count_on_index_2.groovy b/regression-test/suites/inverted_index_p0/test_count_on_index_2.groovy index 59e9904574c5d4..40b7d0524774ae 100644 --- a/regression-test/suites/inverted_index_p0/test_count_on_index_2.groovy +++ b/regression-test/suites/inverted_index_p0/test_count_on_index_2.groovy @@ -77,7 +77,7 @@ suite("test_count_on_index_2", "p0"){ ); """ - sql """ + sql """ INSERT INTO ${indexTbName3} VALUES (1, 1, 1), (2, 2, 2), @@ -113,11 +113,11 @@ suite("test_count_on_index_2", "p0"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -153,7 +153,7 @@ suite("test_count_on_index_2", "p0"){ load_httplogs_data.call(indexTbName2, indexTbName2, 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTbName1} where `@timestamp` >= 893964736 and `@timestamp` <= 893966453; """ qt_sql """ select count() from ${indexTbName2} where `@timestamp` >= 893964736 and `@timestamp` <= 893966453; """ diff --git a/regression-test/suites/inverted_index_p0/test_cross_field_or_with_null.groovy b/regression-test/suites/inverted_index_p0/test_cross_field_or_with_null.groovy index f345438033002e..410f5019ae7791 100644 --- a/regression-test/suites/inverted_index_p0/test_cross_field_or_with_null.groovy +++ b/regression-test/suites/inverted_index_p0/test_cross_field_or_with_null.groovy @@ -71,7 +71,7 @@ suite("test_cross_field_or_with_null") { // Test 1: Simple cross-field OR with NULL // title MATCH "Philosophy" OR content MATCH "Disney+ Hotstar" // Expected: Rows 1-16 (rows 1-15 have title match, row 16 has content match) - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" def result1_match = sql """ SELECT COUNT(*) FROM ${tableName} @@ -163,7 +163,7 @@ suite("test_cross_field_or_with_null") { logger.info("Test 5 passed: AND with cross-field OR containing NULL") // Test 6: Test with pushdown disabled (should also work correctly) - sql "SET enable_common_expr_pushdown = false" + sql "SET enable_segment_limit_pushdown = false" def result6_nopush = sql """ SELECT COUNT(*) FROM ${tableName} @@ -174,7 +174,7 @@ suite("test_cross_field_or_with_null") { logger.info("Test 6 passed: Query works correctly without pushdown") // Test 7: Multiple OR conditions with different NULL patterns - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" def result7_match = sql """ SELECT COUNT(*) FROM ${tableName} diff --git a/regression-test/suites/inverted_index_p0/test_delete.groovy b/regression-test/suites/inverted_index_p0/test_delete.groovy index 8cdb4cf859fc9c..05b532076228bd 100644 --- a/regression-test/suites/inverted_index_p0/test_delete.groovy +++ b/regression-test/suites/inverted_index_p0/test_delete.groovy @@ -46,7 +46,7 @@ suite("test_delete"){ "disable_auto_compaction" = "false" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ INSERT INTO `${indexTblName}`(`a`, `b`, `c`) VALUES ('1', '6afef581285b6608bf80d5a4e46cf839', 'aaa'), ('2', '48a33ec3453a28bce84b8f96fe161956', 'bbb'), ('3', '021603e7dcfe65d44af0efd0e5aee154', 'ccc'), ('4', 'ee27ee1da291e46403c408e220bed6e1', 'ddd'), diff --git a/regression-test/suites/inverted_index_p0/test_empty_string_match.groovy b/regression-test/suites/inverted_index_p0/test_empty_string_match.groovy index 798e0100f1beb9..aa3c7e916e27e9 100644 --- a/regression-test/suites/inverted_index_p0/test_empty_string_match.groovy +++ b/regression-test/suites/inverted_index_p0/test_empty_string_match.groovy @@ -40,7 +40,7 @@ suite("test_empty_string_match", "p0") { (4, 'data', 'some text'); """ - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" // Test 1: Empty string match on keyword index (index path) // Should match rows where keyword_col is empty string (rows 1 and 3) diff --git a/regression-test/suites/inverted_index_p0/test_equal_on_fulltext.groovy b/regression-test/suites/inverted_index_p0/test_equal_on_fulltext.groovy index debb5b07e35fc7..fa0e24992bec6b 100644 --- a/regression-test/suites/inverted_index_p0/test_equal_on_fulltext.groovy +++ b/regression-test/suites/inverted_index_p0/test_equal_on_fulltext.groovy @@ -42,10 +42,10 @@ suite("test_equal_on_fulltext", "p0"){ "replication_allocation" = "tag.location.default: 1" ); """ - + def var_result = sql "show variables" logger.info("show variales result: " + var_result ) - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "INSERT INTO $indexTblName VALUES (1, 'I am the person'), (2, 'I am a person'), (3, 'I am your person');" qt_sql "SELECT * FROM $indexTblName WHERE c = 'I am a person' ORDER BY id;" diff --git a/regression-test/suites/inverted_index_p0/test_expr_in_null.groovy b/regression-test/suites/inverted_index_p0/test_expr_in_null.groovy index bee677630ce209..f5291e3c4e9162 100644 --- a/regression-test/suites/inverted_index_p0/test_expr_in_null.groovy +++ b/regression-test/suites/inverted_index_p0/test_expr_in_null.groovy @@ -36,8 +36,8 @@ suite("test_expr_in_null", "p0"){ insert into ${indexTblName} values (3, '192.168.1.3'); """ - - sql """ set enable_common_expr_pushdown = true """ + + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_inverted_index_query = true """ qt_sql """ diff --git a/regression-test/suites/inverted_index_p0/test_float_double.groovy b/regression-test/suites/inverted_index_p0/test_float_double.groovy index b8f46d0a17f45c..64974fe0fe7f92 100644 --- a/regression-test/suites/inverted_index_p0/test_float_double.groovy +++ b/regression-test/suites/inverted_index_p0/test_float_double.groovy @@ -21,7 +21,7 @@ suite("test_float_double", "p0, nonConcurrent"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set inverted_index_skip_threshold = 0 """ def queryAndCheck = { String sqlQuery, int expectedFilteredRows = -1, boolean checkFilterUsed = true -> @@ -49,7 +49,7 @@ suite("test_float_double", "p0, nonConcurrent"){ INDEX idx_double_col (double_col) USING INVERTED ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true") """ - + sql """ insert into ${tableName} values (1, 1.5, 1.5239849328948), (2, 2.23, 2.239849328948), (3, 3.02, 3.029849328948) """ @@ -61,5 +61,5 @@ suite("test_float_double", "p0, nonConcurrent"){ queryAndCheck("select count() from ${tableName} where float_col = cast(1.5 as float)", 2) queryAndCheck("select count() from ${tableName} where float_col = cast(2.23 as float)", 2) queryAndCheck("select count() from ${tableName} where float_col = cast(3.02 as float)", 2) - + } diff --git a/regression-test/suites/inverted_index_p0/test_ignore_above_in_index.groovy b/regression-test/suites/inverted_index_p0/test_ignore_above_in_index.groovy index bde764fa332e1f..5c193dc94edb02 100644 --- a/regression-test/suites/inverted_index_p0/test_ignore_above_in_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_ignore_above_in_index.groovy @@ -65,7 +65,7 @@ suite("test_ignore_above_in_index", "p0") { // load the json data streamLoad { table "${tableName2}" - + set 'read_json_by_line', 'true' set 'format', 'json' file 'documents-1000.json' // import json file @@ -84,7 +84,7 @@ suite("test_ignore_above_in_index", "p0") { assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) } } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql "select count() from ${tableName2} where clientip > '17.0';" qt_sql "select count() from ${tableName2} where clientip > '17.0' or status = 200;" } diff --git a/regression-test/suites/inverted_index_p0/test_index_chinese_column.groovy b/regression-test/suites/inverted_index_p0/test_index_chinese_column.groovy index e0221fb67a89c6..de9a1a845ed678 100644 --- a/regression-test/suites/inverted_index_p0/test_index_chinese_column.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_chinese_column.groovy @@ -38,7 +38,7 @@ suite("test_index_chinese_column", "inverted_index_select"){ def table_name_v2 = "test_index_chinese_column_v2" sql "set enable_unicode_name_support=true" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ createAndInsertData(table_name_v1, "V1") createAndInsertData(table_name_v2, "V2") diff --git a/regression-test/suites/inverted_index_p0/test_index_complex_match.groovy b/regression-test/suites/inverted_index_p0/test_index_complex_match.groovy index 0b77c4aec51a27..bb46de3b75e184 100644 --- a/regression-test/suites/inverted_index_p0/test_index_complex_match.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_complex_match.groovy @@ -61,11 +61,11 @@ suite("test_index_complex_match", "p0"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -101,7 +101,7 @@ suite("test_index_complex_match", "p0"){ load_httplogs_data.call(indexTbName2, indexTbName2, 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTbName1} where clientip match_phrase '247.37.0.0'; """ qt_sql """ select count() from ${indexTbName1} where clientip match_phrase_prefix '247'; """ @@ -111,7 +111,7 @@ suite("test_index_complex_match", "p0"){ qt_sql """ select count() from ${indexTbName1} where request match_phrase_prefix 'na'; """ qt_sql """ select count() from ${indexTbName1} where request match_regexp 'ag'; """ - + try { sql """ select count() from ${indexTbName2} where request match_phrase 'hm'; """ } catch (Exception e) { diff --git a/regression-test/suites/inverted_index_p0/test_index_delete.groovy b/regression-test/suites/inverted_index_p0/test_index_delete.groovy index 8b9474d937b077..70fa3e59d1af75 100644 --- a/regression-test/suites/inverted_index_p0/test_index_delete.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_delete.groovy @@ -49,7 +49,7 @@ suite("test_index_delete", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ delete from ${indexTbName1} where a >= 9; """ sql "sync" @@ -57,7 +57,7 @@ suite("test_index_delete", "p0") { qt_sql """ select count() from ${indexTbName1} where a >= 1 and a <= 10; """ qt_sql """ select count() from ${indexTbName1} where a >= 1; """ qt_sql """ select count() from ${indexTbName1} where a <= 10; """ - + sql """ delete from ${indexTbName1} where b = '3'; """ sql "sync" diff --git a/regression-test/suites/inverted_index_p0/test_index_empty_string.groovy b/regression-test/suites/inverted_index_p0/test_index_empty_string.groovy index 05232ec6bc6e68..32c2365abe4b49 100644 --- a/regression-test/suites/inverted_index_p0/test_index_empty_string.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_empty_string.groovy @@ -41,13 +41,13 @@ suite("test_index_empty_string", "p0"){ "replication_allocation" = "tag.location.default: 1" ); """ - - sql """ - INSERT INTO $indexTblName VALUES - (1, '', '1'), + + sql """ + INSERT INTO $indexTblName VALUES + (1, '', '1'), (2, '2', ''); - """ - sql """ set enable_common_expr_pushdown = true """ + """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "SELECT count() FROM $indexTblName WHERE a match '';" qt_sql "SELECT count() FROM $indexTblName WHERE b match '';" } diff --git a/regression-test/suites/inverted_index_p0/test_index_equal_select.groovy b/regression-test/suites/inverted_index_p0/test_index_equal_select.groovy index c062b7438c5cc7..3a9008e8343e80 100644 --- a/regression-test/suites/inverted_index_p0/test_index_equal_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_equal_select.groovy @@ -16,7 +16,7 @@ // under the License. suite("test_index_equal_select", "inverted_index_select"){ - + def indexTbName1 = "index_equal_select" sql "DROP TABLE IF EXISTS ${indexTbName1}" @@ -54,7 +54,7 @@ suite("test_index_equal_select", "inverted_index_select"){ ("san zhang", 10, "grade 5", "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", "", "", "", ""), ("li sisi", 11, "grade 6", "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "", "li ba", "li liuliu", "") """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // case1: test equal // case1.0: test index coulume equal ‘’ diff --git a/regression-test/suites/inverted_index_p0/test_index_key_match_select.groovy b/regression-test/suites/inverted_index_p0/test_index_key_match_select.groovy index a9d9df943f8625..bdc43022a4f954 100644 --- a/regression-test/suites/inverted_index_p0/test_index_key_match_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_key_match_select.groovy @@ -44,7 +44,7 @@ suite("test_index_key_match_select", "inverted_index_select"){ ("u3", ["u1"]), ("u4", ["u3"]) """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "SELECT * FROM ${indexTbName1} WHERE user MATCH_ANY 'u1, u2' ORDER BY user LIMIT 10;" qt_sql "SELECT * FROM ${indexTbName1} WHERE user MATCH_ANY 'u1, u2, u3' ORDER BY user LIMIT 10;" } \ No newline at end of file diff --git a/regression-test/suites/inverted_index_p0/test_index_lowercase_fault_injection.groovy b/regression-test/suites/inverted_index_p0/test_index_lowercase_fault_injection.groovy index 51f0eea5d88623..f40c889a171fa3 100644 --- a/regression-test/suites/inverted_index_p0/test_index_lowercase_fault_injection.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_lowercase_fault_injection.groovy @@ -63,7 +63,7 @@ suite("test_index_lowercase_fault_injection", "nonConcurrent") { sql """ INSERT INTO ${testTable} VALUES (893964653, '232.0.0.0', 'GET /images/hm_bg.jpg HTTP/1.0', 200, 3781); """ sql 'sync' - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${testTable} where (request match 'HTTP'); """ qt_sql """ select count() from ${testTable} where (request match 'http'); """ diff --git a/regression-test/suites/inverted_index_p0/test_index_match_phrase.groovy b/regression-test/suites/inverted_index_p0/test_index_match_phrase.groovy index f7e793f84907b7..9d1f7ad2fea9d6 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_phrase.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_phrase.groovy @@ -106,7 +106,7 @@ suite("test_index_match_phrase_select", "inverted_index_select"){ ("san zhang", "grade 5", "", "", "", 10, "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", ""), ("li sisi", "grade 6", "li ba", "li liuliu", "", 11, "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "") """ - + for (int i = 0; i < 2; i++) { logger.info("select table with index times " + i) // case1: match phrase with index but support_phrase=fasle @@ -155,7 +155,7 @@ suite("test_index_match_phrase_select", "inverted_index_select"){ wait_for_build_index_on_partition_finish(indexTbName1, timeout) } } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1: test match_phrase "" try { diff --git a/regression-test/suites/inverted_index_p0/test_index_match_phrase_edge.groovy b/regression-test/suites/inverted_index_p0/test_index_match_phrase_edge.groovy index 189f1fe5216606..ccc2d4fb98fc86 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_phrase_edge.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_phrase_edge.groovy @@ -56,7 +56,7 @@ suite("test_index_match_phrase_edge", "nonConcurrent"){ try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") qt_sql """ select * from ${indexTbName1} where b match_phrase_edge 'x.h'; """ @@ -121,11 +121,11 @@ suite("test_index_match_phrase_edge", "nonConcurrent"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -161,7 +161,7 @@ suite("test_index_match_phrase_edge", "nonConcurrent"){ load_httplogs_data.call(indexTbName3, indexTbName3, 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql "set disable_nereids_rules='CHECK_MATCH_EXPRESSION';" GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") diff --git a/regression-test/suites/inverted_index_p0/test_index_match_phrase_ordered.groovy b/regression-test/suites/inverted_index_p0/test_index_match_phrase_ordered.groovy index 0f563835e86680..87f61c29752925 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_phrase_ordered.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_phrase_ordered.groovy @@ -57,11 +57,11 @@ suite("test_index_match_phrase_ordered", "nonConcurrent"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -108,7 +108,7 @@ suite("test_index_match_phrase_ordered", "nonConcurrent"){ load_httplogs_data.call(indexTbName2, 'test_index_match_phrase_ordered_2', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") qt_sql """ select count() from ${indexTbName1} where b match_phrase 'the lazy'; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix.groovy b/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix.groovy index 3906065e8d395d..8391f49be2d48b 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix.groovy @@ -58,11 +58,11 @@ suite("test_index_match_phrase_prefix", "nonConcurrent"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -98,7 +98,7 @@ suite("test_index_match_phrase_prefix", "nonConcurrent"){ load_httplogs_data.call(indexTbName2, indexTbName2, 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") qt_sql """ select count() from ${indexTbName1} where request match_phrase_prefix 'ima'; """ qt_sql """ select count() from ${indexTbName1} where request match_phrase_prefix 'images/h'; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix_1.groovy b/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix_1.groovy index 5ee38c9e403bdc..057d89291becc5 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix_1.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_phrase_prefix_1.groovy @@ -51,7 +51,7 @@ suite("test_index_match_phrase_prefix_1", "nonConcurrent"){ try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") qt_sql """ select count() from ${indexTbName1} where c match_phrase_prefix 'O1704361998540E2Cemx9S'; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_match_phrase_slop.groovy b/regression-test/suites/inverted_index_p0/test_index_match_phrase_slop.groovy index 5f772e0e7a44fb..3f5ea621483bf9 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_phrase_slop.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_phrase_slop.groovy @@ -41,11 +41,11 @@ suite("test_index_match_phrase_slop", "nonConcurrent"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -82,7 +82,7 @@ suite("test_index_match_phrase_slop", "nonConcurrent"){ sql """ INSERT INTO ${indexTbName1} VALUES (1, "127.0.0.1", "I'm glad I kept my fingers crossed ~4", 1, 1); """ sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") qt_sql """ select count() from ${indexTbName1} where request match_phrase 'get jpg'; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_match_regexp.groovy b/regression-test/suites/inverted_index_p0/test_index_match_regexp.groovy index 00af9113150ee7..2882696d06f0bc 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_regexp.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_regexp.groovy @@ -40,11 +40,11 @@ suite("test_index_match_regexp", "nonConcurrent"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -79,7 +79,7 @@ suite("test_index_match_regexp", "nonConcurrent"){ load_httplogs_data.call(indexTbName1, 'test_index_match_regexp', 'true', 'json', 'documents-1000.json') sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") qt_sql """ select count() from test_index_match_regexp where request match_regexp ''; """ @@ -92,7 +92,7 @@ suite("test_index_match_regexp", "nonConcurrent"){ sql """ set inverted_index_max_expansions = 1; """ qt_sql """ select count() from test_index_match_regexp where request match_regexp 'b'; """ - + sql """ set inverted_index_max_expansions = 50; """ qt_sql """ select count() from test_index_match_regexp where request match_regexp 'b'; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_match_select.groovy b/regression-test/suites/inverted_index_p0/test_index_match_select.groovy index 45eda4f1ddbf35..05aa17c2de411d 100644 --- a/regression-test/suites/inverted_index_p0/test_index_match_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_match_select.groovy @@ -106,7 +106,7 @@ suite("test_index_match_select", "inverted_index_select"){ ("san zhang", "grade 5", "", "", "", 10, "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", ""), ("li sisi", "grade 6", "li ba", "li liuliu", "", 11, "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "") """ - + for (int i = 0; i < 2; i++) { logger.info("select table with index times " + i) // case 1 @@ -154,7 +154,7 @@ suite("test_index_match_select", "inverted_index_select"){ wait_for_build_index_on_partition_finish(indexTbName1, timeout) } } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1: match term // case1.0 test match "" @@ -248,7 +248,7 @@ suite("test_index_match_select", "inverted_index_select"){ // case6: test term and phrase mix select qt_sql """ select * from ${indexTbName1} where - ${varchar_colume1} match_any 'zhang san' and + ${varchar_colume1} match_any 'zhang san' and ${varchar_colume2} = 'grade 5' or ${varchar_colume3} match_all "zhang yi" order by name diff --git a/regression-test/suites/inverted_index_p0/test_index_multi_match.groovy b/regression-test/suites/inverted_index_p0/test_index_multi_match.groovy index 75917b7e88a9a3..fdfbc5c57ff87a 100644 --- a/regression-test/suites/inverted_index_p0/test_index_multi_match.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_multi_match.groovy @@ -53,11 +53,11 @@ suite("test_index_multi_match", "p0"){ def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -101,7 +101,7 @@ suite("test_index_multi_match", "p0"){ sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTbName1} where (clientip match_phrase_prefix '2'); """ qt_sql """ select count() from ${indexTbName1} where (clientip match_phrase_prefix '2' or request match_phrase_prefix '2'); """ @@ -123,7 +123,7 @@ suite("test_index_multi_match", "p0"){ qt_sql """ select count() from ${indexTbName4} where multi_match(clientip, request, status, size, 'phrase_prefix', '2'); """ qt_sql """ select count() from ${indexTbName4} where multi_match(clientip, request, status, size, 'phrase_prefix', 'a'); """ - // match_any + // match_any qt_sql """ select count() from ${indexTbName1} where (clientip match_any '2' or request match_any '2' or status match_any '2' or size match_any '2'); """ qt_sql """ select count() from ${indexTbName2} where (clientip match_any '2' or request match_any '2' or status match_any '2' or size match_any '2'); """ qt_sql """ select count() from ${indexTbName3} where (clientip match_any '2' or request match_any '2' or status match_any '2' or size match_any '2'); """ @@ -142,7 +142,7 @@ suite("test_index_multi_match", "p0"){ qt_sql """ select count() from ${indexTbName3} where multi_match(clientip, request, status, size, 'any', 'a'); """ qt_sql """ select count() from ${indexTbName4} where multi_match(clientip, request, status, size, 'any', 'a'); """ - // match_all + // match_all qt_sql """ select count() from ${indexTbName1} where (clientip match_all '2' or request match_all '2' or status match_all '2' or size match_all '2'); """ qt_sql """ select count() from ${indexTbName2} where (clientip match_all '2' or request match_all '2' or status match_all '2' or size match_all '2'); """ qt_sql """ select count() from ${indexTbName3} where (clientip match_all '2' or request match_all '2' or status match_all '2' or size match_all '2'); """ diff --git a/regression-test/suites/inverted_index_p0/test_index_no_need_read_data.groovy b/regression-test/suites/inverted_index_p0/test_index_no_need_read_data.groovy index c0e205ec953363..6bea50c1819501 100644 --- a/regression-test/suites/inverted_index_p0/test_index_no_need_read_data.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_no_need_read_data.groovy @@ -53,7 +53,7 @@ suite("test_index_no_need_read_data", "inverted_index_select"){ """ // case1: enable nereids planner - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_select_nereids_0 "SELECT * FROM ${table1} ORDER BY id" qt_select_nereids_1 "SELECT count() FROM ${table1} WHERE n > 100" diff --git a/regression-test/suites/inverted_index_p0/test_index_null.groovy b/regression-test/suites/inverted_index_p0/test_index_null.groovy index 82cf9a3f95fd5d..2a398763744337 100644 --- a/regression-test/suites/inverted_index_p0/test_index_null.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_null.groovy @@ -42,7 +42,7 @@ suite("test__null_index", "inverted_index"){ "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql "INSERT INTO $indexTblName VALUES (1, []), (2, []), (3, []);" qt_sql "SELECT * FROM $indexTblName WHERE value match_all 'a';" } diff --git a/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy index 6e4f316888522b..74c19e99ba3bfc 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy @@ -117,7 +117,7 @@ suite("test_index_range_between_select", "inverted_index_select"){ """ wait_for_latest_op_on_table_finish(indexTbName1, timeout) } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1: test simple between case // case1.0: test data index colume select in specific between condition @@ -267,17 +267,17 @@ suite("test_index_range_between_select", "inverted_index_select"){ qt_sql """ select * from ${indexTbName1} where - ${varchar_colume1} between 'li sisi' and 'zhang san yi' and - ${varchar_colume2} between 'grade 5' and 'grade 6' or + ${varchar_colume1} between 'li sisi' and 'zhang san yi' and + ${varchar_colume2} between 'grade 5' and 'grade 6' or ${varchar_colume3} between "li liuliu" and "zhang yi" order by name; """ qt_sql """ select * from ${indexTbName1} where - ${varchar_colume1} between 'li sisi' and 'zhang san yi' and + ${varchar_colume1} between 'li sisi' and 'zhang san yi' and ${string_colume1} between "A quiet little boy" and "good at handiwork and beaty" and - ${char_colume1} between "tall:150cm, weight: 40kg, hobbies: sing, dancing, running" and "tall:100cm, weight: 30kg, hobbies:" or + ${char_colume1} between "tall:150cm, weight: 40kg, hobbies: sing, dancing, running" and "tall:100cm, weight: 30kg, hobbies:" or ${text_colume1} between "i just want go outside" and "learn makes me happy" order by name; """ @@ -285,9 +285,9 @@ suite("test_index_range_between_select", "inverted_index_select"){ qt_sql """ select * from ${indexTbName1} where - ${date_colume1} between "2016-10-01" and "2018-10-01" and - ${int_colume1} between 11 and 9 or - ${varchar_colume3} between "li liuliu" and "zhang yi" or + ${date_colume1} between "2016-10-01" and "2018-10-01" and + ${int_colume1} between 11 and 9 or + ${varchar_colume3} between "li liuliu" and "zhang yi" or ${string_colume1} between "A quiet little boy" and "good at handiwork and beaty" order by name; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_range_bigger_and_equal_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_bigger_and_equal_select.groovy index 41333fdca0df51..efabbcb7109770 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_bigger_and_equal_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_bigger_and_equal_select.groovy @@ -54,7 +54,7 @@ suite("test_index_range_bigger_and_equal_select", "inverted_index_select"){ ("san zhang", 10, "grade 5", "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", "", "", "", ""), ("li sisi", 11, "grade 6", "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "", "li ba", "li liuliu", "") """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1. test >= // case1.0: test only >= qt_sql "select * from ${indexTbName1} where name>='' order by name " diff --git a/regression-test/suites/inverted_index_p0/test_index_range_bigger_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_bigger_select.groovy index d84313c2da3071..d2de6645772013 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_bigger_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_bigger_select.groovy @@ -54,7 +54,7 @@ suite("test_index_range_bigger_select", "inverted_index_select"){ ("san zhang", 10, "grade 5", "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", "", "", "", ""), ("li sisi", 11, "grade 6", "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "", "li ba", "li liuliu", "") """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1. test > // case1.0: test only > qt_sql "select * from ${indexTbName1} where name>'' order by name " diff --git a/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy index a169aef3fe595a..5920ac8515d92e 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy @@ -153,7 +153,7 @@ suite("test_index_range_in_select", "inverted_index_select"){ wait_for_build_index_on_partition_finish(indexTbName1, timeout) } } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1: select in // case1.0: select in specific condition @@ -221,7 +221,7 @@ suite("test_index_range_in_select", "inverted_index_select"){ ${char_colume1} in ("tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "tall:100cm, weight: 30kg, hobbies:") order by name """ - + // case2.3: string inverted colume mix select // case2.3.0: standard inverted colume(different type) mix select qt_sql """ diff --git a/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy index 179ac47b28c9c6..bb9d0dba14181c 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy @@ -111,7 +111,7 @@ suite("test_index_range_not_in_select", "inverted_index_select"){ } assertTrue(useTime <= OpTimeout, "wait_for_latest_build_index_on_partition_finish timeout") } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ for (int i = 0; i < 2; i++) { logger.info("select table with index times " + i) diff --git a/regression-test/suites/inverted_index_p0/test_index_range_smaller_and_equal_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_smaller_and_equal_select.groovy index b413375445923d..1c740fd7e2a664 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_smaller_and_equal_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_smaller_and_equal_select.groovy @@ -54,7 +54,7 @@ suite("test_index_range_smaller_and_equal_select", "inverted_index_select"){ ("san zhang", 10, "grade 5", "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", "", "", "", ""), ("li sisi", 11, "grade 6", "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "", "li ba", "li liuliu", "") """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1. test <= // case1.0: test only <= qt_sql "select * from ${indexTbName1} where name<='' order by name" @@ -72,7 +72,7 @@ suite("test_index_range_smaller_and_equal_select", "inverted_index_select"){ qt_sql """ select * from ${indexTbName1} where selfComment<="" order by name""" qt_sql """ select * from ${indexTbName1} where tearchComment<="" order by name""" qt_sql """ select * from ${indexTbName1} where fatherName<="" order by name""" - + // case1.1: test only <= some condition qt_sql "select * from ${indexTbName1} where name<='zhang' order by name" qt_sql "select * from ${indexTbName1} where age<=8 order by name" @@ -81,7 +81,7 @@ suite("test_index_range_smaller_and_equal_select", "inverted_index_select"){ qt_sql "select * from ${indexTbName1} where selfComment<='i like' order by name" qt_sql "select * from ${indexTbName1} where tearchComment<='A' order by name" qt_sql "select * from ${indexTbName1} where fatherName<= 'zhang yi' order by name" - + // case1.1 test index colume and common colume mix select qt_sql """ select * from ${indexTbName1} where name<='zhang' and registDate="2017-10-01" order by name""" qt_sql """ select * from ${indexTbName1} where age<=8 and registDate="2017-10-01" order by name""" @@ -98,7 +98,7 @@ suite("test_index_range_smaller_and_equal_select", "inverted_index_select"){ qt_sql """ select * from ${indexTbName1} where selfComment<='i like' or registDate="2017-10-01" order by name""" qt_sql """ select * from ${indexTbName1} where tearchComment<='A' or registDate="2017-10-01" order by name""" qt_sql """ select * from ${indexTbName1} where fatherName<= 'zhang yi' or registDate="2017-10-01" order by name""" - + // case1.2 test different index mix select // case1.2.0 data index colume and string index mix select; qt_sql """ select * from ${indexTbName1} where age<=10 and name<="zhang san" order by name""" diff --git a/regression-test/suites/inverted_index_p0/test_index_range_smaller_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_smaller_select.groovy index 9c9f0b120d6197..2e1ce2f263faeb 100644 --- a/regression-test/suites/inverted_index_p0/test_index_range_smaller_select.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_range_smaller_select.groovy @@ -54,7 +54,7 @@ suite("test_index_range_smaller_select", "inverted_index_select"){ ("san zhang", 10, "grade 5", "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", "", "", "", ""), ("li sisi", 11, "grade 6", "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "", "li ba", "li liuliu", "") """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // case1. test < // case1.0: test only < sql "select * from ${indexTbName1} where name<'' order by name " diff --git a/regression-test/suites/inverted_index_p0/test_index_rqg_bug.groovy b/regression-test/suites/inverted_index_p0/test_index_rqg_bug.groovy index 02762e57983aba..aeadc38c86eada 100644 --- a/regression-test/suites/inverted_index_p0/test_index_rqg_bug.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_rqg_bug.groovy @@ -142,30 +142,30 @@ suite("test_index_rqg_bug", "test_index_rqg_bug"){ (48, -10, 7, 3, 4, -1290467110130692882, NULL, -5421887030808227301, 2147894047624029750, '2023-12-20', '2026-02-18', '2023-12-10', '2024-02-18', 'v', 'f', 'u', 'z', 'w', 'l', 'i', 'b'), (49, 4, -10, -10, -4, 7177870619817484302, 2010854013707344984, 515636226818986547, -4617727694631456148, '2023-12-14', '2024-01-09', '2023-12-11', '2024-01-08', 'k', 'o', 'r', 'h', 'x', 'v', 'm', 'r'); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_select_bug_1 """ - SELECT - MIN(DISTINCT table1.col_date_undef_signed_not_null) AS field1, + SELECT + MIN(DISTINCT table1.col_date_undef_signed_not_null) AS field1, TO_DATE( - CASE - WHEN table1.col_date_undef_signed_not_null != DATE_ADD(table1.col_date_undef_signed_not_null_index_inverted, INTERVAL 7 DAY) - THEN DATE_SUB(table1.col_date_undef_signed_not_null_index_inverted, INTERVAL 8 DAY) - ELSE DATE_ADD(table1.col_date_undef_signed_not_null, INTERVAL 365 DAY) + CASE + WHEN table1.col_date_undef_signed_not_null != DATE_ADD(table1.col_date_undef_signed_not_null_index_inverted, INTERVAL 7 DAY) + THEN DATE_SUB(table1.col_date_undef_signed_not_null_index_inverted, INTERVAL 8 DAY) + ELSE DATE_ADD(table1.col_date_undef_signed_not_null, INTERVAL 365 DAY) END ) AS field2 - FROM + FROM ${table1} AS table1 - WHERE - ( - (table1.col_int_undef_signed_not_null_index_inverted != 6) - OR table1.col_date_undef_signed_not_null NOT IN ('2018-11-14') + WHERE + ( + (table1.col_int_undef_signed_not_null_index_inverted != 6) + OR table1.col_date_undef_signed_not_null NOT IN ('2018-11-14') OR table1.col_int_undef_signed_index_inverted <> 9 - ) - GROUP BY - field2 - ORDER BY - field2 - LIMIT 1000 + ) + GROUP BY + field2 + ORDER BY + field2 + LIMIT 1000 OFFSET 5; """ diff --git a/regression-test/suites/inverted_index_p0/test_index_rqg_bug2.groovy b/regression-test/suites/inverted_index_p0/test_index_rqg_bug2.groovy index e1411a70437a3e..3db864cbcbfc86 100644 --- a/regression-test/suites/inverted_index_p0/test_index_rqg_bug2.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_rqg_bug2.groovy @@ -82,7 +82,7 @@ suite("test_index_rqg_bug2", "test_index_rqg_bug"){ sql """ INSERT INTO ${table1}(pk,col_int_undef_signed,col_int_undef_signed_index_inverted,col_int_undef_signed_not_null,col_int_undef_signed_not_null_index_inverted,col_bigint_undef_signed,col_bigint_undef_signed_index_inverted,col_bigint_undef_signed_not_null,col_bigint_undef_signed_not_null_index_inverted,col_date_undef_signed,col_date_undef_signed_index_inverted,col_date_undef_signed_not_null,col_date_undef_signed_not_null_index_inverted,col_varchar_10__undef_signed,col_varchar_10__undef_signed_index_inverted,col_varchar_10__undef_signed_not_null,col_varchar_10__undef_signed_not_null_index_inverted,col_varchar_1024__undef_signed,col_varchar_1024__undef_signed_index_inverted,col_varchar_1024__undef_signed_not_null,col_varchar_1024__undef_signed_not_null_index_inverted,col_array_bigint__undef_signed,col_array_bigint__undef_signed_index_inverted,col_array_bigint__undef_signed_not_null,col_array_bigint__undef_signed_not_null_index_inverted,col_array_varchar_64___undef_signed,col_array_varchar_64___undef_signed_index_inverted,col_array_varchar_64___undef_signed_not_null,col_array_varchar_64___undef_signed_not_null_index_inverted,col_array_date__undef_signed,col_array_date__undef_signed_index_inverted,col_array_date__undef_signed_not_null,col_array_date__undef_signed_not_null_index_inverted) values (0,0,3,9,0,4421173,-8231206,-7461,2743,'2023-12-19','2023-12-15','2024-01-08','2025-06-18','e','h','x','p',null,null,'s','g',[1005281, 5740, 15054, null],[-5954, -19854, null, null, 3273993, -743, 337700, null, -1752691, 23217, 3506706],[null, null, -5265, null, 860851, -29957, null, -9710, 10115, -3146277, 11735, null, null, 18080, 7566486, null, -6484648, null, -4857664, 15816, 9875, -2686449, -941314, 8627, null, -7359, -4659, 28539, -16240, null, 17323, -2496932, 2292142, null, 11991, -8504, -9360, -8096795, 14727, null, null, 3306678, 14025, null, -6519359, 5625825, 6130567, null, null, null, null, null, 17792, null, -7991400, null, null, 22846, -28743],[-12355, -4008, 7917948, -2452821, null, 16207, 28195],['i', 'x', 'd', 't', 'e'],['l', null, 'l'],['m', 'w', null, 'd', 'y', 'f', 'c', 'q', 't', 'q'],[null, 'v', null, 'b', 'a', 'c', 'v', 'o', 'w', 'r', 'k'],["2025-02-18"],["2024-02-18", null, "2023-12-11", "2025-06-18", "2023-12-15", null, "2026-02-18", "2026-02-18", "2023-12-17"],["2024-01-17", "2023-12-10", "2023-12-09", "2024-01-09", "2026-02-18"],["2023-12-13", null, "2023-12-13"]),(1,2,2,3,3,-8059,null,5394,-1559484,'2023-12-15','2024-01-08','2025-06-18','2023-12-10','p','i','n','a','c','j','n','r',[null, 3283380, 3627449, -30527, -2736105, -10860, null],[null, 2459969, null, null, -3092713, 4381894, null, 1817602, null, 1706544, 16985],[null, 3991, -3206489],[-3022450, 1639, -5855269, null, null, -3561, -2618, 21678, 22004, 6803800, -357540, -2566523, -19982, 7530447, -1828804, 14471, null, null, -613238, 8073, -27918, null, null, 6211343, 18433, null, 30493, null, 8284, 1765944, 2897396, 15644, -3006094, null, 19552, null, 4895858, 15398, null, null, -8101195, 5945, null, -2924303],['z', null, 'q', 'd', null, null],['m', 'w', 'i', 'p', null, 'y', 'h', null, 'e', 'l', 'c', 'y', null, null, null, 's', 'i', 'g', 'l', 'b', 'v', 'c', null, 'd', 'a', 'j', 'f', 'h', 't', 'f', 'l'],['m', 'm', 'c', null, 's', 'z', null],['o', 'g', 'v', 'o', null, 'p', 'a', null, 's', null, 'k', null, 'i', 'b', 't', null, 's', 'm', 't', 'k', null, 'v', 'v', 'l', 'p', 'w', 'h', 'z'],["2024-01-17", "2025-06-18", "2024-01-19", "2024-01-09", "2023-12-18", "2024-01-08", "2023-12-18", "2025-02-18", "2025-06-18", "2025-06-18", "2026-01-18", "2024-01-31", "2024-01-08", "2024-02-18", "2024-02-18", "2023-12-09", "2023-12-16", null, null, "2024-02-18", "2024-01-17", "2027-01-16", "2024-01-09", null, null, "2025-06-18", "2024-02-18", "2023-12-20", "2025-06-18", "2026-02-18", "2024-01-19", "2027-01-16", "2024-01-17", "2024-02-18", "2025-06-18", null, "2027-01-09", "2024-02-18", "2023-12-13", "2025-02-17", "2024-01-09", "2023-12-18"],["2023-12-10", "2027-01-16", "2023-12-18", "2025-06-18", "2023-12-15", "2024-02-18", null, "2023-12-17", "2023-12-12", "2024-02-18", "2023-12-12", "2026-02-18", "2025-06-18", "2027-01-16"],["2023-12-19", null, "2023-12-14", "2023-12-10", "2023-12-11", "2024-01-17", "2024-01-17", "2023-12-12"],["2026-02-18", "2023-12-20", "2025-02-18", "2023-12-09", "2023-12-11", "2024-01-31", "2024-01-31", "2023-12-13", "2027-01-09", "2025-06-18", "2023-12-12", "2024-01-08", "2027-01-16", "2024-01-19", "2024-02-18", "2024-02-18", "2023-12-16", "2023-12-13", "2023-12-15", "2027-01-16", "2024-02-18", "2024-02-18", "2023-12-10", null, "2023-12-12", "2023-12-16", null, "2023-12-18", "2025-06-18", null, "2023-12-20", "2023-12-17", "2025-02-18"]),(2,-4,4,-4,-4,null,-8299718,-7790681,19649,'2023-12-20','2023-12-13','2023-12-09','2024-02-18','z','q','n','i','p','h','k','n',[29956, null, 2708152, 4180766, null, -16646, null, -960, -26572, null, 4418, null, null, null, null, -27193, -29347, -8615, -7836, -16066, -3784267, 2303156, 963691, 32368, null, -22973, -5475540, null, -8794, 5610750, 17826, null, null, null, 2642936, -29332, 21828, -24485, 23310, -21928],[null, null, null, null, null, 1690605, null, -4551, -24909, null, -8141713, 1664203, -6145254],[5432838, -28532, 9084],[6438479, null, 3698119, null, -21146, 30309, 23574, 19919, 8448, -8596, 6998816, -4624542, -22538, 19632, -30444, null, 7453453, -2480542, 16136, -356373, -4239, null, -1557467, -397756, -756, null, 9332, null, null, -321, -4952849, null, 65629, 17251, -3555105, -30177, -230, 18043, null, -13366, -7390776, null, 6654835],[null, 'g'],['a', 't', 'n', 'e', 'z', null, 'x'],[null, 'd', 'r', 'u', 'i', 'j', 'h', 'a', 'b', 'h'],[],["2023-12-17"],["2025-06-18", "2024-01-09", "2024-01-31"],["2025-02-18", "2023-12-15", null, "2024-01-17", "2024-02-18"],["2024-01-19", "2023-12-12", "2025-02-17", "2027-01-16", "2023-12-18", "2026-02-18", "2023-12-12", "2023-12-11", "2025-02-18", "2026-02-18", "2023-12-18", "2023-12-20", "2023-12-13", "2025-06-18", "2024-01-31", "2025-06-18", "2023-12-09", "2024-02-18", null, "2024-02-18", "2023-12-17", "2023-12-18", "2025-02-18", "2023-12-12", null, "2023-12-20", "2024-02-18", "2023-12-12", "2024-02-18", null, "2026-01-18", "2024-01-09", null, "2023-12-20", "2023-12-16", "2024-01-08", null, "2026-02-18", null, "2027-01-16", "2023-12-12", "2024-01-08"]),(3,9,-10,3,5,-5152627,-5145135,6986504,-20604,'2023-12-15','2023-12-13','2023-12-14','2023-12-15','v','f','u','o','n','b','h','y',[3443],[6391740, 5422888, -492, 8245552, 2636, -2780809, -29978],[16088, -7247349, -7458590, 2740940, null, null, null, -21826, -1848935, null, null, null, 4418535],[1142157, -3273, -15958, 2881572, -27206, -26818, null, -28001, 2584151, null, null, 11184, -31822, null, null, null, -5407054, null, -5605359, null, -11412],['e', 'g', 'b', 'o', 'w'],['g', 'g', 'k', 'i', 'w', 'n', 'o', 'v', 'f', 'd', 'z', 'q', null, 'w', 'f', 'w', null, null, null, 's', 'h', 'v', 's', 'u', null, 'n'],['d', 'n', 'g'],['e', 'm', 'k', 'm', 'h', 'u', 'z', 'l', 'n', 'q', 'x'],["2023-12-20", "2023-12-14", "2025-02-17", "2023-12-15", null, "2024-02-18", "2023-12-15", null, "2023-12-16"],["2025-02-18", "2023-12-14", "2025-06-18"],["2023-12-13", "2025-06-18", "2027-01-09", null, "2024-02-18", "2023-12-19", "2026-02-18", "2026-01-18"],["2023-12-18", "2024-01-17", "2024-02-18", "2025-06-18"]),(4,3,-4,3,-4,null,-1584250,-332882,-4905447,'2025-02-17',null,'2027-01-09','2023-12-16',null,'y','e','o','u','v','m','c',[-15763, -5359106, -24434],[-3779239, null, null, null, null, 5060, null, null, -31955, -6906924, 7177028],[-6845, -602, null, 21649, -17902, -25075, 13328, 5810518, 22416, -53406, 16876, 6328, null, null, null, -23941],[11186, null],['u', 'y', 'n', 'h', 't', 'k', null, null, 'l'],[null, 's', 't', 'q', 'p', 't', 'e', 'c', 'y', 'm', 'x', 'w', 'm', 'b', 'g', 'w', 'z', null, 'r', 'd', null, 'n', null, 'm', 'e', 'u', null, 'q', 'm', 'p', null, 'z', 't', 'o', 's'],[null, 'd'],[null, 'b', null, 'r', 'h', 's', 'q', 'h', 'm'],[null, null, "2024-02-18", "2024-01-17", "2023-12-13", "2024-01-17"],["2027-01-16", "2025-06-18", null],["2024-01-09"],["2024-01-31", "2025-02-18", "2027-01-16"]),(5,3,null,6,8,2854778,9666,-4700976,-7871284,'2025-02-18',null,'2024-01-09','2024-01-17','v','j','l','v',null,'b','n','g',[-9161, 806576, null, null, 2539356, 3477002, null, 19621, null],[7250884, null, 8219730, null, 6493797, -31014, -2669, 3599799, -735224, 25173, 13308, 5906342, 8070499, 4572, -6979430, 27920],[],[-6159748, null, null, 9043, null, null, 20090, null, null, -22439, null],['x', null, 'd', 'h'],[null, 'i', 'w', 't', 'f', null],['d', 'e', 'x', 'p', 's', 'i', 'f', 'd'],['a', 'z'],["2024-02-18", "2023-12-20", "2025-02-18", "2024-02-18", "2024-02-18", "2023-12-13", "2024-02-18", "2025-06-18", "2023-12-11", null, "2027-01-09", "2023-12-19"],["2025-02-17", "2026-01-18", "2027-01-16", "2023-12-14", "2025-02-18", "2024-01-19", "2025-06-18", "2023-12-16", "2027-01-09", "2023-12-10", "2025-02-18", null, "2025-06-18"],["2023-12-14", "2023-12-19", "2024-01-31", "2025-02-17"],["2023-12-11", "2024-01-08", "2025-02-17", null, "2024-01-08", "2023-12-19", "2024-02-18", "2023-12-14", "2024-01-09", "2026-02-18", "2023-12-12", "2023-12-20", "2024-02-18", "2025-02-17", "2023-12-16", "2025-02-17", "2023-12-18", "2023-12-13", "2027-01-16", "2023-12-15", null, "2026-02-18", "2023-12-15", "2024-01-08", "2023-12-12", "2023-12-09", "2023-12-18", "2024-01-31", "2023-12-11", "2023-12-15", "2025-02-17", null, "2024-02-18", "2023-12-10", "2023-12-16", null, "2024-01-08", null, "2024-01-31", "2023-12-09", "2023-12-10", null, "2023-12-11", "2024-02-18", "2023-12-15", null, "2025-02-17", "2024-01-31", "2023-12-09", "2023-12-14", null, "2026-01-18", "2023-12-20", "2024-01-31", "2024-02-18", "2023-12-14", "2024-01-09", "2024-01-17", "2024-02-18", "2024-02-18", "2026-01-18", "2024-02-18", "2024-01-08", "2023-12-17", "2023-12-16", "2023-12-15", "2023-12-09", "2023-12-20", "2024-01-31", null, "2023-12-14", "2023-12-13"]),(6,-10,9,-4,4,17064,null,-3444527,6831972,'2027-01-16',null,'2025-02-17','2023-12-20','a','v','e','x','q','t','v','c',[-12248, 5706253],[8265758, 1891518, null, 343319, null, 6145286, -7277684, -4439, 18409, -27099, -4940368, -1878, -6233, 1380723],[17182, 3109441, 7300860, -7329372, null, null, null, 6012060],[371441, null, 30764, 4967, -11962, 60226, null, null, null, null, null, -5034956, 6903140, -15094, -29581, 11835, -2859160, 17616, 10084, -1767810, 27580],['w', 'u', 'j', null, 'm', 'u', 'w', 'c'],['u', 'o', 'e', 'x', 'e', 'f', 'c', 'd', 'z', null, 'o'],['v', null, 'z', 'f', 'u', 'r', 'l', 'k', null, 'k', 'k', null, null, 'n', 'v', 'y', 'k', 'd', 'i', 'b', 'e', 'p', null, 'z', 'y', 'b', 'f', 'i', 'b', 'r', 'd', 'e', null, 'n', null, 'l', 'c', 'g', null, 'j', null, 'd', 'n', 'e', 's', 'r', null, 's', 'j', 'v', 'p', 'u'],['y', 'u', 'u'],["2025-06-18", "2025-02-18", null, "2024-01-17", "2024-02-18", "2024-02-18", null, "2024-02-18", null, "2023-12-18", "2027-01-16", "2023-12-13", null, "2023-12-15", "2027-01-16", "2023-12-15", "2025-02-17", "2026-02-18", "2024-01-17", "2023-12-18", "2023-12-09"],[null, "2023-12-20", "2024-02-18", "2024-01-09", null, null, "2025-02-17", "2023-12-12", "2023-12-18", "2025-02-18", "2023-12-10", "2026-02-18", "2024-02-18", "2025-06-18", "2023-12-18", "2023-12-17", "2027-01-09", "2024-01-19", "2023-12-17", "2024-01-17", "2027-01-09", "2024-01-09", null, "2024-01-31", "2023-12-11", "2024-02-18", "2026-01-18"],["2025-06-18", "2023-12-11", "2024-01-08", "2026-01-18", "2025-06-18", "2027-01-09", "2027-01-09", null],["2023-12-18", "2024-02-18", "2023-12-19", "2025-02-18", "2025-06-18", "2024-02-18", "2024-01-19", "2025-06-18", "2024-02-18", "2023-12-12", null, "2027-01-09", "2024-01-17", "2023-12-12", "2023-12-20", "2025-06-18", "2026-01-18", "2024-01-08", "2025-06-18", null, null, "2024-01-31", "2023-12-11", null, "2024-01-17", null, "2023-12-17", "2023-12-14", "2026-02-18", "2023-12-15", "2025-06-18", "2023-12-12", null, "2024-02-18", "2025-06-18", "2023-12-16", null, "2023-12-11", "2025-06-18", "2023-12-10", "2027-01-09"]),(7,6,-4,-10,1,-8383139,488676,25942,-6844644,null,'2024-01-08','2023-12-20','2027-01-09','k','f','m','r','l','t','f','x',[null, 31370, null, 11344, null],[1289638, 7378090, -4076, -3654288, 20933, 3795642, null, 7046449, -25007],[2771190, 20162, 877099, 2413, -4529674, 2233135, 14455, -3560001, -29631, 2047976, 5856889, -27930, -4774575, -7977519, null, 30017, null, -954908, null, 4583480, null, null],[4552647, 18706, 21794, -8005, -2240647, null, -2388, null, 732884, 3046184, null, null, 7337, -4615980, -6795924, -21823, -5841, 2815120, null, null, -8481, 32709, -4908792, 14179, -4490016, null, -2945, null, null, null, null, -23025, 24814, -2769112, 24921, null, null, 7970959, -24730, 1030977, -7668, 16500, 7548094, 16112, null, null, null, null],['q', 'o', 'k', 'c', 's', null, 'p', null, 'g', 'z', 'd', 'r', 'd', 'a', null, 'w', null, 'l', 'm', 'v'],[null, 'z', 'm', 'u', null, null, 'e', 'x', 'p', null],[null, 'h', null, 't', null, null],['f', null, 'v', null, 'l', 'k', 'a', null, 'l', null, null, 'i', null, 'h', 'j', null, 'm', 'z', 'b', null, 'h', 'c', 'z', 't', 'v', 'e', 'i', 't', 't', 'x', 'a', 'y', 'v', 'd', 'e', 'h', 's', 'u', null, 'b', 'g', 'h', null, 'e', null, 't', 'f', 'j', 'c', 'd', 'a', 'v', 'r', null, 'o', 'h', 'n', null, null, null, 'n', 'c', 'p', null, null, 'n', null, 's', 'y', null, 'k', 'w', 'i', 'a', null, 'x', 'p', 'y', 't', null, null, 'u', null],[null, "2023-12-18", "2024-02-18"],["2023-12-12", "2024-02-18", "2023-12-19", "2023-12-12", "2026-01-18", "2023-12-18"],[null, "2024-02-18", "2023-12-14", "2023-12-13", "2025-02-17", "2024-01-09", "2025-06-18", "2025-02-18"],[null, "2023-12-20", "2025-06-18", "2023-12-14"]),(8,-4,1,7,-10,-7132,1008329,5183204,-25057,'2024-01-09','2023-12-10','2024-01-17','2025-06-18',null,null,'w','n','v','n','m','w',[15252, 27759, -6459, null, -5040142, null],[null, null],[null, null, -8485, 3758840, null],[28819, -4400, null, -708, null, null, -4493405, -5017, null, null, 5215210, null, -213, -4337490, null, -2456643, 26206, 26048, -9226, -1046, null, -24230, null, 7979008, -3717682, -3668055, 9611, 21102, null, -2425835, 5395423, -8103945, null],[null, 'y', 'y', 'p', 't', 'v', null, 'v', 'g', 'e', 'f', 'v', 'q', 'k', 'i', 'w', 'h', 'j', 'y', 't', 'm', 'j', null, 'q', 'e', 'g', null, 'p', 'e', 'u', 'z', 'a', 'g', null, 'n', 'p', 'n'],[],[],['t', 'h', null, 'o', 'p', 'z', 'c', 'n', null, null, 'b', 'c', 'f', 'f', null, 's', 'm', 'u', 'i', null, 'i', 'a', 'u', 'h', 'f', 'y', 'v', 'b', 'p', 'f', 'a', 'p', 't', 'u', 'c', 'a'],["2025-02-17", null, "2024-02-18", null, "2026-01-18", "2024-02-18"],["2023-12-18", "2023-12-09"],[],["2024-01-09", "2023-12-13", "2024-01-17", "2023-12-16", "2026-02-18", "2026-01-18", "2023-12-10", "2023-12-16"]),(9,0,null,5,-10,-12101,null,-294874,6623565,'2023-12-14','2025-02-18','2023-12-15','2023-12-17','y','y','y','w','n','y','r','e',[-7239304],[-1460490, 5930961, 2339440, 1278440, 4116181, 6436894],[-12742, -4825983, null, 5439401, -5250, -27217],[null, 6417146, 4081139],['p', 'j', 'w', 'x', 'o', 'k', null, 't', null, 'b', 'e', 'x', 'o', 's', 'l', 'q', 'l', null, null, 'j', 'y', 'n', 'e', 'g', null, 'a', 's', 'v', 'q', 'u', 'j', 't', 'a', 'z', 'm', 'x', 'd', null, 'y', 'f', 'm', null, 'b', 'e', null, 'i', 'x', 'u', null],['h', 'f', null, null, 'g', 'p', 'e', 'f', 'l', 'm', 'v', 'm', 'g', 'p', 'g', 'm', 'e', null, 'k', 'h', 'a', 'd', 'y', 'j', 'j', 'm', 'g', 'r', 'c', 'u', null, 'd', 'i', 'r', 'l', 'j', null, null],['x', 'm', 'q', 'a', null, 't', 'r', 'n', 't', 'z', 'q', 'c', null, 'd', 'k'],['f', null, 'z', 'o'],["2023-12-16", null, "2024-01-09", "2024-01-19"],[],["2023-12-12", "2024-01-08", "2024-01-09", "2023-12-11", "2023-12-16", "2023-12-19", "2025-02-17", "2023-12-12", "2023-12-15", "2023-12-12", "2024-02-18"],["2025-06-18", "2027-01-09", "2023-12-09", "2024-01-17", "2024-01-19", "2023-12-10", "2024-01-09"]),(10,-4,6,-4,8,7668480,12311,-2302965,24187,'2024-02-18','2023-12-14','2023-12-19','2023-12-18','w','e','q','c','r','j','p','m',[4435282, 695137, 5167063, -7144199, 4491, 622539, 328263],[null, 7263600, null, 2962764, null, null, 4443],[null, null, -315785, -19966, -12331, 2297033, -2155440, null, -11150, -17178, 4148249, 10145, -2822, 572786, null, null, null, null, null, -5736527, null, null, null, 6880525, 6270008, 1824, -32226, null, null, null, -7586, null, 2928908, -6873675, 4374133, 30907, -6856016, -7325917, null, null, -23290, null, 12121, -56130, 1723237, null, -13447, 2900221],[-3887447, 29513, -27218, 7731280, 8020208, -7153276, -6191389],['z', null, null, 'h', null, 'j'],['w', 'd', 't', 'n', 'p', 'u', 'f'],['o', 'x', 'l', 'p', 'd', 'q', 'p', 'n', 'w'],['n', 'r', 'g', null, 'h', 'e', 'y', 'r', 'o'],["2027-01-16", "2024-01-09", "2025-06-18", "2025-02-17", "2023-12-13", "2023-12-10"],["2027-01-09", "2023-12-09", "2024-02-18", "2026-01-18", "2025-06-18"],["2023-12-13", "2025-02-17", "2023-12-18", "2023-12-17", "2024-02-18", "2023-12-16", null, null, "2026-01-18"],[null, "2025-06-18", "2023-12-12", "2023-12-16", "2023-12-18", null, "2025-02-18", "2027-01-16", "2024-02-18", "2023-12-18"]),(11,7,3,0,-10,27729,-1597057,8437,10443,'2023-12-12','2023-12-09','2026-01-18','2023-12-20','j','g','i','r','l','g','g','t',[],[-392, -21067],[5163, -7859152, 30104, null, 963298, -21071, 8298766],[-3715006, null, -28561, -6846775, 1179, -4711549, -26316, -2904644, null, -4577223, 5725555, 30687, null, 3598210, null, 1875361, -4470182, 2060, -5637840],['r', null],[null, 'l', 'u', null, 't', null, 'o', null, 'w', 'l', 'l', 'k'],['p', null, 'x', 'f', 'e', 'q', 'z', 'd', 'e', 'j', 'g', null, 'c', 'v', 'y', 's', 'l', null, 'g', null, 'p', 'x'],['u', 'x', 'h', 'x', 'c', 'z', 's', null, 'c', 'p', 'j', 'k', 'd', 't', null, 'o', null, 'm', 't', 'k', 'j', 'h', null, 'n', 'i', 'c', 'q', null, 'v', null, null, 'o', 'p', 'b', 't', 'b', 'q', 'r', 'b', 't', 'e', null, 'r'],["2026-01-18", "2025-02-17", "2024-01-31"],["2024-02-18", "2023-12-18", "2024-01-31", "2023-12-12", "2023-12-13", "2023-12-17", "2023-12-19", "2024-02-18", "2023-12-17", "2023-12-14", "2024-01-08", "2024-02-18", "2025-06-18", "2024-01-31", "2024-02-18", "2023-12-11", null, "2024-01-17", null, "2023-12-19", null, "2023-12-19", "2023-12-13", "2026-02-18", "2023-12-19", null, "2024-02-18", "2024-01-08", null, "2024-01-17", "2023-12-20", "2023-12-18", "2023-12-10", "2023-12-13", null, "2025-06-18", "2023-12-17", null, null, null, "2023-12-17", "2024-01-19", "2023-12-14", "2025-02-17", "2023-12-12", "2026-02-18", "2025-02-17"],[null, "2023-12-19", "2023-12-15", "2023-12-18", "2025-02-18", "2023-12-20", "2023-12-18", "2024-02-18", "2024-01-17"],[]),(12,-10,-4,0,-10,null,-27963,-2818488,1425862,'2023-12-10','2023-12-14','2023-12-09','2025-06-18','w','a','n','v',null,'v','f','c',[null, 1305092, -2438814, -6947222, -2614382, -28347, 32717, null, -23097, null, 4288469, 1963103, null, 1001797, 6249472, 623992, 758210],[7055189, -32253, -2337710, null, null, 17178, null, null, 1646866, -438270, null, 5981487, -17043, -7135891, -23360, 4857165, 24183, -1995678, 636071, 783, -805, 10852, -5138163, 24798, 1858131, 15237, -3565, null, -23376],[951977, 2311680, 31740, null, -26586, -5684614, null, -5229659, 27866, -10603, -2936, null, -12738, null, -388178, -19354, null, 8377388],[null, 16024, -468293, -6161072],[null, 'a', 'v', null],['b', 'k', 't', null, 'u', 'o', 'q', 'a', null, 'j', 'b', 'r', 'u', 'x', 'h', 'h', 'k', null, 'm', 'o', 'w', 'l', 'h', null, 'y', 'p', 'c', null, 'm', 'o', 'y', 'i', 'm', 'q', 'x', 'm', 't', 'f', 'x', 't'],['s', 's', 'e', 'b', 'p', 'y', 'f'],['u', 'c', 'p', 'h', 'o'],["2023-12-12", "2023-12-15", "2023-12-13"],["2025-06-18", "2023-12-11", "2023-12-12", "2027-01-16", "2024-02-18", "2023-12-11", "2027-01-16", "2024-02-18", "2023-12-16", "2027-01-09", "2023-12-12", "2024-01-09", "2025-02-17", "2024-01-19", "2023-12-20", "2024-01-08", "2023-12-11", "2023-12-20", "2024-02-18", "2023-12-19", "2024-01-08", "2023-12-12", "2025-06-18", null, "2025-06-18", null, "2023-12-09", "2023-12-18", null],["2023-12-16", "2024-02-18", null, "2024-02-18", "2026-01-18", "2023-12-14", "2023-12-12", "2025-06-18", "2026-02-18", "2027-01-16"],["2025-06-18", "2024-01-08", "2024-01-09", "2027-01-09", null, "2023-12-16", "2027-01-16"]),(13,5,null,8,-4,null,3558665,3390,10801,'2024-01-17','2024-01-08','2024-01-08','2025-02-18','s','i','s','u','d','t','u','o',[-5186684, 3411, null, 5556519, null, 6257, null, 30818, 30628, -24827, -1912, null],[3939, null, null, 19998, -27853, null, -6305, -24322, null, -6037403, null, -30153, 3345863, -394168, -3201436, 27663, 25009, null, 29942, 24805, null, 1808732, -4244398, -3569708, 7456786, null, 310339, null, null, -19688, null, -1303433, 5384133, -543381, -329, 9036, 3698961, null, -5843128, null, null, -741, null, 26031],[-3462562, 6447984, null, 7605875, null, 1538616, 449, -3868637, null, -1787, -4423897, -11485, null, -1150262, 6422841, 2106955, 4331427, -181, null],[null, -8448, -16310, -20983, 1397438],[null, 's', 'c', 'w', 'b', 'y', null, 'k'],[],['q', 'y', 'c', 'q', 'z', 'u', 'q', 'k'],['u', null, 'x', null, 'z', 'w', 't', 't', 'r', 'b', 's', 'o', 'c', 'j', 'v', 's', 'p', 'x', 'e', 'o', 'm', 'm', 'j', null, null, 'v', 'm', 'g', 'x', 'f', null, 'c', 'u', 'p', null, null, 'n', null, 'l'],["2024-01-08", "2023-12-11", "2024-02-18", "2023-12-16", "2025-02-18", null, null, "2023-12-14", "2023-12-15", "2023-12-12", "2024-02-18", null, "2023-12-13", "2023-12-19", null, "2024-02-18", "2023-12-11", "2024-01-17", "2027-01-09", "2023-12-09", "2024-02-18", "2023-12-14", "2023-12-17", "2027-01-16", "2023-12-13", "2023-12-14", "2023-12-13", null, "2027-01-09", "2024-01-08", "2024-01-19", "2027-01-16", "2024-02-18", "2024-01-19", "2024-01-31", "2024-02-18", "2023-12-17", "2023-12-11", "2023-12-11", "2023-12-09", "2024-01-17", "2023-12-20", "2026-01-18", "2025-02-18", "2024-02-18", "2023-12-12", "2023-12-13", "2024-01-09", "2023-12-16", "2023-12-11", "2025-02-18", "2025-06-18", null, "2027-01-16", "2024-02-18", "2024-01-17", null, "2023-12-19", "2025-06-18", "2024-01-19", "2023-12-15", "2024-02-18", "2023-12-20", "2023-12-12", "2024-01-19", "2023-12-18", "2023-12-10", "2026-02-18", "2023-12-09", "2023-12-09", "2025-02-18", "2023-12-11", "2026-01-18", "2023-12-19", "2024-01-19", "2025-02-17", "2023-12-13", "2024-01-08", "2025-06-18", "2027-01-16", "2025-02-17", "2023-12-17", "2023-12-20", "2023-12-17", "2024-01-31", "2023-12-18", "2023-12-19", "2027-01-09", "2023-12-17", "2027-01-16", "2023-12-18", "2024-01-31", "2025-02-17", "2026-02-18", "2025-02-18", "2024-02-18", "2023-12-19"],["2023-12-19", "2023-12-17", "2026-01-18", "2023-12-09", "2023-12-13", "2025-06-18", "2023-12-11", "2023-12-09", "2023-12-09", "2026-01-18", "2024-01-19", "2024-01-09", "2025-06-18", "2023-12-09", "2023-12-12", "2023-12-18", "2024-01-08", "2024-02-18", "2026-01-18", "2027-01-16", null, "2024-01-31", "2027-01-16", "2025-06-18", "2025-06-18", null, "2025-06-18", null, "2024-01-19", "2027-01-09", "2025-06-18", "2025-06-18", "2025-06-18", null, "2024-01-19", "2024-02-18", "2025-06-18", "2025-06-18", "2023-12-09", "2025-02-17", "2023-12-11", "2026-02-18", "2024-01-17", "2026-02-18", "2025-06-18", "2023-12-18", "2026-01-18", "2023-12-16", "2023-12-15", "2025-06-18", "2024-02-18", "2024-01-09", "2023-12-14", "2025-06-18", "2026-02-18", "2023-12-19", "2023-12-12", "2023-12-12", "2024-02-18", "2026-01-18", "2027-01-16", "2024-01-09", "2023-12-16", "2024-02-18", "2024-01-08", "2027-01-09", "2024-02-18", "2024-01-31", null, "2024-01-17", "2024-02-18", "2023-12-12", "2023-12-09", "2024-01-08", "2025-02-17", "2024-02-18", "2024-01-09", "2026-02-18", "2025-02-18", "2026-02-18", "2026-02-18", "2023-12-15", "2023-12-16", "2023-12-11", "2023-12-17", "2024-02-18", "2027-01-16", "2023-12-10"],["2024-01-31", "2025-02-18"],[null, "2023-12-17", "2023-12-18", "2023-12-14", null, "2023-12-17", "2025-06-18", "2025-06-18", null, null, "2024-02-18", null, "2025-06-18", "2023-12-09", "2024-01-19", "2023-12-11", "2027-01-09", "2023-12-20", "2023-12-17", "2023-12-11", "2025-02-17", "2023-12-10", "2025-06-18", null, null, "2026-01-18"]),(14,5,4,9,-4,null,-6919782,14792,5528709,'2024-02-18','2026-01-18','2026-02-18','2025-06-18','d','b','m','o','d','a','s','r',[3181050, -23959, null, 6563755, 6061],[-17423, null, null, null],[null, null, 25045, -19501, null, -15807, null, -8336621, 5072, -19448, -472845, null, 4409],[-23925],['h', 'r', 'x'],[],['m', null, null],[null, 's', null, null, null, 'q', 'j', 'h'],["2027-01-16"],["2023-12-10", "2024-01-09"],["2023-12-20", "2024-01-31", null, "2024-01-31", "2023-12-20", null, "2025-02-18", "2023-12-16", "2023-12-09", null, "2024-01-31", "2024-01-19", "2024-02-18"],["2024-01-08", "2024-01-09"]),(15,4,-4,5,8,-28910,-8118655,5617,7465079,'2025-02-17','2023-12-19','2027-01-09','2027-01-09','u','e','y','f','a','l','b','c',[17894, null, null, null, 3463, -30173, -6635474],[null, -29403, -2945200, -10643, -3074444, 2596382, null, -31507, null, null, null, -1859636, 5348331, 4720562, 14109, 19714, 28650, 28246, 2045787, null, null, null, 10957, -6899012, null, null, null],[-837730, 986528, 6323561, 7993, -8234195, null, null, -2027585, null, null, null, 10504, -4749, 31158, 25319, null, null, -5326842, -5365541, 2200382, null, -6135103, 2870363, null, null, -14882, null, 17664, 734, 19430, 17512, null, null, -22941, -19808, null, -356592, 7205186, null, null, 7268014, -7876274, -6850378, 3418],[239344, -7900359, -4679874, -6340806, -924637, null, null, -2088500, null, -5296280, null, -5950761, null, -2743293, null, 23006, -5690930, -7113168, 24992, -1228822, null, 30513],[null, 'x', null, 'g', 's', 'm', 'e', 'z', 'k', 'p', 'p', 'n', 'q', null, 'z', null, 'j', null, 'o', 'y', 'y', null, null, 'j', 'f', null, 'h', 'l', 'u'],['f', 'f', 'b', 'g', 'z', 's', 'v', 'v', 'z', 'd', 'v', 'f', 'd', 'i'],['n', 'f', null, null],['l', 'w', 'u', null, 'a', null, null, 'm', 'y', 'l', 'v', 'm', 's', 'c', 'n', 'h', 'u', 'z'],[null, "2024-01-09", "2025-02-17", "2023-12-13", "2026-02-18", "2023-12-10", "2024-01-31", "2024-01-31", "2024-01-19", "2023-12-13", "2024-01-19", "2025-06-18", "2025-02-17", "2027-01-09", "2024-01-17", "2024-02-18", "2024-01-17", "2023-12-15", "2026-01-18", "2025-06-18", "2025-06-18", "2023-12-19", "2023-12-09", "2023-12-14", "2026-01-18", "2023-12-19", "2027-01-16", "2026-02-18", null, "2025-06-18", "2024-02-18", "2024-02-18", "2024-01-09", null, "2023-12-19", null, "2023-12-18", "2024-01-19", "2023-12-18", "2025-06-18", "2023-12-13", null, "2023-12-11"],["2024-02-18", "2023-12-18"],[null, "2023-12-11", "2023-12-14", "2025-06-18", "2025-02-18", "2024-01-31", "2024-02-18", "2023-12-17", "2023-12-09", "2023-12-10", "2025-06-18", "2023-12-11", "2025-02-18", "2024-01-17", "2023-12-11", "2023-12-13", null, "2023-12-14", "2026-02-18", "2024-01-09", "2024-02-18", "2023-12-11", "2023-12-10", "2026-02-18", "2025-02-17", "2023-12-20", "2023-12-10", "2024-01-17", "2024-02-18", "2024-02-18", "2024-01-08", "2023-12-18", "2027-01-16", "2023-12-18", "2023-12-13", "2026-01-18", "2024-01-17", "2024-01-09", "2024-01-31", "2023-12-09", "2023-12-13", "2026-02-18", "2023-12-19", "2023-12-12", null, "2024-01-09", "2023-12-11", "2025-02-18", "2023-12-14", "2024-02-18", "2024-01-09", "2025-06-18", "2027-01-16", "2026-01-18", "2024-01-31", null, "2025-02-17", null, "2024-02-18", "2025-06-18", "2025-02-17", "2024-01-19", "2023-12-09", "2024-01-17", "2025-06-18", null, "2024-01-31", "2026-02-18", null, "2024-01-17", "2027-01-09", "2023-12-15", null, "2025-02-17", "2023-12-11", "2026-02-18", "2023-12-14", "2024-01-31", "2023-12-19", null],["2025-02-18", "2025-02-18", "2027-01-09", "2024-01-09", "2026-01-18", null, "2025-06-18", "2023-12-17", "2024-02-18", "2026-02-18", null, "2025-06-18", "2023-12-09", "2026-02-18", "2024-01-09", "2024-01-17", "2025-02-17", "2023-12-20", null, "2024-02-18", "2023-12-14", "2026-02-18", "2025-06-18", "2025-02-18", "2025-06-18", "2023-12-09", "2023-12-14", "2027-01-16", null, "2024-02-18", "2025-06-18", "2023-12-19", "2024-01-17", "2025-02-17", "2024-01-09"]),(16,8,6,-4,-4,30089,682261,3437,-13954,'2023-12-11',null,'2023-12-18','2023-12-16','j','q','g','m',null,null,'a','b',[5589761, null, -6141, -829684, null, -2464531, null],[-5777733, -8175496, null, null, -6160945, 1884632, -6941554, null, null, 7548929, 18625, 26231, -7353138, 4833709, -5089, 26486, -5840395, 28505, null, 17482, 7233510, -1629007, 1500069, -5038307, 21571, 31219, -1234923, -4758654, -24295, -1294544, -4644, -372141, -3536794, -5029586, -726654, 6911890, -2819474, 866330, -7881, -7890785, -3375667, -19409, null, 30313, -21264, 3274253, null, -3911042, 6247194, 13814],[1553786, null, null, -6903982, 22297, 2621822, null, null, 2092183, 508828, null, 1963331, -4981507, null, null, -8349, null, 331040, null, -17039, null, -8342455, 3978260, -4805305, -1010827, -4163171, -31921, 1994228, null, null, -6510208, -13536, 99231, 29612, -29057, null, null, -30540, null, null, -28386, 4776056, null, -5832862, -3467200, 11076, 458022, -16212, 1761, null, -20271, null, -1796947, -1901630, null, 2123642, -16292, -3228029, null, -7859248, null, -488, 61494, -7763832, -6262170, null, 1114541, null, null, -7147, null, null, null, null, -16138, 13011, null, null, -7710594, 7254450, 1806497, null, null, null],[7067452, null, -30604, 1449060, null, 2409450, 9369, -8147794, -27009, -3197541, 4534865, -1160, 2114, null, -407, null, 4703307, -9201, -4995270],['w', null, null, 'f', 'h', 'd'],['c', null],['y', 'n', null, null, 'c', 'w', 'm', null, 'e', 'y', 'c', 'l', null, 'w', null, null, 'a'],['w', 'f', null, 'a', 'c'],["2024-01-19", "2023-12-15", "2024-01-08", "2024-01-09", "2024-01-31"],["2024-02-18", "2025-02-17", "2023-12-13", null, "2023-12-14", "2023-12-14", "2025-02-18", "2024-01-09"],["2023-12-11", "2023-12-20", null, "2024-02-18", "2025-06-18", "2023-12-17", "2023-12-15"],["2024-01-19", "2023-12-18", "2024-01-08", "2024-01-19", null]),(17,-10,2,0,0,-3963084,-4213,4815,-1179164,'2023-12-10',null,'2023-12-17','2023-12-10','i','r','y','q','b','r','x','u',[4307633, -16947, null, -7862, -4232563, null],[-5496764, 3255696, 8195495, null, null, -5719, null, null, null, null, -7172947, null, 7157],[-5317, null],[-6848, -2821134, 1324574, 7026121, null, null, 1825837, -7975568, 29170, -788852, 6471854, null, -1420090, 15726, -27909, -1605263, -7104, -12889, -20339, -75192, null, -264319, -21528, null, 843, 6821, null, null, -5197035, null, 303660, null, -13114, -1545788, 7648700, null, 20672, -1063066, null, null, 3120252, 10972, null, null, null, 1011, 7256375, 22013, -18143],['f', 'm', null, 'v', 'v', 'e', null],['a', 'q', 'm', 'b'],['t', null, 'm', 'w', 't', 'p', 'k', 'r', null, null, 'f', null, null, 'v', 'm', 'w', 'z', 'c', 's', 'o', null, 'r', 'j', 'r', 'j', 'k', 'y', null, 'x', null, 'i', null, null, 't', 'o', null, null, 'i', 'n', 'j', 'r', 'h', 'p', null, 'i', 'o', 'n', 'a', 'w', 'o', 'f', 'g', 'b', 'm', 'm', 'a', null, 'v', null, 'f', 'u', 'x', 'k', null, 'm', null, 'y', 'o', 'p'],['s', 'z', 'k', 'z', 'u', 's', 'w', null],["2024-01-17", "2026-01-18", "2025-06-18", "2023-12-18", "2023-12-14", "2027-01-09", "2025-06-18", "2024-02-18", "2024-01-17", null, "2023-12-20", "2023-12-18", "2026-01-18", null, "2026-02-18", null, "2023-12-20", "2025-02-17", "2024-02-18", "2023-12-18"],["2024-01-31", "2024-02-18", "2023-12-18"],["2023-12-13", "2024-02-18", "2023-12-18", "2024-02-18"],["2026-02-18", "2023-12-10", "2024-02-18", "2023-12-17", "2025-02-17", "2023-12-19", "2025-02-17", "2023-12-15", "2023-12-18", null, null, null, "2024-01-17", "2023-12-17", "2024-02-18"]),(18,1,null,8,2,null,15665,-4275671,6028673,'2023-12-13',null,'2024-01-08','2023-12-11','e',null,'l','u','h','m','l','c',[-10318, -1263585, -6254186, 2654133, null, -6057511, null, null],[6098826, -8202533, 807153, 7776466, null, null, -17404, null, 5176, 19635, 1659787],[-611181, -3239393, 32010, 4591, 24397, -2884938],[null, -19540],[],['h', 'a', 'd', 't', 't', 'v', 'u', null, 'z', 's', 'k', 'g', 'w', null, 'p', 'l', 'q', null],[null],[null, 'm', 'j', 'w', 'j', 'h', 'c', 'a'],["2023-12-20", "2024-01-17", "2023-12-11", "2023-12-11", null, "2024-01-08", null],["2023-12-19", "2023-12-18", "2023-12-16", "2023-12-13", "2023-12-12", "2026-01-18", null, "2025-02-18", "2025-02-17", "2024-01-09", "2024-01-19", "2025-06-18", "2027-01-16", "2024-01-19", "2023-12-20", "2023-12-12", "2023-12-13", "2023-12-15", null, "2023-12-11", null, "2023-12-12", "2024-02-18", "2023-12-14", "2024-02-18", "2023-12-17", "2024-01-17", "2023-12-16", "2023-12-13", "2023-12-13", "2024-02-18", null, "2024-01-31"],["2025-02-17", "2023-12-15", "2023-12-17", "2024-01-19", null, null],["2023-12-13", "2026-01-18", "2023-12-14", "2024-01-09", "2027-01-16"]),(19,9,null,1,7,6154640,-7229,-8184918,-21039,'2023-12-20','2024-02-18','2023-12-20','2023-12-18','s','o','a','q','k','o','v','k',[-5182, 3195842, -5351075, -1231302, null, 844501, -5263, 20861, 19067, null, -20869, null, 4319584, null, null, null, -5756228, -30379, null, -528148, null, -31188, 8084, 7850, null, 7848296, null, -6726665, 2320612, 30713, -7784, -17238, 17215],[6314665, -473, null, 5473545, null, 22163],[822733, 18378, -10390],[-4771049, null, 16393, 2563103],['h', 'u', 'm', 'h', 'j', null, null, null, null, 'h', 'e', 'm', 'y', 'v', 'a', 'f', 'l', null, 'r', null, 'q', 'g', 'o', 'd', 'y', 'l', 'd', 'b', 'a', null, 'n', 'z', 'm', 'h', 'u', 'c', 'i', 'm', 'e', 'd', 'f', 'q', null, 'u'],['g', null, 'l'],['i', 'g', 'h', 'v', 'j', 'q', 'y', null, 'q', null, 'n', 'n', 'w', 't', 'i'],[null, 'j', null, 'l', 'v', 'i', 'n', 'l', 'e', null],["2024-01-17", "2023-12-09", "2025-02-17", "2025-06-18", "2023-12-16", null],["2023-12-17", null, "2025-06-18", "2024-01-17"],[null, "2023-12-19", null, null, null, "2023-12-14", "2023-12-11", null, "2023-12-14", "2023-12-18", "2025-06-18", "2023-12-19", "2025-02-18", "2024-01-31"],["2023-12-19", "2023-12-16", "2025-02-18", "2023-12-11", "2024-01-09", "2024-01-09", "2027-01-16"]),(20,8,null,-4,5,null,-7011009,4903342,2698351,'2024-02-18','2023-12-14','2023-12-19','2023-12-15','a',null,'z','m','d','c','e','g',[null, null, null],[32511, null, -3407, null, 1470715, -6492],[-1502, null, -6175, -32320, -14444, -7645258, null, null, -2461007],[],['d', 'o', 'b', 'p', 'u', 'g', 'i', 'h', 'q'],[null, 'x', 't', 'c', 'f', 'j'],['m', 'g', 'r', null],['i', null, 'a', 'y', 'e', 'x', 'g', null, 'j', 't', 'd', 'z'],["2024-01-09", "2025-02-17", "2025-06-18", "2025-06-18", "2026-01-18", "2023-12-18"],["2026-02-18"],[null, "2024-01-31", "2023-12-15", null, "2023-12-18", "2025-02-18", "2026-02-18", "2024-02-18", null, "2024-01-19", "2023-12-11", "2026-01-18", "2026-02-18", "2023-12-13", "2025-02-18", "2024-01-08", "2024-02-18", "2023-12-10", "2025-06-18", "2024-02-18", "2023-12-18", null, "2026-01-18", null, "2024-01-17", "2024-02-18", "2023-12-15", "2024-01-09", "2023-12-16", "2023-12-11", "2024-01-08", "2026-02-18", "2024-02-18", null, "2025-06-18", null, "2023-12-18", "2023-12-09", "2025-02-17", "2026-01-18", "2025-06-18", null, "2023-12-10", "2026-02-18", "2027-01-16", "2023-12-19", "2023-12-11", null, null, "2024-02-18", "2023-12-18", "2025-02-17", "2024-01-17", "2023-12-20"],["2023-12-10", "2023-12-12", "2023-12-19", "2023-12-12", "2026-01-18", "2023-12-12", "2023-12-13", "2023-12-09", "2024-01-31", "2024-01-17", "2027-01-09", "2024-02-18", null, "2025-02-18", "2026-01-18", "2026-01-18", "2025-06-18", "2023-12-09", "2027-01-09", "2026-01-18", "2023-12-17", "2023-12-17", "2023-12-19", "2024-02-18", "2023-12-14", "2024-01-19", "2024-01-08", "2023-12-11", "2023-12-19", "2026-01-18", "2023-12-17", null, "2026-01-18", "2027-01-09", "2023-12-20", "2024-01-09", "2023-12-16", "2023-12-20", null, null, "2026-01-18", "2023-12-15", null, null, "2023-12-11", "2023-12-20", "2026-01-18", "2024-02-18", "2023-12-17", null, "2025-06-18", "2024-02-18", "2023-12-12", "2025-06-18", null, "2023-12-19", "2023-12-14", "2025-06-18", "2024-01-19", "2023-12-14", "2024-01-31", "2023-12-16", "2023-12-14", "2023-12-13", "2025-06-18", "2026-02-18", "2023-12-17", "2023-12-09", "2025-06-18", "2027-01-16", "2024-02-18", "2024-02-18", "2027-01-09", "2023-12-20", "2026-01-18", "2024-01-17", "2023-12-19", "2024-01-17", "2025-02-17", "2025-02-17", "2024-01-17", "2023-12-15", "2024-01-17", null, "2023-12-18", "2024-01-08"]),(21,6,2,-4,8,-23565,-14066,17507,-14163,'2025-06-18','2025-02-17','2026-02-18','2024-02-18',null,'i','y','i','z','t','d','r',[-3792146, 23264, -5192962, null, -6847533, -30804, 3881259, 1707873, -4366, -2416413, null, null, 3425107, 1394876, 1385, 673, 2629308, 10899, -16112, -6722, 9906, 3936, -3956341, 7095173, 7670244, -1905, null, 27842, null, null, -4997295, -6041520, 29388, null, 7118891, -7387, 22531, null, null, -4325349, null, null, null, 6913556, -5885, null, -3199528, 210046],[24991, -3202548, null, 6355130, null, -3602045, 5821567, 13256, null, -19560, 26768, -5251, -2518385, null, -451737, -8351018, null, null, -3993, 6887, null, null, 5815493, 24050, -12003, -5364723, 4882394, 2077766, null, -725502, 3068508, null, 5143543, null, null, -4286258, -24989, null, 4166738, 6312, null, -511, -5141213, null, null, -7091378, null, null, null, null, -6840846, 210343, -7095563, -32068, null, -3629517, -5029, 25835, null, 991962, 5588154, -21357, -4061, -2894260, -19610, 5872764, 3129526, 7911490, null, 11556, -2086157, -25102, -7973928, -24334, 11499, -1762301, null, -1204046, null, 7908467, null, -77492, -8565, null],[2209760, null, 28627, -2346639, -5523462, -1791, -1880156],[],['i', null, 'f', 'd', 'x', 'k', 'h', 'x', 'e'],['b', 'o', 't', 'i', 'r', 'i', 't', 'i', 'm', 'p', 'e', 'y', null, 'z'],['t'],[],["2024-01-31", "2023-12-13", null, "2023-12-10", "2024-01-19", "2023-12-10", "2023-12-16"],["2024-02-18", "2026-01-18", "2023-12-15", null],[null, "2023-12-18", "2026-01-18", "2024-02-18", "2024-01-09"],["2023-12-12", "2024-02-18", "2023-12-19", "2023-12-16", null, "2024-01-08", "2023-12-15", null, "2023-12-13", "2024-02-18"]); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_select_bug_2 """ SELECT table1.col_date_undef_signed_not_null_index_inverted, diff --git a/regression-test/suites/inverted_index_p0/test_index_rqg_bug3.groovy b/regression-test/suites/inverted_index_p0/test_index_rqg_bug3.groovy index 8fa4cdc4b8026d..849b8c13934e86 100644 --- a/regression-test/suites/inverted_index_p0/test_index_rqg_bug3.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_rqg_bug3.groovy @@ -63,7 +63,7 @@ suite("test_index_rqg_bug3", "test_index_rqg_bug3"){ sql """ insert into ${table1}(pk,col_int_undef_signed,col_int_undef_signed_index_inverted,col_int_undef_signed_not_null,col_int_undef_signed_not_null_index_inverted,col_bigint_undef_signed,col_bigint_undef_signed_index_inverted,col_bigint_undef_signed_not_null,col_bigint_undef_signed_not_null_index_inverted,col_date_undef_signed,col_date_undef_signed_index_inverted,col_date_undef_signed_not_null,col_date_undef_signed_not_null_index_inverted,col_varchar_10__undef_signed,col_varchar_10__undef_signed_index_inverted,col_varchar_10__undef_signed_not_null,col_varchar_10__undef_signed_not_null_index_inverted,col_varchar_1024__undef_signed,col_varchar_1024__undef_signed_index_inverted,col_varchar_1024__undef_signed_not_null,col_varchar_1024__undef_signed_not_null_index_inverted) values (0,null,null,6,-10,686522353588051391,null,-4348126053228614825,-6032791270525051561,'2025-06-18','2023-12-20','2024-02-18','2024-02-18',null,'o','o','x',null,null,'q','o'),(1,-4,-4,2,-4,-2326501514208488669,-8144130583099259882,6094773265621719520,-4389392644235126205,'2024-01-09','2023-12-19','2024-01-31','2024-02-18',null,null,'c','n',null,'k','p','y'),(2,-10,-4,-4,-10,-5761419801766661970,null,1575077084160592390,-6748295140918895470,'2023-12-09','2024-01-31','2023-12-11','2024-01-08','j',null,'m','k','p','s','s','u'),(3,2,null,3,6,7058901979703960583,-8791856880716210018,9136811854525385821,-584135196107353733,'2024-02-18','2023-12-14','2024-01-19','2024-02-18','e','h','i','b','x','a','h','d'),(4,6,-4,4,0,2965210993977402598,null,1623398766611349339,-719530465607559880,'2024-02-18','2024-01-31','2023-12-12','2027-01-16','c','p','h','o','t','l','t','k'),(5,-4,-10,7,-4,null,-4312428052005262901,1664741259066823538,-6520957605791451399,'2024-02-18','2024-01-19','2027-01-09','2024-01-31','f','d','q','k',null,'u','n','x'),(6,-10,0,4,-4,-4719935591389099252,-8933690584562378263,1354434296669241202,2684538782485650790,'2023-12-16','2026-01-18','2024-01-08','2025-06-18',null,null,'f','x','x','v','i','m'),(7,0,-10,-10,-10,-5480618991908294867,null,5334008298577672775,7173424974650158839,'2024-01-09',null,'2023-12-09','2024-02-18','y','k','x','u',null,null,'a','b'),(8,6,-4,5,8,-7188890154699493125,-1925845279956226794,-5657889190097714482,1640041513228273840,'2027-01-16',null,'2025-02-18','2023-12-20','y','x','p','w','d','j','k','d'),(9,null,-4,1,3,-2080159247468648985,-1306911382131817506,1219720796746600015,-978348523441835274,'2024-02-18','2025-06-18','2025-06-18','2025-02-18',null,'i','y','s','c',null,'m','o'),(10,2,1,-10,0,-7569151440408756108,null,1393963672572074196,-3822268135049166532,'2024-01-08','2027-01-16','2023-12-13','2024-02-18','s',null,'q','z',null,'u','b','v'),(11,9,8,-10,7,-4419333711868488787,5670069993430301249,-5101280938951897282,7291919080934920934,'2027-01-09','2025-02-18','2024-01-17','2026-01-18','u','c','d','r',null,'m','r','p'),(12,9,8,7,9,-697217673128595873,-2415793798160514654,-1909943068043737865,5844073448689265407,'2024-01-17','2025-02-17','2023-12-17','2023-12-14','a','z','v','o','q','u','z','h'),(13,-10,6,-10,1,null,null,-6933219731543784592,-4745778751501231119,'2023-12-20',null,'2026-01-18','2026-01-18',null,'r','w','c','k',null,'t','e'),(14,6,4,-10,-10,null,377907223978572611,-7447442174599113505,4949011330273779695,'2023-12-17','2024-02-18','2026-01-18','2024-01-08','g','w','u','k',null,'m','g','d'),(15,null,-4,-10,3,-5441857898369120483,-2001300041828347883,4385022502994073333,6762545521805735020,'2024-01-17','2023-12-11','2023-12-15','2023-12-10','p','u','p','i','i','c','j','v'),(16,8,1,-10,3,7499177078109776887,8002215544264694167,-4914597203639379766,7611185654075676834,null,null,'2024-01-08','2023-12-17','e','h','q','t',null,null,'p','d'),(17,-4,-10,3,6,null,null,4596273190394276006,-3248366019937329149,'2024-01-09','2023-12-19','2023-12-20','2023-12-11',null,null,'i','f',null,'t','q','a'),(18,0,-4,-10,1,null,-2000849949571150330,7208571222986345744,2598345170237057509,'2024-01-09','2023-12-09','2024-02-18','2024-01-19','a','f','w','o','b','y','q','f'),(19,7,7,-4,0,null,5717592572856392823,-8128856226419623044,-7534868883394863810,'2023-12-20','2023-12-09','2023-12-10','2023-12-12','r','t','y','d','l','a','y','v'),(20,2,null,0,2,null,-6905288165492491017,1934258578152616096,-1388806210542225140,null,null,'2024-01-19','2026-01-18','p',null,'p','g','u','b','i','c'),(21,null,null,-10,-4,1698759627767041241,null,-6613269394014189122,1915677852069340594,'2023-12-18','2024-01-31','2025-02-18','2024-01-08','e','g','l','h',null,null,'v','n'),(22,-10,-10,-4,5,-3720952595350369266,1539673860923570193,5089313038468606351,262016952853919148,'2023-12-15','2025-02-18','2024-01-19','2024-01-08','d','g','d','e','l',null,'m','g'),(23,-10,1,-10,7,null,-4884323809040291936,-4428424779275301738,-3325468851678420401,'2023-12-19','2027-01-16','2026-02-18','2024-01-09','z','v','v','v','r','d','j','y'),(24,4,8,3,-10,1026316126533561197,-8966784351064986909,496857885215447340,-6148636280121789215,'2024-02-18','2025-06-18','2026-02-18','2025-02-18','f',null,'j','k',null,'s','i','q'),(25,5,5,4,6,8574091287090543865,null,-773937635554104337,6026917236758217609,'2026-02-18','2027-01-09','2023-12-12','2024-01-19','s','p','t','d','t','l','u','m'),(26,0,-10,-10,9,-2429694321063869458,null,8908961259233183763,6894623222255264210,'2024-01-17','2023-12-14','2023-12-11','2023-12-09','w','o','l','g','m','r','h','i'),(27,5,0,2,-10,7748161344545453064,null,3244053576839674045,-7948008233666340932,'2024-02-18','2023-12-20','2024-01-08','2023-12-14','n','a','r','q','c','y','q','u'),(28,4,-4,5,4,null,2204997326584988589,7997961660331289189,8763906081360257030,'2025-06-18','2023-12-18','2023-12-16','2023-12-16','k','i','d','t','y','c','o','a'),(29,0,5,-4,4,null,null,7562098503580472041,929168144988769048,'2026-01-18','2023-12-11','2023-12-10','2024-01-31','p','d','j','j','j','h','f','p'),(30,5,-10,-4,4,3945007524910600918,null,-8466778503120120353,-9169615505661358433,'2023-12-13','2024-01-19','2023-12-16','2023-12-10',null,'p','g','d','e','e','r','u'),(31,5,4,8,6,-7544567449016691208,-7026985677386241453,-2698203866546802012,-8383194363413620107,'2024-01-09','2027-01-09','2025-02-18','2025-02-18','f','t','g','n','r','i','p','o'),(32,-4,null,7,-10,-5468978947503379654,-5676001133436456624,-5328902013300281884,2338117992866157501,'2023-12-20','2023-12-15','2023-12-20','2024-01-08','f','z','y','t','j','c','e','x'),(33,-10,6,-10,-10,6715916167220457165,-3864032264700366706,7115861918737510196,-937991761308321600,'2025-02-18','2024-02-18','2023-12-19','2024-02-18','x',null,'t','x','h','o','p','v'),(34,-4,8,9,-10,-4718823602932239136,-3633212199616285968,-5190227402771860745,5545611345261203982,'2024-01-08','2026-01-18','2024-02-18','2023-12-16','f','t','n','h',null,'y','e','u'),(35,-4,3,-10,8,null,7722389449895645140,-4965839022248115530,6494405496923526511,'2023-12-10','2024-02-18','2026-02-18','2024-01-09','u','t','a','t','w',null,'h','w'),(36,5,6,-10,0,null,null,84960662585385706,2611830596442233539,null,'2026-01-18','2023-12-15','2026-01-18','b','t','p','b','g','g','z','k'),(37,-10,-10,3,-10,null,-5462312886211329186,-2793882411087244594,7564921654378090880,'2025-06-18','2027-01-09','2027-01-16','2023-12-09','n','k','l','z','y','i','o','c'),(38,4,null,-10,3,null,2065313248357950073,2398686393322288278,-5793325226082177083,'2023-12-14','2024-01-17','2023-12-12','2024-01-31','m',null,'n','c','g','f','r','m'),(39,5,1,9,0,-2901110266746457515,-7419676417711330947,5568223068212783910,-8443206843568552423,'2023-12-20','2023-12-15','2024-02-18','2024-01-17','j',null,'x','m','c','u','j','a'),(40,-4,5,-4,-4,3686987810771014559,4528672918224579415,-531153650185309112,-4795413900154192584,'2023-12-12','2024-01-19','2024-01-31','2024-01-19','m','o','k','p','v','s','f','c'),(41,null,6,-10,-10,1371451390800312645,-945321182848207621,-8418988114521301883,-8987180461079691062,'2024-01-09','2023-12-10','2023-12-19','2023-12-12','s','i','x','u','h','e','q','y'),(42,-10,null,2,1,null,-2863490765313461654,3110048825870954129,-2547950560699735251,'2025-06-18','2024-01-08','2023-12-10','2023-12-10','d','y','d','h','t','o','t','w'),(43,3,0,4,1,-7282895869404970499,5532011705197458854,-4502369753730677912,-3032934141238479600,'2023-12-18','2024-02-18','2023-12-19','2026-02-18','w',null,'m','n','g',null,'j','q'),(44,null,null,2,9,5430716729257430348,null,-8208477558683957238,-7953995265596299120,'2023-12-18','2023-12-18','2023-12-11','2025-06-18','w','w','a','u','k','k','j','q'),(45,6,-4,-10,1,-8903356732633014005,null,2532821444113211740,-2346292639048659545,'2024-01-08','2023-12-12','2025-02-18','2023-12-19','v','b','k','e','i','q','h','l'),(46,7,-10,-10,-10,null,-6646527298990960109,-7898216427196445987,-1558528416630681469,null,'2027-01-09','2024-02-18','2025-02-17','k','d','o','n','h','g','x','p'),(47,3,6,3,7,-6864291355591117572,4024432796468900765,-6272917113481022986,-1984131539617763529,'2024-01-17','2024-01-17','2025-06-18','2025-06-18','c','p','t','y','i','c','y','i'),(48,9,null,1,-4,null,-7244007199905240117,8657019614874868097,-492287318340969091,'2024-02-18','2023-12-11','2024-01-09','2027-01-09',null,null,'m','i','t','k','r','x'),(49,1,null,1,5,8407263822602373073,-3275760834800206047,-2117832965174816037,5807219087033669504,'2023-12-13','2024-01-19','2023-12-16','2024-02-18','r','n','n','o','r','g','j','q'); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_select_bug_1 """ SELECT col_int_undef_signed_not_null, col_date_undef_signed_not_null FROM ${table1} AS table1 diff --git a/regression-test/suites/inverted_index_p0/test_index_rqg_bug4.groovy b/regression-test/suites/inverted_index_p0/test_index_rqg_bug4.groovy index b29532c12c371b..41e3c178f6b55a 100644 --- a/regression-test/suites/inverted_index_p0/test_index_rqg_bug4.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_rqg_bug4.groovy @@ -126,7 +126,7 @@ suite("test_index_rqg_bug4", "test_index_rqg_bug"){ try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select diff --git a/regression-test/suites/inverted_index_p0/test_index_skip_read_data.groovy b/regression-test/suites/inverted_index_p0/test_index_skip_read_data.groovy index 1c4a92a26d774c..20a400bca3a2b5 100644 --- a/regression-test/suites/inverted_index_p0/test_index_skip_read_data.groovy +++ b/regression-test/suites/inverted_index_p0/test_index_skip_read_data.groovy @@ -21,7 +21,7 @@ suite("test_index_skip_read_data", "p0"){ def indexTbName2 = "test_index_skip_read_data_mow" def indexTbName3 = "test_index_skip_read_data_mor" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // dup sql "DROP TABLE IF EXISTS ${indexTbName1}" @@ -54,7 +54,7 @@ suite("test_index_skip_read_data", "p0"){ qt_sql16 """ SELECT k1 FROM ${indexTbName1} WHERE k2 = 20 ORDER BY k1,k2,data; """ qt_sql17 """ SELECT k1, k2 FROM ${indexTbName1} WHERE data = 300 ORDER BY k1,k2,data; """ qt_sql18 """ SELECT k1, k2 FROM ${indexTbName1} WHERE data = 400 ORDER BY k1,k2,data; """ - + // mow diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index.groovy index ff719eed032aaa..0ea4c4acce7685 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index.groovy @@ -21,7 +21,7 @@ suite("test_inverted_index", "inverted_index") { def jobStateResult = sql """ SHOW ALTER TABLE COLUMN WHERE TableName='${tableName}' ORDER BY createtime DESC LIMIT 1 """ return jobStateResult[0][9] } - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql "DROP TABLE IF EXISTS ${tbName1}" sql """ CREATE TABLE IF NOT EXISTS ${tbName1} ( @@ -245,7 +245,7 @@ suite("test_inverted_index", "inverted_index") { ) UNIQUE KEY(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11) DISTRIBUTED BY HASH(k1) BUCKETS 5 - PROPERTIES ( + PROPERTIES ( "replication_num" = "1", "enable_unique_key_merge_on_write" = "true" ); diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_collection_stats.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_collection_stats.groovy index 2b118436c07f55..3614c81147e825 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_collection_stats.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_collection_stats.groovy @@ -19,9 +19,9 @@ import java.util.regex.Pattern suite('test_inverted_index_collection_stats', 'p0') { def indexTbName1 = "test_inverted_index_collection_stats_tbl" - + sql "DROP TABLE IF EXISTS ${indexTbName1}" - + sql """ CREATE TABLE ${indexTbName1} ( `id` int(11) NULL COMMENT "", @@ -35,17 +35,16 @@ suite('test_inverted_index_collection_stats', 'p0') { "replication_allocation" = "tag.location.default: 1" ); """ - + sql """ INSERT INTO ${indexTbName1} VALUES (1, 'hello world'), (2, 'hello doris'), (3, 'doris is great') """ - + sql "sync" - + // Enable profile sql """ set enable_profile = true; """ sql """ set profile_level = 2; """ - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ - + sql """ set enable_segment_limit_pushdown = true; """ + // Execute MATCH_ALL query which triggers CollectionStatistics::collect def queryId = "test_inverted_index_collection_stats_${System.currentTimeMillis()}" try { @@ -53,7 +52,7 @@ suite('test_inverted_index_collection_stats', 'p0') { run { sql "/* ${queryId} */ select score() as score from ${indexTbName1} where content match_all 'hello' order by score desc limit 10" } - + check { profileString, exception -> def statisticsCollectTime = 0 def matcher = Pattern.compile("StatisticsCollectTime:\\s*(\\d+)").matcher(profileString) diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_io_timer.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_io_timer.groovy index 43bbe78ba12a4d..71ce0600043e83 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_io_timer.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_io_timer.groovy @@ -21,11 +21,11 @@ suite('test_inverted_index_io_timer', 'p0') { if (!isCloudMode()) { return; } - + def indexTbName1 = "test_inverted_index_io_timer_tbl" - + sql "DROP TABLE IF EXISTS ${indexTbName1}" - + // Create table with inverted index using httplogs schema sql """ CREATE TABLE ${indexTbName1} ( @@ -46,15 +46,15 @@ suite('test_inverted_index_io_timer', 'p0') { "replication_allocation" = "tag.location.default: 1" ); """ - + // Define data loading function def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -84,23 +84,22 @@ suite('test_inverted_index_io_timer', 'p0') { } } } - + try { // Load 1000 documents load_httplogs_data.call(indexTbName1, indexTbName1, 'true', 'json', 'documents-1000.json') - + sql "sync" - + // Enable profile sql """ set enable_profile = true; """ sql """ set profile_level = 2; """ sql """ set enable_sql_cache = false; """ sql """ set enable_inverted_index_searcher_cache = false; """ sql """ set enable_inverted_index_query_cache = false; """ - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_match_without_inverted_index = false; """ - + // Execute query with inverted index using profile def queryId = "test_inverted_index_io_timer_${System.currentTimeMillis()}" try { @@ -108,7 +107,7 @@ suite('test_inverted_index_io_timer', 'p0') { run { sql "/* ${queryId} */ select * from ${indexTbName1} where request match 'images' order by `@timestamp` limit 10" } - + check { profileString, exception -> def local = 0 def remote = 0 @@ -136,11 +135,11 @@ suite('test_inverted_index_io_timer', 'p0') { throw e } } - + // Also verify the query returns correct result def result = sql "select count(*) from ${indexTbName1} where request match 'images'" assertTrue(result[0][0] > 0, "Should have at least one row matching 'images'") - + log.info("Test completed successfully: InvertedIndexIOTimer is greater than 0") } finally { // Clean up diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_keyword.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_keyword.groovy index fbc584d7dd4cb1..5b6a0bda118d2c 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_keyword.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_keyword.groovy @@ -42,7 +42,7 @@ suite("test_inverted_index_keyword"){ "replication_allocation" = "tag.location.default: 1" ); """ - + def var_result = sql "show variables" logger.info("show variales result: " + var_result ) @@ -68,7 +68,7 @@ suite("test_inverted_index_keyword"){ (3, '我在北京市'), (3, '我在西安市') """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql "SELECT * FROM ${indexTblName} where c match '330204195805121025'"; qt_sql "SELECT * FROM ${indexTblName} where c match '36'"; qt_sql "SELECT * FROM ${indexTblName} where c match '330225197806187713'"; diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_mor.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_mor.groovy index 64073b18610ef8..37fd4016d801d4 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_mor.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_mor.groovy @@ -48,7 +48,7 @@ suite("test_inverted_index_mor", "p0"){ sql """ INSERT INTO $indexTblName VALUES (1, 2, 12, 1.2, '1 2'), (3, 4, 34, 3.4, '3 4'); """ sql """ INSERT INTO $indexTblName VALUES (11, 12, 1112, 11.12, '11 22'), (13, 14, 1314, 13.14, '13 14'); """ - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ // original data qt_11 """ SELECT * FROM $indexTblName ORDER BY k1,k2 """ diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_null.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_null.groovy index b9c8ed6119a458..b4af93de92d894 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_null.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_null.groovy @@ -53,7 +53,7 @@ suite("test_inverted_index_null") { (7,'tengxun','qie','addr gg','lj',null), (8,'tengxun2','qie',null,'lj',800) """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // select all data qt_select_0 "SELECT * FROM ${table1} ORDER BY id" diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_null_ram_dir.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_null_ram_dir.groovy index 425cea7b4cfb15..5ecd15d68d46ca 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_null_ram_dir.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_null_ram_dir.groovy @@ -52,7 +52,7 @@ suite("test_inverted_index_null_ram_dir") { String backend_id; backend_id = backendId_to_backendIP.keySet()[0] def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - + logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) assertEquals(code, 0) def configList = parseJson(out.trim()) @@ -105,7 +105,7 @@ suite("test_inverted_index_null_ram_dir") { (7,'tengxun','qie','addr gg','lj',null), (8,'tengxun2','qie',null,'lj',800) """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // select all data qt_select_0 "SELECT * FROM ${tableName} ORDER BY id" diff --git a/regression-test/suites/inverted_index_p0/test_inverted_index_v2_file_size.groovy b/regression-test/suites/inverted_index_p0/test_inverted_index_v2_file_size.groovy index c0eae0ccd4a50d..b9994e57ecffef 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_index_v2_file_size.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_index_v2_file_size.groovy @@ -83,7 +83,7 @@ suite("test_index_index_V2_file_size", "nonConcurrent") { //TabletId,ReplicaId,BackendId,SchemaHash,Version,LstSuccessVersion,LstFailedVersion,LstFailedTime,LocalDataSize,RemoteDataSize,RowCount,State,LstConsistencyCheckTime,CheckVersion,VersionCount,PathHash,MetaUrl,CompactionStatus def tablets = sql_return_maparray """ show tablets from ${tableName}; """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ INSERT INTO ${tableName} VALUES (1, "andy", "andy love apple", 100); """ sql """ INSERT INTO ${tableName} VALUES (1, "bason", "bason hate pear", 99); """ diff --git a/regression-test/suites/inverted_index_p0/test_inverted_is_null.groovy b/regression-test/suites/inverted_index_p0/test_inverted_is_null.groovy index 20987910d67638..89afe253418d5d 100644 --- a/regression-test/suites/inverted_index_p0/test_inverted_is_null.groovy +++ b/regression-test/suites/inverted_index_p0/test_inverted_is_null.groovy @@ -42,7 +42,7 @@ suite("test_inverted_is_null", "p0") { (4, NULL, 'qux', 10) """ - sql "SET enable_common_expr_pushdown=true" + sql "SET enable_segment_limit_pushdown=true" sql "SET inverted_index_skip_threshold=0" def nullBranchQuery = """ diff --git a/regression-test/suites/inverted_index_p0/test_ip_cidr_search_with_inverted_index.groovy b/regression-test/suites/inverted_index_p0/test_ip_cidr_search_with_inverted_index.groovy index cc2b871142b505..93cc250797c808 100644 --- a/regression-test/suites/inverted_index_p0/test_ip_cidr_search_with_inverted_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_ip_cidr_search_with_inverted_index.groovy @@ -47,7 +47,7 @@ suite("test_ip_cidr_search_with_inverted_index", "nonConcurrent"){ qt_sql """ select count() from tc_ip_cidr_search_with_inverted_index""" // without inverted index query - sql """ set enable_common_expr_pushdown = false; """ + sql """ set enable_segment_limit_pushdown = false; """ sql """ set enable_inverted_index_query=false; """ // select ipv6 in ipv4 cidr qt_sql_without_ii_0 """ select id, ipv4, ipv6, is_ip_address_in_range(ipv6, '255.255.255.255/12') from tc_ip_cidr_search_with_inverted_index where is_ip_address_in_range(ipv6, '255.255.255.255/12') order by id; """ @@ -68,8 +68,8 @@ suite("test_ip_cidr_search_with_inverted_index", "nonConcurrent"){ qt_sql_without_ii_9 """ select id, ipv4, ipv6, is_ip_address_in_range(ipv6, null) from tc_ip_cidr_search_with_inverted_index where is_ip_address_in_range(ipv6, null) order by id; """ // with inverted index query - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_inverted_index_query=true; """ sql """ set inverted_index_skip_threshold = 0; """ // set skip threshold to 0 diff --git a/regression-test/suites/inverted_index_p0/test_is_null_expr.groovy b/regression-test/suites/inverted_index_p0/test_is_null_expr.groovy index 22f890f9223a66..8df9026ef0aa27 100644 --- a/regression-test/suites/inverted_index_p0/test_is_null_expr.groovy +++ b/regression-test/suites/inverted_index_p0/test_is_null_expr.groovy @@ -20,7 +20,7 @@ suite("test_is_null_expr", "p0, nonConcurrent") { // define a sql table def testTable = "test_is_null_expr" - sql """ DROP TABLE IF EXISTS ${testTable} """ + sql """ DROP TABLE IF EXISTS ${testTable} """ sql """ CREATE TABLE ${testTable} ( `k` int(11) NULL COMMENT "", @@ -52,8 +52,8 @@ suite("test_is_null_expr", "p0, nonConcurrent") { GetDebugPoint().enableDebugPointForAllBEs(checkpoints_name, [filtered_rows: expectedFilteredRows]) sql "set experimental_enable_parallel_scan = false" sql " set inverted_index_skip_threshold = 0 " - sql " set enable_common_expr_pushdown_for_inverted_index = true" - sql " set enable_common_expr_pushdown = true" + sql " set enable_segment_limit_pushdown = true" + sql " set enable_segment_limit_pushdown = true" sql " set enable_parallel_scan = false" sql "sync" sql "${sqlQuery}" @@ -62,7 +62,7 @@ suite("test_is_null_expr", "p0, nonConcurrent") { GetDebugPoint().disableDebugPointForAllBEs("segment_iterator.apply_inverted_index") } } - + queryAndCheck (" select * from ${testTable} where v2 is not null; ", 0) queryAndCheck (" select * from ${testTable} where v2 is not null or v3 = 'c'; ", 0) queryAndCheck (" select * from ${testTable} where v2 is null or v3 = 'c'; ", 2) diff --git a/regression-test/suites/inverted_index_p0/test_lowercase.groovy b/regression-test/suites/inverted_index_p0/test_lowercase.groovy index 3de3b3da7329ef..7526d305e47688 100644 --- a/regression-test/suites/inverted_index_p0/test_lowercase.groovy +++ b/regression-test/suites/inverted_index_p0/test_lowercase.groovy @@ -56,7 +56,7 @@ suite("test_lowercase"){ "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "INSERT INTO $indexTblName2 VALUES (1, 'hello 我来到北京清华大学'), (2, 'HELLO 我爱你中国'), (3, 'Hello 人民可以得到更多实惠');" qt_sql "SELECT * FROM $indexTblName2 WHERE c MATCH 'hello' ORDER BY id"; diff --git a/regression-test/suites/inverted_index_p0/test_match_or_null_semantics.groovy b/regression-test/suites/inverted_index_p0/test_match_or_null_semantics.groovy index f869490bd35a59..b875f0e123a83b 100644 --- a/regression-test/suites/inverted_index_p0/test_match_or_null_semantics.groovy +++ b/regression-test/suites/inverted_index_p0/test_match_or_null_semantics.groovy @@ -18,7 +18,7 @@ suite("test_match_or_null_semantics") { // This test verifies the fix for the bug in InvertedIndexResultBitmap::operator|=() // in inverted_index_reader.h where NULL bitmaps were incorrectly combined using OR - // instead of AND for MATCH syntax queries with enable_common_expr_pushdown=true + // instead of AND for MATCH syntax queries with enable_segment_limit_pushdown=true // // Bug location: be/src/olap/rowset/segment_v2/inverted_index_reader.h:138 // The bug caused rows with (TRUE OR NULL) to be incorrectly filtered out @@ -70,7 +70,7 @@ suite("test_match_or_null_semantics") { """ // Enable pushdown to trigger the bug in InvertedIndexResultBitmap::operator|= - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" // Test 1: Core bug scenario - cross-field OR with NULL // Before fix: returned 1 row (only row 16, lost 15 rows with NULL content) @@ -147,7 +147,7 @@ suite("test_match_or_null_semantics") { logger.info("Test 7 PASSED: NOT OR with NULL correctly excludes all rows") // Test 8: Verify behavior without pushdown (should still work correctly) - sql "SET enable_common_expr_pushdown = false" + sql "SET enable_segment_limit_pushdown = false" def test8 = sql """ SELECT COUNT(*) FROM ${tableName} diff --git a/regression-test/suites/inverted_index_p0/test_match_query_without_index.groovy b/regression-test/suites/inverted_index_p0/test_match_query_without_index.groovy index 61a564c51d86ae..4eb46a943d0bb9 100644 --- a/regression-test/suites/inverted_index_p0/test_match_query_without_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_match_query_without_index.groovy @@ -59,7 +59,7 @@ suite("test_match_query_without_index", "inverted_index_select"){ ("san zhang", "grade 5", "", "", "", 10, "2017-10-01", "tall:100cm, weight: 30kg, hobbies:", "", ""), ("li sisi", "grade 6", "li ba", "li liuliu", "", 11, "2016-10-01", "tall:150cm, weight: 40kg, hobbies: sing, dancing, running", "good at handiwork and beaty", "") """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // case1: match any try { sql """ select * from ${indexTbName1} where ${varchar_colume1} match_any "" order by name; """ diff --git a/regression-test/suites/inverted_index_p0/test_need_read_data.groovy b/regression-test/suites/inverted_index_p0/test_need_read_data.groovy index 9c80019e46ab95..62b82b926ca6ee 100644 --- a/regression-test/suites/inverted_index_p0/test_need_read_data.groovy +++ b/regression-test/suites/inverted_index_p0/test_need_read_data.groovy @@ -73,7 +73,7 @@ suite("test_need_read_data", "p0"){ sql """ insert into ${indexTbName1}(pk,col_int_undef_signed,col_int_undef_signed_index_inverted,col_int_undef_signed_not_null,col_int_undef_signed_not_null_index_inverted,col_bigint_undef_signed,col_bigint_undef_signed_index_inverted,col_bigint_undef_signed_not_null,col_bigint_undef_signed_not_null_index_inverted,col_date_undef_signed,col_date_undef_signed_index_inverted,col_date_undef_signed_not_null,col_date_undef_signed_not_null_index_inverted,col_varchar_10__undef_signed,col_varchar_10__undef_signed_index_inverted,col_varchar_10__undef_signed_not_null,col_varchar_10__undef_signed_not_null_index_inverted,col_varchar_1024__undef_signed,col_varchar_1024__undef_signed_index_inverted,col_varchar_1024__undef_signed_not_null,col_varchar_1024__undef_signed_not_null_index_inverted) values (0,null,4,4,-10,-2806067520539703493,-6601893530499828925,-7112891289289392099,-4883682982770875774,'2024-02-18','2025-02-18','2026-02-18','2025-06-18','s',null,'p','h','m','v','p','y'),(1,null,null,-4,5,null,5288406618687277699,2255222069393083918,-7885696364844049115,null,'2023-12-12','2025-02-18','2025-02-17','r','u','f','q','n','x','q','b'),(2,1,null,3,-10,4359919727878435225,3857327739249958938,-1608704987438726460,3650073478443923028,'2025-06-18','2024-02-18','2023-12-11','2023-12-13','s','p','x','u','e','k','l','c'),(3,4,-4,-4,9,null,-2952515504097288835,-5248236183608833050,-959402810989602748,null,'2024-01-09','2023-12-12','2023-12-11','i','f','r','m','y','j','z','h'),(4,3,-10,-10,-10,7595845588678689951,1807745217759831665,-3269384278721380385,-2626336667443528939,'2024-01-31','2023-12-13','2024-02-18','2023-12-15','c','b','q','a','k',null,'c','q'),(5,2,3,-10,1,4845076071359725577,-2081520813928284051,7965382457542866166,-1263489703824567045,'2023-12-20','2025-02-18','2025-02-17','2023-12-12',null,'p','v','k','s',null,'c','y'),(6,-4,7,-4,1,null,-312662439708631344,5986577765852616616,4340850184105875353,'2023-12-16','2024-01-17','2024-01-19','2026-02-18','s','q','w','z','m','a','v','z'),(7,5,-10,5,4,2838843073924070168,1039278568099501661,-2970064881715473209,-3546456947974778751,'2023-12-15','2024-01-31','2023-12-18','2024-01-08','m','t','t','y','y',null,'l','l'),(8,null,1,7,4,8007492376294713910,994564705132157298,-4772736062894230873,7998340640624222727,'2023-12-13','2027-01-09','2024-02-18','2024-01-19','t',null,'p','n','j','l','g','c'),(9,8,5,2,0,-3365354435906005141,6104736481079857939,-9027968242311553543,8197347709168535456,'2023-12-20','2024-02-18','2023-12-10','2024-02-18','t',null,'p','h','b','e','w','a'),(10,4,5,9,3,null,-4270500778304447716,7975155833293678874,-5070901586921449703,'2024-01-19','2024-01-19','2027-01-09','2024-02-18','d','b','o','p','b','r','f','q'),(11,5,-4,3,-4,9029358127154882937,-6951089794937682659,2630099804275038168,-5951780849025883849,null,null,'2024-01-17','2023-12-18','k','b','s','t','z','w','r','y'),(12,3,-4,1,-4,309499821905665998,null,9039699521215326765,1922704068231658563,'2023-12-17','2024-02-18','2025-06-18','2027-01-09','m','z','l','l','c',null,'h','a'),(13,4,null,7,1,-8088552747885790045,null,4290463296755479391,-143636852574500943,'2023-12-15','2024-02-18','2023-12-11','2023-12-16',null,'o','j','r',null,'l','p','z'),(14,null,3,8,-4,-2114077344204837001,null,-2621506620475509311,3516417267200208461,'2023-12-20','2024-01-09','2023-12-18','2024-01-31','q','d','u','y','k','o','l','o'),(15,5,0,3,1,null,469795947256142816,-3769981987932056248,-5475689888751280017,'2025-06-18',null,'2024-02-18','2025-06-18','y','c','r','o','y','p','o','x'),(16,-4,5,6,2,-5508267849003968462,3862598879377665395,8797778903170766625,383525525986717298,'2024-02-18','2023-12-11','2024-01-17','2023-12-17','s','c','m','c',null,null,'s','o'),(17,-4,6,6,0,-1057012716454277307,-8435107454217223314,-120847043370486063,-7398709528414815558,'2027-01-16','2024-02-18','2025-02-17','2024-01-17',null,'f','u','d','l','a','h','r'),(18,2,6,1,-10,null,339922889780584305,8187645881248196657,9163411866066071700,'2023-12-14','2024-01-08','2024-01-31','2023-12-13','u',null,'y','a','v','v','u','z'),(19,8,-4,9,-10,null,null,-5043486900779665508,6743373354123723422,'2023-12-19','2023-12-14','2024-01-17','2023-12-14','u','t','z','o','b','n','y','t'),(20,-4,7,-4,0,-14388658393529797,null,4788467486005193064,545093836722695629,'2025-06-18','2024-02-18','2027-01-09','2023-12-09','u','b','u','r','e',null,'f','o'),(21,-4,-4,4,8,2245289792981551579,-4485687312935149586,-6812240256635951381,8434108874554436761,'2023-12-09','2023-12-16','2026-02-18','2023-12-09',null,'k','v','q','r',null,'z','e'),(22,-4,3,3,1,-1218928283971104430,null,4325982422669856960,-3538203895099667724,'2027-01-16',null,'2024-02-18','2023-12-19',null,null,'v','e','u','n','q','h'),(23,-4,0,7,7,null,null,-8073893843395705054,-5272967641252019267,'2024-01-17','2027-01-09','2024-01-19','2023-12-14','n','q','o','t','e',null,'w','u'),(24,-10,3,-10,5,null,-8586767268780407575,3995596016735621711,429810224315638782,'2025-06-18','2026-02-18','2023-12-18','2023-12-14','m','p','k','e',null,'l','m','j'),(25,9,null,8,9,-7406209357285295571,8508527424784069010,-6700207760307684345,-6778419266053660893,'2024-01-31','2023-12-15','2025-06-18','2023-12-20',null,null,'t','f','b','k','e','b'),(26,-4,7,-10,1,549615970930886740,-8537815265488791461,9105177114666776852,808842453982447397,'2023-12-14','2026-02-18','2025-06-18','2023-12-18','z','g','v','b','m','s','b','r'),(27,6,8,-4,0,2363364623910847992,2435555377853278383,-7059658388492780701,1808647950247830538,'2023-12-14','2023-12-14','2027-01-09','2025-06-18',null,null,'o','q','i','g','i','u'),(28,-4,-4,0,-10,2837109330712127287,3258333757532106070,-5486400602525569363,7454355268455905775,'2023-12-18','2024-01-09','2025-06-18','2024-01-17',null,'e','h','j',null,'u','a','y'),(29,7,-4,5,-4,-3944687198069417525,7676519542662933720,6921050061010821518,8686366976901132291,'2026-01-18','2024-01-17','2024-02-18','2024-01-08',null,'a','d','y','i','l','r','h'),(30,-4,null,4,7,null,3744030733185485721,-6094790559118439736,-5022434353993604500,'2023-12-09','2023-12-20','2025-06-18','2023-12-14','u','a','o','m','c','n','o','z'),(31,1,4,2,9,-6750407042384384034,-2505324657561681875,5301019286095013646,3139887746721886789,null,'2023-12-15','2024-01-08','2023-12-17','q','q','u','x','b','m','z','p'),(32,-4,null,9,9,null,-1729390457612771468,6708980039726745192,-7293963935049205901,'2024-02-18','2023-12-17','2023-12-13','2023-12-11','d',null,'v','m','e','f','w','y'),(33,4,5,-10,9,3535708249298387360,-8975616986595863107,-862904611806478134,-3482957162935231780,'2024-02-18','2023-12-20','2023-12-19','2025-02-18','b','h','c','v','s','b','e','e'),(34,-4,null,-4,0,null,-2891436930426307984,-1704292540467538099,-8564095007543756456,'2023-12-13','2027-01-09','2025-02-18','2026-02-18',null,null,'f','t','w','s','z','h'),(35,-10,5,8,8,-5214808208417488395,null,-7973404656651152899,-7504002864628497355,'2023-12-19','2023-12-10','2025-02-18','2023-12-12','v','x','f','t','q','x','t','n'),(36,5,5,6,-10,null,-5034216029789478132,7055943879035021136,3694646370699507306,'2027-01-09','2024-01-19','2025-06-18','2025-06-18',null,'s','t','d',null,'w','r','i'),(37,-4,-4,4,8,-8353588562907627230,-4962760661862938335,-6383251065296502747,-3956983090211228295,'2023-12-11','2024-01-08','2023-12-16','2024-02-18','u','j','w','g','w','r','c','f'),(38,-10,-10,-4,-4,null,null,247919645069562206,8288875655774835875,'2025-02-17','2026-01-18','2023-12-11','2026-02-18','u','m','y','a','k',null,'d','g'),(39,2,9,4,0,-202685904718522032,5896989546064098495,5695022708672839468,-7757738794882960533,'2027-01-09','2023-12-15','2027-01-16','2023-12-16','c','u','l','z',null,'d','x','h'),(40,null,null,7,7,4835497339758608794,-5034982165921306189,548692450913004773,-5189451515582531492,'2024-01-19','2024-01-19','2024-02-18','2023-12-11','w',null,'m','b','w','u','t','u'),(41,5,0,6,3,-4294233837078291532,null,-4951306529377186523,-6918657392711546234,'2023-12-15','2023-12-15','2023-12-09','2024-01-09',null,'p','c','b','a','i','j','n'),(42,null,-4,-10,9,-1890221339559069903,-9174324348086863583,-7768565663714277414,1583589820059033801,'2024-01-19','2024-01-31','2026-02-18','2024-02-18','i','x','z','z',null,'s','n','h'),(43,null,8,4,6,null,-3040322546432413315,-7308614762246284846,-7065674754425766028,'2023-12-20','2024-02-18','2025-02-17','2024-02-18','z','z','l','l','a','j','p','f'),(44,8,-10,8,7,3533075847821605226,-8953779906693032030,-4566442548311033242,-6944000050952871345,'2025-02-18','2023-12-19','2023-12-16','2024-01-31','i','h','n','u','j','y','r','g'),(45,8,-4,6,-4,null,null,-6687031592408843506,-2644229079223766810,'2023-12-12','2025-02-18','2023-12-12','2024-01-09',null,'y','j','b','p','l','c','c'),(46,4,-4,-10,-4,4827922355005130144,2170052469942214303,-1634163889160521502,2246460621190812016,'2023-12-15','2023-12-11','2024-01-08','2025-02-18',null,null,'t','x','n','i','e','l'),(47,null,4,8,7,null,-7852983538684806346,-8869292859054504183,-7739200759355598281,null,'2023-12-17','2025-06-18','2024-01-17','i','r','m','s',null,'m','j','r'),(48,-10,7,9,0,-4878175313227689694,6741975426332123319,-384904760880798675,3671673134248536674,null,'2023-12-15','2023-12-09','2025-02-18','w','y','w','b','z','s','l','g'),(49,3,-4,8,-10,1403956186045671649,null,6070888386247696636,6864331793839321007,null,'2024-01-08','2027-01-16','2026-01-18','p','z','b','i','t','u','q','f'); """ sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ SELECT COUNT( *) AS field1, col_int_undef_signed AS field2 FROM ${indexTbName1} WHERE( col_date_undef_signed_not_null_index_inverted == '2024-01-01' OR day( col_date_undef_signed_not_null_index_inverted ) !=0 ) GROUP BY field2 ORDER BY field2; """ @@ -136,8 +136,8 @@ suite("test_need_read_data", "p0"){ logger.info("show variales result: " + var_result ) sql "INSERT INTO ${indexTblName3} VALUES (1, 1),(1, -2),(1, -1);" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=false,inverted_index_skip_threshold=100) */ id FROM ${indexTblName3} WHERE value<0 and abs(value)>1;" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true,inverted_index_skip_threshold=100) */ id FROM ${indexTblName3} WHERE value<0 and abs(value)>1;" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown = false,inverted_index_skip_threshold=100) */ id FROM ${indexTblName3} WHERE value<0 and abs(value)>1;" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,inverted_index_skip_threshold=100) */ id FROM ${indexTblName3} WHERE value<0 and abs(value)>1;" sql "DROP TABLE IF EXISTS tt" sql """ diff --git a/regression-test/suites/inverted_index_p0/test_no_index_match.groovy b/regression-test/suites/inverted_index_p0/test_no_index_match.groovy index dafdb6455313a1..e2abe5e1a04497 100644 --- a/regression-test/suites/inverted_index_p0/test_no_index_match.groovy +++ b/regression-test/suites/inverted_index_p0/test_no_index_match.groovy @@ -41,11 +41,11 @@ suite("test_no_index_match", "p0") { def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -84,7 +84,7 @@ suite("test_no_index_match", "p0") { sql """ INSERT INTO ${testTable} VALUES (1, '1', '', 1, 1); """ sql 'sync' - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ try { qt_sql """ select count() from ${testTable} where (request match_any 'hm bg'); """ diff --git a/regression-test/suites/inverted_index_p0/test_null_index.groovy b/regression-test/suites/inverted_index_p0/test_null_index.groovy index a11e3dde7c4066..e0eed2e84cd871 100644 --- a/regression-test/suites/inverted_index_p0/test_null_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_null_index.groovy @@ -44,7 +44,7 @@ suite("test_null_index", "p0"){ "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "INSERT INTO $indexTblName VALUES (1, 'a', null, [null], [1]), (2, 'b', 'b', ['b'], [2]), (3, 'c', 'c', ['c'], [3]);" qt_sql "SELECT * FROM $indexTblName WHERE str match null order by id;" qt_sql "SELECT * FROM $indexTblName WHERE str_null match null order by id;" @@ -70,7 +70,7 @@ suite("test_null_index", "p0"){ "replication_allocation" = "tag.location.default: 1" ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "INSERT INTO $indexTblName2 VALUES (1, 'a', null, [null], [1]), (2, 'b', 'b', ['b'], [2]), (3, 'c', 'c', ['c'], [3]);" qt_sql "SELECT * FROM $indexTblName2 WHERE str match null order by id;" qt_sql "SELECT * FROM $indexTblName2 WHERE str_null match null order by id;" diff --git a/regression-test/suites/inverted_index_p0/test_omit_norms.groovy b/regression-test/suites/inverted_index_p0/test_omit_norms.groovy index 6f3d72e49c5f31..2c26a770a036a1 100644 --- a/regression-test/suites/inverted_index_p0/test_omit_norms.groovy +++ b/regression-test/suites/inverted_index_p0/test_omit_norms.groovy @@ -50,8 +50,8 @@ suite("test_omit_norms", "nonConcurrent") { sql """ INSERT INTO ${testTableNoOmitNorms} VALUES (893964673, '26.1.0.1', 'GET /images/hello.jpg HTTP/1.0', 200, 1000); """ sql """ INSERT INTO ${testTableNoOmitNorms} VALUES (893964674, '26.1.0.2', 'POST /api/test HTTP/1.0', 200, 5000); """ sql 'sync' - sql "set enable_common_expr_pushdown = true;" - + sql "set enable_segment_limit_pushdown = true;" + log.info("========== Test Case 1: No Analyzer (omitNorms=true, no .nrm file) ==========") @@ -63,7 +63,7 @@ suite("test_omit_norms", "nonConcurrent") { // Test 1.3: BM25 match_all query on table without analyzer (no .nrm file) qt_sql_no_omit_all """ SELECT request, score() as score FROM ${testTableNoOmitNorms} WHERE request MATCH_PHRASE_PREFIX 'POST' ORDER BY score LIMIT 5; """ - + // Test case 2: With analyzer - always create .nrm file // When _should_analyzer = true, omitNorms is set to false, so .nrm file IS created // Note: We use separate table for verification but don't use qt_sql to avoid output file issues @@ -119,17 +119,17 @@ suite("test_omit_norms", "nonConcurrent") { } } - + // Assertions to verify the behavior log.info("========== Verification & Assertions ==========") - + log.info("") log.info("========== Test Completed Successfully ==========") log.info("Summary:") log.info("- Test Case 1 (No Analyzer): omitNorms=true, .nrm file NOT created") log.info(" Result: All BM25 queries executed successfully") log.info("") - log.info("- Test Case 2 (With Analyzer): omitNorms=false, .nrm file created") + log.info("- Test Case 2 (With Analyzer): omitNorms=false, .nrm file created") log.info(" Result: All BM25 queries executed successfully") log.info("") log.info("- Key Finding: Both tables return same number of rows for identical queries") diff --git a/regression-test/suites/inverted_index_p0/test_or_not_match.groovy b/regression-test/suites/inverted_index_p0/test_or_not_match.groovy index 488639aae6eba4..0aca03a1d67378 100644 --- a/regression-test/suites/inverted_index_p0/test_or_not_match.groovy +++ b/regression-test/suites/inverted_index_p0/test_or_not_match.groovy @@ -39,7 +39,7 @@ suite("test_or_not_match", "p0") { // load the json data streamLoad { table "${tableName}" - + // set http request header params set 'read_json_by_line', 'true' set 'format', 'json' @@ -64,7 +64,7 @@ suite("test_or_not_match", "p0") { sql "set enable_nereids_planner = true" sql "set enable_fallback_to_original_planner = false" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql "select request from ${tableName} where request like '1.0' or not request MATCH 'GETA' order by request limit 2;" } diff --git a/regression-test/suites/inverted_index_p0/test_pinyin_phrase.groovy b/regression-test/suites/inverted_index_p0/test_pinyin_phrase.groovy index a766c1e55129ff..8acbcc90fded4d 100644 --- a/regression-test/suites/inverted_index_p0/test_pinyin_phrase.groovy +++ b/regression-test/suites/inverted_index_p0/test_pinyin_phrase.groovy @@ -17,7 +17,7 @@ suite("test_pinyin_phrase", "p0") { def indexTbName = "test_pinyin_phrase_table" - + sql """ set enable_match_without_inverted_index = false """ // Create pinyin analyzer @@ -32,14 +32,14 @@ suite("test_pinyin_phrase", "p0") { // Drop table if exists sql "DROP TABLE IF EXISTS ${indexTbName}" - + // Create table with inverted index using pinyin analyzer sql """ CREATE TABLE ${indexTbName} ( `a` bigint NOT NULL AUTO_INCREMENT(1), `ch` text NULL, INDEX idx_ch (`ch`) USING INVERTED PROPERTIES( - "analyzer" = "cp_test", + "analyzer" = "cp_test", "support_phrase" = "true" ) ) ENGINE=OLAP @@ -58,7 +58,7 @@ suite("test_pinyin_phrase", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql_1 """ SELECT a, ch FROM ${indexTbName} WHERE search('ch:"合作"') ORDER BY a; """ qt_sql_2 """ SELECT a, ch FROM ${indexTbName} WHERE search('ch:"高峰论坛"') ORDER BY a; """ diff --git a/regression-test/suites/inverted_index_p0/test_pk_no_need_read_data.groovy b/regression-test/suites/inverted_index_p0/test_pk_no_need_read_data.groovy index 1641d0e3e16a46..8b7d6d41b03197 100644 --- a/regression-test/suites/inverted_index_p0/test_pk_no_need_read_data.groovy +++ b/regression-test/suites/inverted_index_p0/test_pk_no_need_read_data.groovy @@ -54,7 +54,7 @@ suite("test_pk_no_need_read_data", "p0"){ // case1: enable count on index sql "set enable_count_on_index_pushdown = true" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_select_0 "SELECT COUNT() FROM ${table1} WHERE date='2017-10-01'" qt_select_1 "SELECT COUNT() FROM ${table1} WHERE year(date)='2017'" diff --git a/regression-test/suites/inverted_index_p0/test_search_or_null_semantics.groovy b/regression-test/suites/inverted_index_p0/test_search_or_null_semantics.groovy index 9d31011529985e..81450a8b379b82 100644 --- a/regression-test/suites/inverted_index_p0/test_search_or_null_semantics.groovy +++ b/regression-test/suites/inverted_index_p0/test_search_or_null_semantics.groovy @@ -73,13 +73,13 @@ suite("test_search_or_null_semantics") { (20, 'Tech Article', NULL, 'Academic', 'Education') """ - sql "SET enable_common_expr_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" // Test 1: The core bug scenario - cross-field OR with one field NULL // Before fix: SEARCH returned 1 row (only row 16, lost 15 rows with NULL content) // After fix: SEARCH returns 16 rows (rows 1-16) def test1 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH('title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar")') """ @@ -88,7 +88,7 @@ suite("test_search_or_null_semantics") { // Test 2: Verify the 15 critical rows are included def test2 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE title MATCH_ALL 'Philosophy' AND content IS NULL AND SEARCH('title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar")') @@ -99,7 +99,7 @@ suite("test_search_or_null_semantics") { // Test 3: Three-way OR with different NULL patterns def test3 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH('title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar") OR author:ANY(Political)') """ @@ -108,7 +108,7 @@ suite("test_search_or_null_semantics") { // Test 4: OR within AND with NULL def test4 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH('category:Education AND (title:ALL(Philosophy) OR content:ALL(Disney))') """ @@ -118,7 +118,7 @@ suite("test_search_or_null_semantics") { // Test 5: Deeply nested OR with multiple NULL fields def test5 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH(' (title:ALL(Philosophy) OR content:ALL(Disney)) OR (author:ANY(Writer) OR category:Technology) @@ -132,13 +132,13 @@ suite("test_search_or_null_semantics") { // Test 6: Verify SQL three-valued logic truth table for OR // TRUE OR NULL = TRUE def test6a = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE (title MATCH_ALL 'Philosophy' AND content IS NULL) """ assertEquals(15, test6a[0][0], "Should have 15 rows with TRUE OR NULL pattern") def test6b = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE (title MATCH_ALL 'Philosophy' AND content IS NULL) AND SEARCH('title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar")') """ @@ -147,7 +147,7 @@ suite("test_search_or_null_semantics") { // Test 7: Complex nested query similar to original bug report def test7 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH(' title:ALL(Philosophy) OR NOT ( @@ -177,23 +177,23 @@ suite("test_search_or_null_semantics") { // Rows 17-20: no match -> NOT no_match = TRUE (included) // Result: 4 rows def test8_standard = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH('NOT (title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar"))', '{"mode":"standard"}') """ assertEquals(0, test8_standard[0][0], "Standard mode: NOT OR should exclude all rows due to NULL semantics") def test8_lucene = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH('NOT (title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar"))') """ assertEquals(4, test8_lucene[0][0], "Lucene mode: NOT OR returns 4 rows (rows 17-20, no match treated as FALSE)") logger.info("Test 8 PASSED: NOT OR with NULL works correctly in both modes") // Test 9: Verify SEARCH works with and without pushdown - sql "SET enable_common_expr_pushdown = false" + sql "SET enable_segment_limit_pushdown = false" def test9 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE SEARCH('title:ALL(Philosophy) OR content:ALL("Disney+ Hotstar")') """ diff --git a/regression-test/suites/inverted_index_p0/test_single_column_multi_index.groovy b/regression-test/suites/inverted_index_p0/test_single_column_multi_index.groovy index bacd6b3f6ce0c5..71fa7dd47fc3a2 100644 --- a/regression-test/suites/inverted_index_p0/test_single_column_multi_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_single_column_multi_index.groovy @@ -20,7 +20,7 @@ suite("test_single_column_multi_index", "nonConcurrent") { def backendId_to_backendIP = [:] def backendId_to_backendHttpPort = [:] getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort) - + boolean disableAutoCompaction = false def tableName = "test_single_column_multi_index" @@ -50,11 +50,11 @@ suite("test_single_column_multi_index", "nonConcurrent") { def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -174,8 +174,7 @@ suite("test_single_column_multi_index", "nonConcurrent") { // Function to run match queries with debug points def runMatchQueries = { -> - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + sql """ set enable_segment_limit_pushdown = true; """ GetDebugPoint().enableDebugPointForAllBEs("VMatchPredicate.execute") try { @@ -201,10 +200,10 @@ suite("test_single_column_multi_index", "nonConcurrent") { def checkAndUpdateBeConfig = { -> def invertedIndexCompactionEnable = false def has_update_be_config = false - + String backend_id = backendId_to_backendIP.keySet()[0] def (code, out, err) = show_be_config(backendId_to_backendIP.get(backend_id), backendId_to_backendHttpPort.get(backend_id)) - + logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err) assertEquals(code, 0) def configList = parseJson(out.trim()) @@ -221,7 +220,7 @@ suite("test_single_column_multi_index", "nonConcurrent") { logger.info("disable_auto_compaction: ${((List) ele)[2]}") } } - + return invertedIndexCompactionEnable } @@ -234,7 +233,7 @@ suite("test_single_column_multi_index", "nonConcurrent") { runMatchQueries() def invertedIndexCompactionEnable = checkAndUpdateBeConfig() - + try { set_be_config.call("inverted_index_compaction_enable", "true") check_config.call("inverted_index_compaction_enable", "true") @@ -248,7 +247,7 @@ suite("test_single_column_multi_index", "nonConcurrent") { assert(false) } } - + // Verify rowset count before compaction int rowsetCount = get_rowset_count.call(tablets) assert (rowsetCount == 11 * replicaNum) diff --git a/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy b/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy index b07f168e1f6c74..408eb449c4ef97 100644 --- a/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy +++ b/regression-test/suites/inverted_index_p0/test_single_column_multi_index1.groovy @@ -41,11 +41,11 @@ suite("test_single_column_multi_index1", "p0") { def load_httplogs_data = {table_name, label, read_flag, format_flag, file_name, ignore_failure=false, expected_succ_rows = -1, load_to_single_tablet = 'true' -> - + // load the json data streamLoad { table "${table_name}" - + // set http request header params set 'label', label + "_" + UUID.randomUUID().toString() set 'read_json_by_line', read_flag @@ -86,8 +86,7 @@ suite("test_single_column_multi_index1", "p0") { // Function to run match queries with debug points def runMatchQueries = { -> - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + sql """ set enable_segment_limit_pushdown = true; """ try { qt_sql """ select /*+ SET_VAR(enable_match_without_inverted_index = true) */ count() from ${tableName} where (request = 'GET /images/hm_bg.jpg HTTP/1.0'); """ qt_sql """ select /*+ SET_VAR(enable_match_without_inverted_index = true) */ count() from ${tableName} where (request match 'images'); """ @@ -144,11 +143,11 @@ suite("test_single_column_multi_index1", "p0") { wait_for_latest_op_on_table_finish(tableName, timeout) sql """ alter table ${tableName} add index request_keyword_idx(`request`) USING INVERTED;; """ wait_for_latest_op_on_table_finish(tableName, timeout) - + loadTestData() runMatchQueries() - + if (!isCloudMode()) { sql """ BUILD INDEX request_text_idx ON ${tableName}; """ wait_for_build_index_on_partition_finish(tableName, timeout) diff --git a/regression-test/suites/inverted_index_p0/test_stopwords.groovy b/regression-test/suites/inverted_index_p0/test_stopwords.groovy index f9f8c8339a76de..31e30cf6e48f58 100644 --- a/regression-test/suites/inverted_index_p0/test_stopwords.groovy +++ b/regression-test/suites/inverted_index_p0/test_stopwords.groovy @@ -42,7 +42,7 @@ suite("test_stopwords", "p0"){ try { sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select * from ${indexTbName} where b match 'a'; """ qt_sql """ select * from ${indexTbName} where b match 'are'; """ diff --git a/regression-test/suites/inverted_index_p0/topn_clear_block.groovy b/regression-test/suites/inverted_index_p0/topn_clear_block.groovy index 78d541bcb4a07d..cbf50797b3a79b 100644 --- a/regression-test/suites/inverted_index_p0/topn_clear_block.groovy +++ b/regression-test/suites/inverted_index_p0/topn_clear_block.groovy @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -suite("test_clear_block") { +suite("test_clear_block") { // load data def load_data = { loadTableName, fileName -> @@ -40,14 +40,14 @@ suite("test_clear_block") { } sql """ set enable_match_without_inverted_index = false; """ - sql """ set enable_common_expr_pushdown = true """ - // sql """ set + sql """ set enable_segment_limit_pushdown = true """ + // sql """ set def dupTableName = "dup_httplogs" sql """ drop table if exists ${dupTableName} """ // create table sql """ CREATE TABLE IF NOT EXISTS dup_httplogs - ( + ( `id` bigint NOT NULL AUTO_INCREMENT(100), `@timestamp` int(11) NULL, `clientip` varchar(20) NULL, @@ -83,7 +83,7 @@ suite("test_clear_block") { sql """ sync """ qt_sql """ SELECT clientip from ${dupTableName} WHERE clientip NOT IN (NULL, '') or clientip IN ('17.0.0.0') ORDER BY id LIMIT 2 """ - + def result1 = sql """ SELECT clientip from ${dupTableName} WHERE clientip NOT IN (NULL, '') or clientip IN ('17.0.0.0') ORDER BY id LIMIT 5000 """ def result2 = sql """ SELECT clientip from ${dupTableName} WHERE clientip NOT IN (NULL, '') or clientip IN ('17.0.0.0') ORDER BY id LIMIT 5000 """ if (result1 != result2) { @@ -91,5 +91,5 @@ suite("test_clear_block") { logger.info("result2 is: {}", result2) assertTrue(false) } - + } \ No newline at end of file diff --git a/regression-test/suites/inverted_index_p0/unique_with_mow/test_mow_with_null_sequence.groovy b/regression-test/suites/inverted_index_p0/unique_with_mow/test_mow_with_null_sequence.groovy index ef266e23432fea..b31a47e5bdd707 100644 --- a/regression-test/suites/inverted_index_p0/unique_with_mow/test_mow_with_null_sequence.groovy +++ b/regression-test/suites/inverted_index_p0/unique_with_mow/test_mow_with_null_sequence.groovy @@ -38,7 +38,7 @@ suite("test_mow_with_null_sequence", "inverted_index") { ); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ insert into $tableName values('a', 'zhang san', 'address1', NULL) """ sql """ insert into $tableName values('a', 'zhang si', 'address2', '2022-10-20') """ @@ -74,7 +74,7 @@ suite("test_mow_with_null_sequence", "inverted_index") { qt_sql17 """ select * from $tableName where c_name match_all 'zhang si' and c_date < '2022-11-20' order by c_custkey """ qt_sql18 """ select * from $tableName where c_name match_all 'zhang yi' order by c_custkey """ qt_sql19 """ select * from $tableName where c_name match_all 'zhang yi' and c_date is not null order by c_custkey """ - + qt_sql20 """ select * from $tableName where c_name match_all 'li yi' order by c_custkey """ qt_sql21 """ select * from $tableName where c_name match_all 'li yi' and (c_date < '2022-11-20' or c_date >= '2022-12-11') order by c_custkey """ @@ -141,7 +141,7 @@ suite("test_mow_with_null_sequence", "inverted_index") { qt_sql38 """ select * from $tableName where c_name match_all 'zhang si' and c_int < 0 order by c_custkey """ qt_sql39 """ select * from $tableName where c_name match_all 'zhang yi' order by c_custkey """ qt_sql40 """ select * from $tableName where c_name match_all 'zhang yi' and c_int > 100 order by c_custkey """ - + qt_sql41 """ select * from $tableName where c_name match_all 'li yi' order by c_custkey """ qt_sql42 """ select * from $tableName where c_name match_all 'li yi' and c_int < 0 order by c_custkey """ qt_sql43 """ select * from $tableName where c_name match_all 'li yi' and (c_int < 0 or c_int is null) order by c_custkey """ diff --git a/regression-test/suites/inverted_index_p0/unique_with_mow/test_pk_uk_case.groovy b/regression-test/suites/inverted_index_p0/unique_with_mow/test_pk_uk_case.groovy index e433ccaa06bfce..1b0d454334a1bf 100644 --- a/regression-test/suites/inverted_index_p0/unique_with_mow/test_pk_uk_case.groovy +++ b/regression-test/suites/inverted_index_p0/unique_with_mow/test_pk_uk_case.groovy @@ -95,7 +95,7 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { PROPERTIES ( "replication_num" = "1", "enable_unique_key_merge_on_write" = "false" - ) + ) """ Random rd = new Random() @@ -113,7 +113,7 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { city = RandomStringUtils.randomAlphabetic(10) name = UUID.randomUUID().toString() sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ sql """ INSERT INTO ${tableNameUk} VALUES @@ -126,11 +126,11 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { city = RandomStringUtils.randomAlphabetic(10) name = UUID.randomUUID().toString() sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ @@ -139,7 +139,7 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { city = RandomStringUtils.randomAlphabetic(10) name = UUID.randomUUID().toString() sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ sql """ INSERT INTO ${tableNameUk} VALUES @@ -152,28 +152,28 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { city = RandomStringUtils.randomAlphabetic(10) name = UUID.randomUUID().toString() sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ - + order_key = rd.nextInt(10) part_key = rd.nextInt(10) city = RandomStringUtils.randomAlphabetic(10) name = UUID.randomUUID().toString() sql """ INSERT INTO ${tableNamePk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ sql """ INSERT INTO ${tableNameUk} VALUES - ($order_key, $part_key, $sub_key, $line_num, + ($order_key, $part_key, $sub_key, $line_num, $decimal, $decimal, $decimal, $decimal, '1', '1', '$date', '$date', '$date', '$name', '$name', '$city') """ - // insert batch key + // insert batch key order_key = rd.nextInt(10) part_key = rd.nextInt(10) city = RandomStringUtils.randomAlphabetic(10) @@ -192,7 +192,7 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { """ sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // count(*) def result0 = sql """ SELECT count(*) FROM ${tableNamePk}; """ @@ -239,14 +239,14 @@ suite("test_pk_uk_case_unique_with_mow", "inverted_index") { ORDER BY l_returnflag, l_linestatus - """ + """ assertEquals(result0.size(), result1.size()) for (int i = 0; i < result0.size(); ++i) { for (int j = 0; j < result0[0].size(); j++) { logger.info("result: " + result0[i][j] + "|" + result1[i][j]) assertEquals(result0[i][j], result1[i][j]) } - } + } // delete if (idx % 10 == 0) { diff --git a/regression-test/suites/inverted_index_p0/unique_with_mow/test_primary_key_simple_case.groovy b/regression-test/suites/inverted_index_p0/unique_with_mow/test_primary_key_simple_case.groovy index 0c437e4fe1b50f..66917d19694518 100644 --- a/regression-test/suites/inverted_index_p0/unique_with_mow/test_primary_key_simple_case.groovy +++ b/regression-test/suites/inverted_index_p0/unique_with_mow/test_primary_key_simple_case.groovy @@ -66,7 +66,7 @@ suite("test_primary_key_simple_case", "inverted_index") { sql """ INSERT INTO ${tableName} VALUES (5, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 20) """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ def result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ assertTrue(result.size() == 5) @@ -104,7 +104,7 @@ suite("test_primary_key_simple_case", "inverted_index") { result = sql """ SELECT * FROM ${tableName} t ORDER BY user_id; """ assertTrue(result.size() == 6) - // insert batch key + // insert batch key sql """ INSERT INTO ${tableName} VALUES (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 22), (7, '2017-10-01', 'Beijing', 10, 1, NULL, NULL, '2020-01-05', 1, 34, 23), diff --git a/regression-test/suites/inverted_index_p0/unique_with_mow/test_unique_mow_sequence.groovy b/regression-test/suites/inverted_index_p0/unique_with_mow/test_unique_mow_sequence.groovy index c2a8b673f04396..921f3c36d0eb8b 100644 --- a/regression-test/suites/inverted_index_p0/unique_with_mow/test_unique_mow_sequence.groovy +++ b/regression-test/suites/inverted_index_p0/unique_with_mow/test_unique_mow_sequence.groovy @@ -76,7 +76,7 @@ suite("test_unique_mow_sequence", "inverted_index") { } sql "sync" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ order_qt_sql "select * from $tableName where c_custkey < 6;" diff --git a/regression-test/suites/inverted_index_p1/need_read_data/test_dup_table_inverted_index.groovy b/regression-test/suites/inverted_index_p1/need_read_data/test_dup_table_inverted_index.groovy index 8b474788759d13..fb30bfac684064 100644 --- a/regression-test/suites/inverted_index_p1/need_read_data/test_dup_table_inverted_index.groovy +++ b/regression-test/suites/inverted_index_p1/need_read_data/test_dup_table_inverted_index.groovy @@ -672,7 +672,7 @@ suite("test_dup_table_inverted_index", "p1") { try { sql """ set enable_match_without_inverted_index = true """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ def dupTableName = "dup_httplogs" sql """ drop table if exists ${dupTableName} """ // create table @@ -752,9 +752,9 @@ suite("test_dup_table_inverted_index", "p1") { compare_result(dup_result5, dup_result6, all_dup_sql) compare_result(dup_result3, dup_result6, all_dup_sql) - def dup_result7 = execute_sql.call("enable_common_expr_pushdown_for_inverted_index", "true", all_dup_sql) + def dup_result7 = execute_sql.call("enable_segment_limit_pushdown", "true", all_dup_sql) logger.info("dup_result7 is {}", dup_result7); - def dup_result8 = execute_sql.call("enable_common_expr_pushdown_for_inverted_index", "false", all_dup_sql) + def dup_result8 = execute_sql.call("enable_segment_limit_pushdown", "false", all_dup_sql) logger.info("dup_result8 is {}", dup_result8); compare_result(dup_result7, dup_result8, all_dup_sql) compare_result(dup_result3, dup_result8, all_dup_sql) diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q01.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q01.sql index 70bee6b036fe12..2f0838026e1715 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q01.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q01.sql @@ -1,27 +1,27 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'Database') OR array_contains(body, 'Database') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM articles_uk_array WHERE array_contains(title, 'database') OR array_contains(body, 'database'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'Tutorial') OR array_contains(body, 'Tutorial') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'MySQL') OR array_contains(body, 'MySQL') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'Database') OR array_contains(body, 'Database') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM articles_uk_array WHERE array_contains(title, 'database') OR array_contains(body, 'database'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'Tutorial') OR array_contains(body, 'Tutorial') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'MySQL') OR array_contains(body, 'MySQL') ORDER BY id; -- NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(IF(array_contains(title, 'database') OR array_contains(body, 'database'), 1, NULL)) as count FROM articles_uk_array; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(IF(array_contains(title, 'database') OR array_contains(body, 'database'), 1, NULL)) as count FROM articles_uk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE (array_contains(title, 'MySQL') AND NOT array_contains(title, 'YourSQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE (array_contains(title, 'MySQL') AND NOT array_contains(title, 'YourSQL')) OR (array_contains(body, 'MySQL') AND NOT array_contains(body, 'YourSQL')) ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'DBMS Security') OR array_contains(body, 'DBMS Security') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'MySQL YourSQL') OR array_contains(body, 'MySQL YourSQL') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'DBMS Security') OR array_contains(body, 'DBMS Security') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE array_contains(title, 'MySQL YourSQL') OR array_contains(body, 'MySQL YourSQL') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE (array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE (array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) AND NOT (array_contains(title, 'Well stands') OR array_contains(body, 'Well stands')) ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE (array_contains(title, 'YourSQL') OR array_contains(body, 'YourSQL')) - OR ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE (array_contains(title, 'YourSQL') OR array_contains(body, 'YourSQL')) + OR ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) AND NOT (array_contains(title, 'Tricks Security') OR array_contains(body, 'Tricks Security'))) ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) AND NOT (array_contains(title, 'Tricks Security') OR array_contains(body, 'Tricks Security'))) AND NOT (array_contains(title, 'YourSQL') OR array_contains(body, 'YourSQL')) ORDER BY id; -- match phrase, NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_uk_array WHERE title MATCH_PHRASE 'following database' OR body MATCH_PHRASE 'following database'; \ No newline at end of file +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_uk_array WHERE title MATCH_PHRASE 'following database' OR body MATCH_PHRASE 'following database'; \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q02.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q02.sql index 558d2b9bf4d753..f17b426c1b61e4 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q02.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/basic_q02.sql @@ -1,27 +1,27 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'Database') OR array_contains(body, 'Database') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM articles_dk_array WHERE array_contains(title, 'database') OR array_contains(body, 'database'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'Tutorial') OR array_contains(body, 'Tutorial') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'MySQL') OR array_contains(body, 'MySQL') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'Database') OR array_contains(body, 'Database') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM articles_dk_array WHERE array_contains(title, 'database') OR array_contains(body, 'database'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'Tutorial') OR array_contains(body, 'Tutorial') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'MySQL') OR array_contains(body, 'MySQL') ORDER BY id; -- NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(IF(array_contains(title, 'database') OR array_contains(body, 'database'), 1, NULL)) as count FROM articles_dk_array; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(IF(array_contains(title, 'database') OR array_contains(body, 'database'), 1, NULL)) as count FROM articles_dk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE (array_contains(title, 'MySQL') AND NOT array_contains(title, 'YourSQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE (array_contains(title, 'MySQL') AND NOT array_contains(title, 'YourSQL')) OR (array_contains(body, 'MySQL') AND NOT array_contains(body, 'YourSQL')) ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'DBMS Security') OR array_contains(body, 'DBMS Security') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'MySQL YourSQL') OR array_contains(body, 'MySQL YourSQL') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'DBMS Security') OR array_contains(body, 'DBMS Security') ORDER BY id; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE array_contains(title, 'MySQL YourSQL') OR array_contains(body, 'MySQL YourSQL') ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE (array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE (array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) AND NOT (array_contains(title, 'Well stands') OR array_contains(body, 'Well stands')) ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE (array_contains(title, 'YourSQL') OR array_contains(body, 'YourSQL')) - OR ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE (array_contains(title, 'YourSQL') OR array_contains(body, 'YourSQL')) + OR ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) AND NOT (array_contains(title, 'Tricks Security') OR array_contains(body, 'Tricks Security'))) ORDER BY id; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE ((array_contains(title, 'MySQL') OR array_contains(body, 'MySQL')) AND NOT (array_contains(title, 'Tricks Security') OR array_contains(body, 'Tricks Security'))) AND NOT (array_contains(title, 'YourSQL') OR array_contains(body, 'YourSQL')) ORDER BY id; -- match phrase, NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM articles_dk_array WHERE title MATCH_PHRASE 'following database' OR body MATCH_PHRASE 'following database'; \ No newline at end of file +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM articles_dk_array WHERE title MATCH_PHRASE 'following database' OR body MATCH_PHRASE 'following database'; \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q01.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q01.sql index 79b75171f554bb..29ab0b9add21e9 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q01.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q01.sql @@ -1,40 +1,40 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'collections' OR array_contains(b, 'collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'indexes' OR array_contains(b, 'indexes') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'indexes collections' OR array_contains(b, 'indexes collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'only' OR array_contains(b, 'only') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'collections' OR array_contains(b, 'collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'indexes' OR array_contains(b, 'indexes') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'indexes collections' OR array_contains(b, 'indexes collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'only' OR array_contains(b, 'only') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'support' OR array_contains(b, 'support')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'support' OR array_contains(b, 'support')) AND NOT (a MATCH_ANY 'collections' OR array_contains(b, 'collections')) ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'support collections' OR array_contains(b, 'support collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'support collections' OR array_contains(b, 'support collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) AND (a MATCH_ANY 'collections' OR array_contains(b, 'collections')) ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ALL 'support collections' OR array_contains(b, 'support collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'search' OR array_contains(b, 'search') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ALL 'support collections' OR array_contains(b, 'support collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY 'search' OR array_contains(b, 'search') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) AND (a MATCH_ANY 'support vector' OR array_contains(b, 'support vector')) ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) AND NOT (a MATCH_ANY 'support vector' OR array_contains(b, 'support vector')) ORDER BY a; -- NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ *, (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) AS x FROM fulltext_t1_uk; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ *, (a MATCH_ANY 'collections support' OR array_contains(b, 'collections support')) AS x FROM fulltext_t1_uk; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ *, (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) AS x FROM fulltext_t1_uk; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ *, (a MATCH_ANY 'collections support' OR array_contains(b, 'collections support')) AS x FROM fulltext_t1_uk; -- match phrase, NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_PHRASE 'support now' OR b MATCH_PHRASE 'support now'; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_PHRASE 'Now sUPPort' OR b MATCH_PHRASE 'Now sUPPort'; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_PHRASE 'support now' OR b MATCH_PHRASE 'support now'; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_PHRASE 'Now sUPPort' OR b MATCH_PHRASE 'Now sUPPort'; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') -- OR (a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'); --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') -- AND NOT (a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY '"space model' OR array_contains(b, '"space model') ORDER BY a; \ No newline at end of file +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_uk_array WHERE a MATCH_ANY '"space model' OR array_contains(b, '"space model') ORDER BY a; \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q02.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q02.sql index 04a52f77dae6fb..3eebda6d21b0ec 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q02.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/fulltext_q02.sql @@ -1,40 +1,40 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'collections' OR array_contains(b, 'collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'indexes' OR array_contains(b, 'indexes') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'indexes collections' OR array_contains(b, 'indexes collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'only' OR array_contains(b, 'only') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'collections' OR array_contains(b, 'collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'indexes' OR array_contains(b, 'indexes') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'indexes collections' OR array_contains(b, 'indexes collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'only' OR array_contains(b, 'only') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'support' OR array_contains(b, 'support')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'support' OR array_contains(b, 'support')) AND NOT (a MATCH_ANY 'collections' OR array_contains(b, 'collections')) ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'support collections' OR array_contains(b, 'support collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'support collections' OR array_contains(b, 'support collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) AND (a MATCH_ANY 'collections' OR array_contains(b, 'collections')) ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ALL 'support collections' OR array_contains(b, 'support collections') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'search' OR array_contains(b, 'search') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ALL 'support collections' OR array_contains(b, 'support collections') ORDER BY a; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY 'search' OR array_contains(b, 'search') ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) AND (a MATCH_ANY 'support vector' OR array_contains(b, 'support vector')) ORDER BY a; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_ANY 'search' OR array_contains(b, 'search')) AND NOT (a MATCH_ANY 'support vector' OR array_contains(b, 'support vector')) ORDER BY a; -- NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ *, (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) AS x FROM fulltext_t1_dk; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ *, (a MATCH_ANY 'collections support' OR array_contains(b, 'collections support')) AS x FROM fulltext_t1_dk; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ *, (a MATCH_ANY 'support collections' OR array_contains(b, 'support collections')) AS x FROM fulltext_t1_dk; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ *, (a MATCH_ANY 'collections support' OR array_contains(b, 'collections support')) AS x FROM fulltext_t1_dk; -- match phrase, NOT SUPPORT: --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_PHRASE 'support now' OR b MATCH_PHRASE 'support now'; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_PHRASE 'Now sUPPort' OR b MATCH_PHRASE 'Now sUPPort'; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_PHRASE 'support now' OR b MATCH_PHRASE 'support now'; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_PHRASE 'Now sUPPort' OR b MATCH_PHRASE 'Now sUPPort'; +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'; --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') -- OR (a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'); --- SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') +-- SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE (a MATCH_PHRASE 'text search' OR b MATCH_PHRASE 'text search') -- AND NOT (a MATCH_PHRASE 'now support' OR b MATCH_PHRASE 'now support'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY '"space model' OR array_contains(b, '"space model') ORDER BY a; \ No newline at end of file +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ * FROM fulltext_t1_dk_array WHERE a MATCH_ANY '"space model' OR array_contains(b, '"space model') ORDER BY a; \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q01.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q01.sql index e98a4853460ab1..79823cef5f2d6a 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q01.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q01.sql @@ -1,34 +1,34 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ FTS_DOC_ID FROM large_records_t1_uk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49') order by FTS_DOC_ID; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ FTS_DOC_ID FROM large_records_t1_uk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49') order by FTS_DOC_ID; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')) AND (a MATCH_ANY 'row5col1word49' OR array_contains(b, 'row5col1word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND (a MATCH_ANY 'row35col1word49 row35col2word40' OR array_contains(b, 'row35col1word49 row35col2word40')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND NOT (a MATCH_ANY 'row45col2word49' OR array_contains(b, 'row45col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word40'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_uk_array WHERE a MATCH_ANY 'ROW35col2WORD49' OR array_contains(b, 'ROW35col2WORD49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ a,b FROM large_records_t1_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ a,b FROM large_records_t1_uk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')) AND (a MATCH_ANY 'row5col1word49' OR array_contains(b, 'row5col1word49')) ORDER BY FTS_DOC_ID; diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q02.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q02.sql index 44606c49cfece8..61d14df34e56f0 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q02.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q02.sql @@ -1,34 +1,34 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ FTS_DOC_ID FROM large_records_t1_dk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49') order by FTS_DOC_ID; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ FTS_DOC_ID FROM large_records_t1_dk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49') order by FTS_DOC_ID; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')) AND (a MATCH_ANY 'row5col1word49' OR array_contains(b, 'row5col1word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND (a MATCH_ANY 'row35col1word49 row35col2word40' OR array_contains(b, 'row35col1word49 row35col2word40')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND NOT (a MATCH_ANY 'row45col2word49' OR array_contains(b, 'row45col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word40'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t1_dk_array WHERE a MATCH_ANY 'ROW35col2WORD49' OR array_contains(b, 'ROW35col2WORD49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ a,b FROM large_records_t1_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ a,b FROM large_records_t1_dk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')) AND (a MATCH_ANY 'row5col1word49' OR array_contains(b, 'row5col1word49')) ORDER BY FTS_DOC_ID; diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q03.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q03.sql index 21cf33e32ec2b7..fcb5ac3a61a5d6 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q03.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q03.sql @@ -1,28 +1,28 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ FTS_DOC_ID FROM large_records_t2_uk_array WHERE array_contains(b, 'row30col2word30'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ FTS_DOC_ID FROM large_records_t2_uk_array WHERE array_contains(b, 'row30col2word30'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ FTS_DOC_ID FROM large_records_t2_uk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ FTS_DOC_ID FROM large_records_t2_uk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')) AND (a MATCH_ANY 'row5col1word49' OR array_contains(b, 'row5col1word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND (a MATCH_ANY 'row35col1word49 row35col2word40' OR array_contains(b, 'row35col1word49 row35col2word40')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND NOT (a MATCH_ANY 'row45col2word49' OR array_contains(b, 'row45col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array WHERE a MATCH_ANY 'row5col2word49 row5col2word40' OR array_contains(b, 'row5col2word49 row5col2word40'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_uk_array WHERE a MATCH_ALL 'ROW35col2WORD49' OR array_contains(b, 'ROW35col2WORD49'); \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q04.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q04.sql index 07ed01e8214499..596282d768a55c 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q04.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q04.sql @@ -1,28 +1,28 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ FTS_DOC_ID FROM large_records_t2_dk_array WHERE array_contains(b, 'row30col2word30'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ FTS_DOC_ID FROM large_records_t2_dk_array WHERE array_contains(b, 'row30col2word30'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ FTS_DOC_ID FROM large_records_t2_dk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ FTS_DOC_ID FROM large_records_t2_dk_array WHERE a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')) AND (a MATCH_ANY 'row5col1word49' OR array_contains(b, 'row5col1word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array WHERE (a MATCH_ANY 'row5col2word49' OR array_contains(b, 'row5col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND (a MATCH_ANY 'row35col1word49 row35col2word40' OR array_contains(b, 'row35col1word49 row35col2word40')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array WHERE (a MATCH_ANY 'row35col2word49' OR array_contains(b, 'row35col2word49')) AND NOT (a MATCH_ANY 'row45col2word49' OR array_contains(b, 'row45col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array WHERE a MATCH_ANY 'row5col2word49 row5col2word40' OR array_contains(b, 'row5col2word49 row5col2word40'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t2_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t2_dk_array WHERE a MATCH_ALL 'ROW35col2WORD49' OR array_contains(b, 'ROW35col2WORD49'); \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q05.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q05.sql index 0f8c868354f1b4..9f1cba9c7223cf 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q05.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q05.sql @@ -1,18 +1,18 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_uk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_uk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND NOT (a MATCH_ANY 'row45col2word49' OR array_contains(b, 'row45col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_uk_array WHERE (a MATCH_ANY 'sameroww' OR array_contains(b, 'sameroww')); \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q06.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q06.sql index e90491cd3b046a..3702a552560235 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q06.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q06.sql @@ -1,18 +1,18 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_dk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_dk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND NOT (a MATCH_ANY 'row45col2word49' OR array_contains(b, 'row45col2word49')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t3_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t3_dk_array WHERE (a MATCH_ANY 'sameroww' OR array_contains(b, 'sameroww')); \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q07.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q07.sql index 493eb09405d832..149ebcd792b8b4 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q07.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q07.sql @@ -1,17 +1,17 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_uk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_uk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND (a MATCH_ANY '1050' OR array_contains(b, '1050')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_uk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND NOT (a MATCH_ANY '1050' OR array_contains(b, '1050')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE a MATCH_ANY '2001' OR array_contains(b, '2001'); \ No newline at end of file +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_uk_array WHERE a MATCH_ANY '2001' OR array_contains(b, '2001'); \ No newline at end of file diff --git a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q08.sql b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q08.sql index 94c8de6600366d..375d6940abc94d 100644 --- a/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q08.sql +++ b/regression-test/suites/mysql_fulltext_array_contains/sql/large_records_q08.sql @@ -1,17 +1,17 @@ -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_dk_array; +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_dk_array; -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword'); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND (a MATCH_ANY '1050' OR array_contains(b, '1050')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_dk_array +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE (a MATCH_ANY 'samerowword' OR array_contains(b, 'samerowword')) AND NOT (a MATCH_ANY '1050' OR array_contains(b, '1050')); -SELECT/*+SET_VAR(enable_common_expr_pushdown=true,enable_common_expr_pushdown_for_inverted_index=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE a MATCH_ANY '2001' OR array_contains(b, '2001'); \ No newline at end of file +SELECT/*+SET_VAR(enable_segment_limit_pushdown=true)*/ COUNT(*) FROM large_records_t4_dk_array WHERE a MATCH_ANY '2001' OR array_contains(b, '2001'); \ No newline at end of file diff --git a/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy b/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy index 092a48122c2327..80496648e8c7c4 100644 --- a/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/variant/variant_mv.groovy @@ -584,7 +584,7 @@ suite("variant_mv") { where g2.actor['id'] > 34259289; """ def query3_6 = """ - SELECT /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=0,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=32,parallel_scan_min_rows_per_scanner=64,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=1,enable_parallel_result_sink=false,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_common_expr_pushdown=false,enable_local_exchange=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,enable_common_expr_pushdown_for_inverted_index=false,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ + SELECT /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=0,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=32,parallel_scan_min_rows_per_scanner=64,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=1,enable_parallel_result_sink=false,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=100000,enable_function_pushdown=false,enable_segment_limit_pushdown = false,enable_local_exchange=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ g1.id, g2.type, floor(cast(g1.actor['id'] as int) + 100.5), diff --git a/regression-test/suites/query_p0/join/test_agg_after_nested_loop_join_local_exchange.groovy b/regression-test/suites/query_p0/join/test_agg_after_nested_loop_join_local_exchange.groovy index 91889b319c8a4b..c8902b3752565c 100644 --- a/regression-test/suites/query_p0/join/test_agg_after_nested_loop_join_local_exchange.groovy +++ b/regression-test/suites/query_p0/join/test_agg_after_nested_loop_join_local_exchange.groovy @@ -83,8 +83,7 @@ suite("test_agg_after_nested_loop_join_local_exchange", "query_p0") { sql "SET default_variant_sparse_hash_shard_count = 4" sql "SET disable_join_reorder = true" sql "SET disable_streaming_preaggregations = true" - sql "SET enable_common_expr_pushdown = false" - sql "SET enable_common_expr_pushdown_for_inverted_index = false" + sql "SET enable_segment_limit_pushdown = false" sql "SET enable_distinct_streaming_agg_force_passthrough = false" sql "SET enable_function_pushdown = true" sql "SET enable_local_exchange_before_agg = false" diff --git a/regression-test/suites/restore_p0/test_validate_restore_inverted_idx.groovy b/regression-test/suites/restore_p0/test_validate_restore_inverted_idx.groovy index 1921aeebbf5ce1..128507b6fbd254 100644 --- a/regression-test/suites/restore_p0/test_validate_restore_inverted_idx.groovy +++ b/regression-test/suites/restore_p0/test_validate_restore_inverted_idx.groovy @@ -74,13 +74,13 @@ suite("test_validate_restore_inverted_idx", "validate_restore") { // 1. query with inverted index sql """ set enable_match_without_inverted_index = false """ sql """ set enable_fallback_on_missing_inverted_index = false """ - def res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_common_expr_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "10" """ + def res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_segment_limit_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "10" """ assertTrue(res.size() > 0) // 2. add partition and query sql """ ALTER TABLE ${dbName}.${tableName} ADD PARTITION p8 VALUES LESS THAN ("80") """ sql """ INSERT INTO ${dbName}.${tableName} VALUES (75, "75 750", "76 77") """ - res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_common_expr_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "75" """ + res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_segment_limit_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value MATCH_ANY "75" """ assertTrue(res.size() > 0) // 3. add new index @@ -142,7 +142,7 @@ suite("test_validate_restore_inverted_idx", "validate_restore") { assertTrue(false) } } - res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_common_expr_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value1 MATCH_ANY "12321" """ + res = sql """ SELECT /*+ SET_VAR(inverted_index_skip_threshold = 0, enable_segment_limit_pushdown = true) */ * FROM ${dbName}.${tableName} WHERE value1 MATCH_ANY "12321" """ assertTrue(res.size() > 0) } finally { diff --git a/regression-test/suites/rollup_p0/test_materialized_view_common_expr_push_down.groovy b/regression-test/suites/rollup_p0/test_materialized_view_common_expr_push_down.groovy index 31359db5fdd903..aebb868787f8ff 100644 --- a/regression-test/suites/rollup_p0/test_materialized_view_common_expr_push_down.groovy +++ b/regression-test/suites/rollup_p0/test_materialized_view_common_expr_push_down.groovy @@ -24,7 +24,7 @@ suite("test_materialized_view_common_expr_push_down") { return jobStateResult[0][8] } - sql """set enable_common_expr_pushdown = true""" + sql """set enable_segment_limit_pushdown = true""" sql "DROP TABLE IF EXISTS ${baseTable}" sql """ diff --git a/regression-test/suites/search/test_disable_root_variant_match.groovy b/regression-test/suites/search/test_disable_root_variant_match.groovy index f800e8e23419a0..4236e61b4da352 100644 --- a/regression-test/suites/search/test_disable_root_variant_match.groovy +++ b/regression-test/suites/search/test_disable_root_variant_match.groovy @@ -17,7 +17,7 @@ suite("test_disable_root_variant_match", "p0") { sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -55,7 +55,7 @@ suite("test_disable_root_variant_match", "p0") { test { sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM test_disable_root_variant_match_tbl WHERE response MATCH 'doris' ORDER BY id @@ -64,7 +64,7 @@ suite("test_disable_root_variant_match", "p0") { } def variantSubcolumnMatchResult = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM test_disable_root_variant_match_tbl WHERE response['msg'] MATCH 'doris' ORDER BY id diff --git a/regression-test/suites/search/test_search_boundary_cases.groovy b/regression-test/suites/search/test_search_boundary_cases.groovy index 30ae4aaa9a8261..64b1520f9a5937 100644 --- a/regression-test/suites/search/test_search_boundary_cases.groovy +++ b/regression-test/suites/search/test_search_boundary_cases.groovy @@ -18,8 +18,8 @@ suite("test_search_boundary_cases", "p0") { def tableName = "search_boundary_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -88,71 +88,71 @@ suite("test_search_boundary_cases", "p0") { // Boundary Test 1: All NULL fields qt_boundary_1_all_null_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('field1:anything OR field2:anything OR field3:anything OR field4:anything OR field5:anything', '{"mode":"standard"}') """ qt_boundary_1_all_null_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('field1:anything AND field2:anything AND field3:anything AND field4:anything AND field5:anything', '{"mode":"standard"}') """ // Boundary Test 2: Single field NULL vs multiple fields NULL in OR qt_boundary_2_single_null_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('field1:nonexistent OR field2:test', '{"mode":"standard"}') ORDER BY id """ qt_boundary_2_multiple_null_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('field1:nonexistent OR field2:test OR field3:nonexistent', '{"mode":"standard"}') ORDER BY id """ // Boundary Test 3: NOT with various NULL combinations qt_boundary_3_not_null_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT field1:test', '{"mode":"standard"}') """ qt_boundary_3_external_not_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('field1:test', '{"mode":"standard"}') """ // Boundary Test 4: Empty string vs NULL handling qt_boundary_4_empty_string_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('field1:""', '{"mode":"standard"}') ORDER BY id """ qt_boundary_4_null_field_count """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE field1 IS NULL """ qt_boundary_4_empty_field_count """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE field1 = '' """ // Boundary Test 5: Complex nested boolean with NULLs qt_boundary_5_complex_nested """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('((field1:test OR field2:test) AND (field3:test OR field4:test)) OR field5:test', '{"mode":"standard"}') """ qt_boundary_5_detailed_result """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, field1, field2, field3, field4, field5 FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, field1, field2, field3, field4, field5 FROM ${tableName} WHERE search('((field1:test OR field2:test) AND (field3:test OR field4:test)) OR field5:test', '{"mode":"standard"}') ORDER BY id """ // Boundary Test 6: Large OR query with many NULL fields qt_boundary_6_large_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('field1:"target" OR field1:"keyword" OR field1:"apple" OR field1:"unique1" OR field2:"target" OR field2:"keyword" OR field2:"apple" OR field2:"unique2" OR field3:"target" OR field3:"keyword" OR field3:"banana" OR field3:"unique3" OR @@ -162,36 +162,36 @@ suite("test_search_boundary_cases", "p0") { // Boundary Test 7: Special characters and NULL interaction qt_boundary_7_special_chars_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('field1:special123 OR field2:nonexistent', '{"mode":"standard"}') """ qt_boundary_7_special_chars_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('field1:special123 AND field2:chars456', '{"mode":"standard"}') """ // Boundary Test 8: Case sensitivity with NULL fields qt_boundary_8_case_variations """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('field1:Target OR field2:TARGET OR field3:target OR field4:TaRgEt', '{"mode":"standard"}') ORDER BY id """ // Boundary Test 9: Multiple NOT operations qt_boundary_9_multiple_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT (field1:nonexistent OR field2:nonexistent OR field3:nonexistent)', '{"mode":"standard"}') """ qt_boundary_9_external_multiple_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('field1:nonexistent OR field2:nonexistent OR field3:nonexistent', '{"mode":"standard"}') """ // Boundary Test 10: Performance with NULL-heavy dataset qt_boundary_10_performance """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('(field1:test OR field1:target OR field1:keyword) AND (field2:test OR field2:target OR field2:keyword) AND NOT (field3:nonexistent OR field4:nonexistent OR field5:nonexistent)', '{"mode":"standard"}') diff --git a/regression-test/suites/search/test_search_cache.groovy b/regression-test/suites/search/test_search_cache.groovy index 39af2184bb7a6c..a211fd59b44821 100644 --- a/regression-test/suites/search/test_search_cache.groovy +++ b/regression-test/suites/search/test_search_cache.groovy @@ -50,7 +50,7 @@ suite("test_search_cache", "p0") { // Test 1: Cache consistency - same query returns same results with cache enabled def result1 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id FROM ${tableName} WHERE search('title:apple') ORDER BY id @@ -58,7 +58,7 @@ suite("test_search_cache", "p0") { // Run same query again (should hit cache) def result2 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id FROM ${tableName} WHERE search('title:apple') ORDER BY id @@ -69,7 +69,7 @@ suite("test_search_cache", "p0") { // Test 2: Cache disabled returns same results as cache enabled def result_no_cache = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=false) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=false) */ id FROM ${tableName} WHERE search('title:apple') ORDER BY id @@ -78,14 +78,14 @@ suite("test_search_cache", "p0") { // Test 3: Multi-field query cache consistency def mf_result1 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id FROM ${tableName} WHERE search('title:cherry OR content:tropical') ORDER BY id """ def mf_result2 = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id FROM ${tableName} WHERE search('title:cherry OR content:tropical') ORDER BY id @@ -94,7 +94,7 @@ suite("test_search_cache", "p0") { // Test 4: Different queries produce different cache entries def diff_result = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id FROM ${tableName} WHERE search('title:banana') ORDER BY id @@ -104,14 +104,14 @@ suite("test_search_cache", "p0") { // Test 5: AND query - cache vs no-cache consistency def and_cached = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id, title FROM ${tableName} WHERE search('title:apple AND title:cherry') ORDER BY id """ def and_uncached = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=false) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=false) */ id, title FROM ${tableName} WHERE search('title:apple AND title:cherry') ORDER BY id @@ -120,14 +120,14 @@ suite("test_search_cache", "p0") { // Test 6: Complex boolean query - cache vs no-cache consistency def complex_cached = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=true) */ id, title FROM ${tableName} WHERE search('(title:apple OR title:banana) AND content:fruit') ORDER BY id """ def complex_uncached = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true,enable_inverted_index_query_cache=false) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true,enable_inverted_index_query_cache=false) */ id, title FROM ${tableName} WHERE search('(title:apple OR title:banana) AND content:fruit') ORDER BY id diff --git a/regression-test/suites/search/test_search_default_field_operator.groovy b/regression-test/suites/search/test_search_default_field_operator.groovy index 654a9ad2abf6ef..3eb586a1fb1cd7 100644 --- a/regression-test/suites/search/test_search_default_field_operator.groovy +++ b/regression-test/suites/search/test_search_default_field_operator.groovy @@ -18,8 +18,8 @@ suite("test_search_default_field_operator", "p0") { def tableName = "search_enhanced_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -59,7 +59,7 @@ suite("test_search_default_field_operator", "p0") { // Expected: Chris (1), Christopher (2) // Note: Without parser, inverted index is case-sensitive qt_wildcard_prefix """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('Chris*', '{"default_field":"firstname"}') ORDER BY id @@ -70,7 +70,7 @@ suite("test_search_default_field_operator", "p0") { // SQL: search('foo bar', '{"default_field":"tags","default_operator":"and"}') // Expected: 'foo bar' (1), 'bar foo' (3) qt_multi_term_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('foo bar', '{"default_field":"tags","default_operator":"and"}') ORDER BY id @@ -81,7 +81,7 @@ suite("test_search_default_field_operator", "p0") { // SQL: search('foo bark', '{"default_field":"tags","default_operator":"or"}') // Expected: 'foo bar' (1), 'bar foo' (3), 'foolish bark' (4) qt_multi_term_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('foo bark', '{"default_field":"tags","default_operator":"or"}') ORDER BY id @@ -97,7 +97,7 @@ suite("test_search_default_field_operator", "p0") { // - 'bar foo' (3): tokens=['bar','foo'] - matches foo* ✓ and bar* ✓ // - 'foolish bark' (4): tokens=['foolish','bark'] - matches foo* ✓ and bar* ✓ qt_wildcard_multi_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('foo* bar*', '{"default_field":"tags","default_operator":"and"}') ORDER BY id @@ -108,7 +108,7 @@ suite("test_search_default_field_operator", "p0") { // The explicit OR in DSL should override the default 'and' operator // Expected: 'foo bar' (1), 'bar foo' (3), 'foolish bark' (4) qt_explicit_or_override """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('foo OR bark', '{"default_field":"tags","default_operator":"and"}') ORDER BY id @@ -119,7 +119,7 @@ suite("test_search_default_field_operator", "p0") { // SQL: search('EXACT(foo bar)', '{"default_field":"tags_exact"}') // Expected: 'foo bar' (1) only - exact string match qt_exact_function """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags_exact + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags_exact FROM ${tableName} WHERE search('EXACT(foo bar)', '{"default_field":"tags_exact"}') ORDER BY id @@ -128,7 +128,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 7: Traditional syntax still works ============ // Ensure backward compatibility - original syntax unchanged qt_traditional_syntax """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('firstname:Chris*') ORDER BY id @@ -136,7 +136,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 8: Single term with default field ============ qt_single_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('bar', '{"default_field":"tags"}') ORDER BY id @@ -144,7 +144,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 9: Wildcard in middle ============ qt_wildcard_middle """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('*ris*', '{"default_field":"firstname"}') ORDER BY id @@ -154,7 +154,7 @@ suite("test_search_default_field_operator", "p0") { // Without parser, wildcard queries are case-sensitive (matches Lucene behavior) // CHRIS* won't match Chris/Christopher qt_case_sensitive """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('CHRIS*', '{"default_field":"firstname"}') ORDER BY id @@ -162,7 +162,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 11: Default operator is OR when not specified ============ qt_default_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('foo bark', '{"default_field":"tags"}') ORDER BY id @@ -170,7 +170,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 12: ANY function with default field ============ qt_any_function """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('ANY(foo bark)', '{"default_field":"tags"}') ORDER BY id @@ -178,7 +178,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 13: ALL function with default field ============ qt_all_function """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('ALL(foo bar)', '{"default_field":"tags"}') ORDER BY id @@ -186,7 +186,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 14: Complex wildcard pattern ============ qt_complex_wildcard """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('?evin', '{"default_field":"firstname"}') ORDER BY id @@ -194,7 +194,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 15: Default field with explicit AND ============ qt_explicit_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('foo AND bar', '{"default_field":"tags"}') ORDER BY id @@ -202,7 +202,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 16: Multiple fields still work ============ qt_multiple_fields """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname, tags FROM ${tableName} WHERE search('firstname:Chris* OR tags:bark') ORDER BY id @@ -210,7 +210,7 @@ suite("test_search_default_field_operator", "p0") { // ============ Test 17: NOT operator with default field ============ qt_not_operator """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, tags + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, tags FROM ${tableName} WHERE search('NOT foobar', '{"default_field":"tags"}') ORDER BY id @@ -222,7 +222,7 @@ suite("test_search_default_field_operator", "p0") { // - search('foo*', '{"default_field":"tags","default_operator":"or"}'): 2-param with JSON options → matches id 1,3,4 // - OR combination → matches id 1,2,3,4 (all rows) qt_param_count_mix """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('firstname:Chris*') OR search('foo*', '{"default_field":"tags","default_operator":"or"}') ORDER BY id diff --git a/regression-test/suites/search/test_search_dsl_operators.groovy b/regression-test/suites/search/test_search_dsl_operators.groovy index 08106c65243b46..c9eb3802c4ed35 100644 --- a/regression-test/suites/search/test_search_dsl_operators.groovy +++ b/regression-test/suites/search/test_search_dsl_operators.groovy @@ -38,8 +38,8 @@ suite("test_search_dsl_operators", "p0") { def tableName = "search_dsl_operators_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -72,7 +72,7 @@ suite("test_search_dsl_operators", "p0") { // All OR operators -> at least one must match (minimum_should_match=1) // Expected: rows 1,2,3,4 (all match at least one term) qt_dsl_or_chain """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('aterm OR bterm OR cterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -82,7 +82,7 @@ suite("test_search_dsl_operators", "p0") { // All AND operators -> all must match // Expected: row 4 only (the only one with all three terms) qt_dsl_and_chain """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('dterm AND eterm AND aterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -98,7 +98,7 @@ suite("test_search_dsl_operators", "p0") { // Result: effectively +aterm only // Expected: rows 1, 4 (rows containing "aterm") qt_dsl_and_or_mixed """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('aterm AND bterm OR cterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene","minimum_should_match":0}') ORDER BY id @@ -114,7 +114,7 @@ suite("test_search_dsl_operators", "p0") { // Result: +aterm -bterm // Expected: row 4 only (has "aterm" but NOT "bterm") qt_dsl_and_not_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('aterm AND NOT bterm OR cterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene","minimum_should_match":0}') ORDER BY id @@ -125,7 +125,7 @@ suite("test_search_dsl_operators", "p0") { // Same as: cterm AND dterm // Expected: row 3 only (has both "cterm" AND "dterm") qt_dsl_implicit_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('cterm dterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -136,7 +136,7 @@ suite("test_search_dsl_operators", "p0") { // Data has "dterm eterm aterm" - "aterm" comes AFTER "eterm", not before // Expected: no match qt_dsl_phrase_wrong_order """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('"aterm eterm"', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -147,7 +147,7 @@ suite("test_search_dsl_operators", "p0") { // Data has "dterm eterm aterm" - "eterm aterm" appears in this order // Expected: row 4 qt_dsl_phrase_correct_order """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('"eterm aterm"', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -160,7 +160,7 @@ suite("test_search_dsl_operators", "p0") { // Row 4 contains all terms (dterm, eterm, aterm) // Expected: row 4 qt_dsl_escaped_space_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('eterm\\\\ dterm AND aterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -171,7 +171,7 @@ suite("test_search_dsl_operators", "p0") { // Row 4 has "dterm eterm aterm" - phrase "dterm eterm" matches, and "aterm" is also present // Expected: row 4 qt_dsl_phrase_and_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('"dterm eterm" AND aterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -181,7 +181,7 @@ suite("test_search_dsl_operators", "p0") { // Phrase "eterm dterm" is wrong order (data has "dterm eterm") // Expected: no match qt_dsl_phrase_wrong_and_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('"eterm dterm" AND aterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -193,7 +193,7 @@ suite("test_search_dsl_operators", "p0") { // cterm matches rows 2, 3 // Expected: rows 2, 3 qt_dsl_phrase_or_term_1 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('"eterm dterm" OR cterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -205,7 +205,7 @@ suite("test_search_dsl_operators", "p0") { // cterm matches rows 2, 3 // Expected: rows 2, 3, 4 qt_dsl_phrase_or_term_2 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('"dterm eterm" OR cterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -223,7 +223,7 @@ suite("test_search_dsl_operators", "p0") { // Actually row 4 has aterm but no bterm/cterm... // Expected: row 1 only qt_dsl_and_or_min_should_1 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, firstname + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, firstname FROM ${tableName} WHERE search('aterm AND bterm OR cterm', '{"default_field":"firstname","default_operator":"and","mode":"lucene","minimum_should_match":1}') ORDER BY id diff --git a/regression-test/suites/search/test_search_dsl_syntax.groovy b/regression-test/suites/search/test_search_dsl_syntax.groovy index b52a018fa030eb..d5135367689af0 100644 --- a/regression-test/suites/search/test_search_dsl_syntax.groovy +++ b/regression-test/suites/search/test_search_dsl_syntax.groovy @@ -17,9 +17,9 @@ suite("test_search_dsl_syntax", "p0") { def tableName = "search_dsl_test_table" - + sql "DROP TABLE IF EXISTS ${tableName}" - + // Create test table with comprehensive inverted indexes sql """ CREATE TABLE ${tableName} ( @@ -47,7 +47,7 @@ suite("test_search_dsl_syntax", "p0") { "replication_allocation" = "tag.location.default: 1" ) """ - + // Insert comprehensive test data for DSL testing def testData = [ [1, "Machine Learning Introduction", "Basic concepts of machine learning and artificial intelligence", "Technology", "machine-learning, AI, tutorial", "John Doe", "published", 1, "2023-01-15", "2023-01-15 10:30:00", 4.5], @@ -73,7 +73,7 @@ suite("test_search_dsl_syntax", "p0") { [19, "Warning message content", "This is a warning message for testing", "Message", "warning, message", "System", "published", 1, "2023-11-09", "2023-11-09 10:00:00", 3.5], [20, "Regular article without msg", "This is a regular article without any message content", "Article", "article, regular", "Author", "published", 1, "2023-11-10", "2023-11-10 10:00:00", 4.0] ] - + for (def row : testData) { def title = row[1] == null ? "NULL" : "'${row[1]}'" def content = row[2] == null ? "NULL" : "'${row[2]}'" @@ -83,43 +83,43 @@ suite("test_search_dsl_syntax", "p0") { def status = row[6] == null ? "NULL" : "'${row[6]}'" sql """INSERT INTO ${tableName} VALUES (${row[0]}, ${title}, ${content}, ${category}, ${tags}, ${author}, ${status}, ${row[7]}, '${row[8]}', '${row[9]}', ${row[10]})""" } - + // Wait for index building Thread.sleep(5000) - + // DSL Syntax Test 1: Simple term queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Machine') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Machine') ORDER BY id" + // DSL Syntax Test 2: Phrase queries with quotes - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:\"Machine Learning\"')" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:\"Machine Learning\"')" + // DSL Syntax Test 3: Wildcard queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:*Learning') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:*Learning') ORDER BY id" + // DSL Syntax Test 4: Prefix queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Data*')" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Data*')" + // DSL Syntax Test 5: Regular expression queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:/.*[Dd]ata.*/')" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:/.*[Dd]ata.*/')" + // DSL Syntax Test 6: Boolean AND operator - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('category:Technology AND tags:AI') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('category:Technology AND tags:AI') ORDER BY id" + // DSL Syntax Test 7: Boolean OR operator - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('category:Programming OR category:Science') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('category:Programming OR category:Science') ORDER BY id" + // DSL Syntax Test 8: Boolean NOT operator - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE search('status:published AND NOT category:Technology')" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName} WHERE search('status:published AND NOT category:Technology')" + // DSL Syntax Test 9: Parentheses for grouping - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('(category:Technology OR category:AI) AND status:published') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('(category:Technology OR category:AI) AND status:published') ORDER BY id" + // DSL Syntax Test 10: Complex nested queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('(title:Learning OR title:Development) AND (status:published OR status:review)') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('(title:Learning OR title:Development) AND (status:published OR status:review)') ORDER BY id" + // DSL Syntax Test 11: Range queries (if supported) try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('priority:[1 TO 2]') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('priority:[1 TO 2]') ORDER BY id" // This may or may not work depending on implementation } catch (Exception e) { // Range queries might not be implemented yet @@ -128,7 +128,7 @@ suite("test_search_dsl_syntax", "p0") { // DSL Syntax Test 12: List queries with IN operator (if supported) try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('status:IN(published draft)') " + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('status:IN(published draft)') " "ORDER BY id" // This may or may not work depending on implementation } catch (Exception e) { @@ -137,34 +137,34 @@ suite("test_search_dsl_syntax", "p0") { } // DSL Syntax Test 13: ANY queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('tags:ANY(AI python)') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('tags:ANY(AI python)') ORDER BY id" // DSL Syntax Test 14: ALL queries - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('tags:ALL(machine learning)') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('tags:ALL(machine learning)') ORDER BY id" // DSL Syntax Test 15: Field names with quotes - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('\"content\":programming') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('\"content\":programming') ORDER BY id" // DSL Syntax Test 16: Case insensitive field names - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('CONTENT:programming') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('CONTENT:programming') ORDER BY id" // DSL Syntax Test 17: Multiple terms in same field - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('content:machine AND content:learning') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('content:machine AND content:learning') ORDER BY id" // DSL Syntax Test 18: Hyphenated terms in tags - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('tags:machine-learning') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('tags:machine-learning') ORDER BY id" // DSL Syntax Test 19: Special characters in search terms - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('author:\"John Doe\"') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('author:\"John Doe\"') ORDER BY id" // DSL Syntax Test 20: Multiple field search with complex boolean logic - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('(title:Learning AND category:Technology) OR (title:Development AND category:Web)') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('(title:Learning AND category:Technology) OR (title:Development AND category:Web)') ORDER BY id" // Error handling tests for invalid DSL syntax // Error Test 1: Unclosed parentheses try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('(title:Machine') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('(title:Machine') ORDER BY id" assertTrue(false, "Expected exception for unclosed parentheses") } catch (Exception e) { assertTrue(e.getMessage().contains("Invalid") || e.getMessage().contains("syntax")) @@ -172,7 +172,7 @@ suite("test_search_dsl_syntax", "p0") { // Error Test 2: Missing field name try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search(':value') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search(':value') ORDER BY id" assertTrue(false, "Expected exception for missing field name") } catch (Exception e) { assertTrue(e.getMessage().contains("Invalid") || e.getMessage().contains("syntax")) @@ -180,7 +180,7 @@ suite("test_search_dsl_syntax", "p0") { // Error Test 3: Missing value try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('field:') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('field:') ORDER BY id" assertTrue(false, "Expected exception for missing value") } catch (Exception e) { assertTrue(e.getMessage().contains("Invalid") || e.getMessage().contains("syntax")) @@ -188,7 +188,7 @@ suite("test_search_dsl_syntax", "p0") { // Error Test 4: Invalid boolean operator try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:Machine XOR category:Technology') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Machine XOR category:Technology') ORDER BY id" assertTrue(false, "Expected exception for invalid boolean operator") } catch (Exception e) { assertTrue(e.getMessage().contains("Invalid") || e.getMessage().contains("syntax")) @@ -196,7 +196,7 @@ suite("test_search_dsl_syntax", "p0") { // Error Test 5: Unclosed quotes try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:\"Machine Learning') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:\"Machine Learning') ORDER BY id" assertTrue(false, "Expected exception for unclosed quotes") } catch (Exception e) { assertTrue(e.getMessage().contains("Invalid") || e.getMessage().contains("syntax")) @@ -204,7 +204,7 @@ suite("test_search_dsl_syntax", "p0") { // Error Test 6: Invalid regular expression //try { - // sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:/[invalid/') ORDER BY id" + // sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:/[invalid/') ORDER BY id" // assertTrue(false, "Expected exception for invalid regex") //} catch (Exception e) { // assertTrue(e.getMessage().contains("Invalid") || e.getMessage().contains("syntax")) @@ -214,7 +214,7 @@ suite("test_search_dsl_syntax", "p0") { // Edge Case Test 1: Empty search string try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('') ORDER BY id" // Should handle empty string gracefully } catch (Exception e) { assertTrue(e.getMessage().contains("only inverted index queries are supported") || e.getMessage().contains("Invalid")) @@ -223,7 +223,7 @@ suite("test_search_dsl_syntax", "p0") { // Edge Case Test 2: Very long search string def longTerm = "a" * 1000 try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:${longTerm}') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:${longTerm}') ORDER BY id" // Should handle long strings gracefully } catch (Exception e) { // Acceptable if implementation has length limits @@ -232,7 +232,7 @@ suite("test_search_dsl_syntax", "p0") { // Edge Case Test 3: Unicode characters try { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:测试') ORDER BY id" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:测试') ORDER BY id" // Should handle Unicode gracefully } catch (Exception e) { logger.info("Unicode search error: " + e.getMessage()) @@ -241,75 +241,75 @@ suite("test_search_dsl_syntax", "p0") { // NOT search functionality tests // NOT Search Test 1: Basic NOT search for content field - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} WHERE NOT search('content:msg') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE NOT search('content:msg') ORDER BY id" // NOT Search Test 2: NOT search with specific field - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('title:Message') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('title:Message') ORDER BY id" // NOT Search Test 3: NOT search with multiple terms - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('content:message AND category:Message') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('content:message AND category:Message') ORDER BY id" // NOT Search Test 4: NOT search with complex boolean logic - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('(content:msg OR title:Message) AND status:published') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('(content:msg OR title:Message) AND status:published') ORDER BY id" // NOT Search Test 5: NOT search with wildcard - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('content:*msg*') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('content:*msg*') ORDER BY id" // NOT Search Test 6: NOT search with phrase - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('content:\"success message\"') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('content:\"success message\"') ORDER BY id" // Null value handling tests // Null Test 1: Search on field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('content:null') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('content:null') ORDER BY id" // Null Test 2: Search on null field should return no results - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:null') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:null') ORDER BY id" // Null Test 3: NOT search on field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} WHERE NOT search('content:null') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE NOT search('content:null') ORDER BY id" // Null Test 4: Search on category field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, category FROM ${tableName} WHERE search('category:Test') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, category FROM ${tableName} WHERE search('category:Test') ORDER BY id" // Null Test 5: NOT search on category field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, category FROM ${tableName} WHERE NOT search('category:Test') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, category FROM ${tableName} WHERE NOT search('category:Test') ORDER BY id" // Null Test 6: Search on tags field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, tags FROM ${tableName} WHERE search('tags:test') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, tags FROM ${tableName} WHERE search('tags:test') ORDER BY id" // Null Test 7: NOT search on tags field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, tags FROM ${tableName} WHERE NOT search('tags:test') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, tags FROM ${tableName} WHERE NOT search('tags:test') ORDER BY id" // Null Test 8: Search on author field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, author FROM ${tableName} WHERE search('author:Test') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, author FROM ${tableName} WHERE search('author:Test') ORDER BY id" // Null Test 9: NOT search on author field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, author FROM ${tableName} WHERE NOT search('author:Test') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, author FROM ${tableName} WHERE NOT search('author:Test') ORDER BY id" // Null Test 10: Search on status field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, status FROM ${tableName} WHERE search('status:draft') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, status FROM ${tableName} WHERE search('status:draft') ORDER BY id" // Null Test 11: NOT search on status field with null values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, status FROM ${tableName} WHERE NOT search('status:draft') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, status FROM ${tableName} WHERE NOT search('status:draft') ORDER BY id" // Combined NOT search and null handling tests // Combined Test 1: NOT search with null content handling - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} WHERE NOT search('content:msg') AND content IS NOT NULL ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE NOT search('content:msg') AND content IS NOT NULL ORDER BY id" // Combined Test 2: NOT search with null title handling - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('title:Test') AND title IS NOT NULL ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE NOT search('title:Test') AND title IS NOT NULL ORDER BY id" // Combined Test 3: NOT search with null category handling - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, category FROM ${tableName} WHERE NOT search('category:Test') AND category IS NOT NULL ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, category FROM ${tableName} WHERE NOT search('category:Test') AND category IS NOT NULL ORDER BY id" // Combined Test 4: NOT search with null tags handling - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, tags FROM ${tableName} WHERE NOT search('tags:test') AND tags IS NOT NULL ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, tags FROM ${tableName} WHERE NOT search('tags:test') AND tags IS NOT NULL ORDER BY id" // Combined Test 5: NOT search with null author handling - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, author FROM ${tableName} WHERE NOT search('author:Test') AND author IS NOT NULL ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, author FROM ${tableName} WHERE NOT search('author:Test') AND author IS NOT NULL ORDER BY id" // Combined Test 6: NOT search with null status handling - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, status FROM ${tableName} WHERE NOT search('status:draft') AND status IS NOT NULL ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, status FROM ${tableName} WHERE NOT search('status:draft') AND status IS NOT NULL ORDER BY id" } diff --git a/regression-test/suites/search/test_search_escape.groovy b/regression-test/suites/search/test_search_escape.groovy index e7e09ca846c6f2..0a72a81bc2bd47 100644 --- a/regression-test/suites/search/test_search_escape.groovy +++ b/regression-test/suites/search/test_search_escape.groovy @@ -32,8 +32,8 @@ suite("test_search_escape", "p0") { def tableName = "search_escape_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -74,7 +74,7 @@ suite("test_search_escape", "p0") { // Groovy: \\\\ -> SQL: \\ -> DSL: \ (escape) // This should match row 1 which has "First Value" stored as single term (parser=none) qt_escape_space """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:First\\\\ Value') ORDER BY id @@ -85,7 +85,7 @@ suite("test_search_escape", "p0") { // This query won't work as expected, showing the difference // Using phrase query instead to show the contrast qt_phrase_query """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:"First Value"') ORDER BY id @@ -95,7 +95,7 @@ suite("test_search_escape", "p0") { // DSL: title:hello\(world\) -> searches for literal "hello(world)" // Groovy: \\\\( -> SQL: \\( -> DSL: \( -> literal: ( qt_escape_parentheses """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:hello\\\\(world\\\\)') ORDER BY id @@ -105,7 +105,7 @@ suite("test_search_escape", "p0") { // DSL: title:key\:value -> searches for literal "key:value" // Groovy: \\\\: -> SQL: \\: -> DSL: \: -> literal: : qt_escape_colon """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:key\\\\:value') ORDER BY id @@ -116,7 +116,7 @@ suite("test_search_escape", "p0") { // Groovy: \\\\\\\\ -> SQL: \\\\ -> DSL: \\ -> literal: \ // Data stored: path\to\file (Groovy \\\\ -> SQL \\ -> stored \) qt_escape_backslash """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:path\\\\\\\\to\\\\\\\\file') ORDER BY id @@ -124,7 +124,7 @@ suite("test_search_escape", "p0") { // ============ Test 6: Uppercase AND operator ============ qt_uppercase_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:first AND content:fruit') ORDER BY id @@ -132,7 +132,7 @@ suite("test_search_escape", "p0") { // ============ Test 7: Uppercase OR operator ============ qt_uppercase_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:first OR content:second') ORDER BY id @@ -140,7 +140,7 @@ suite("test_search_escape", "p0") { // ============ Test 8: Uppercase NOT operator ============ qt_uppercase_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:fruit AND NOT content:first') ORDER BY id @@ -151,7 +151,7 @@ suite("test_search_escape", "p0") { // Lowercase 'and' is treated as a bare term (no field), causing error test { sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:first and content:fruit') ORDER BY id @@ -164,7 +164,7 @@ suite("test_search_escape", "p0") { // Lowercase 'or' is treated as a bare term (no field), causing error test { sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:first or content:second') ORDER BY id @@ -174,7 +174,7 @@ suite("test_search_escape", "p0") { // ============ Test 11: Exclamation NOT operator ============ qt_exclamation_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:fruit AND !content:first') ORDER BY id @@ -183,7 +183,7 @@ suite("test_search_escape", "p0") { // ============ Test 12: Default field with escaped space ============ // DSL: First\ Value with default_field=title (JSON options format) qt_default_field_escape """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('First\\\\ Value', '{"default_field":"title","default_operator":"and"}') ORDER BY id @@ -191,7 +191,7 @@ suite("test_search_escape", "p0") { // ============ Test 13: Lucene mode with escaped space ============ qt_lucene_mode_escape """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('First\\\\ Value', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id diff --git a/regression-test/suites/search/test_search_exact_basic.groovy b/regression-test/suites/search/test_search_exact_basic.groovy index ffad823e45189d..776a3064015ea2 100644 --- a/regression-test/suites/search/test_search_exact_basic.groovy +++ b/regression-test/suites/search/test_search_exact_basic.groovy @@ -18,8 +18,8 @@ suite("test_search_exact_basic", "p0") { def tableName = "exact_basic_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -48,11 +48,11 @@ suite("test_search_exact_basic", "p0") { Thread.sleep(3000) // Test 1: EXACT should match the whole value - qt_exact_whole "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, name FROM ${tableName} WHERE search('name:EXACT(apple banana)') ORDER BY id" + qt_exact_whole "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, name FROM ${tableName} WHERE search('name:EXACT(apple banana)') ORDER BY id" // Test 2: EXACT should not match partial - qt_exact_partial "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, name FROM ${tableName} WHERE search('name:EXACT(apple)') ORDER BY id" + qt_exact_partial "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, name FROM ${tableName} WHERE search('name:EXACT(apple)') ORDER BY id" // Test 3: EXACT is case sensitive (without lowercase config) - qt_exact_case "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, name FROM ${tableName} WHERE search('name:EXACT(Apple)') ORDER BY id" + qt_exact_case "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, name FROM ${tableName} WHERE search('name:EXACT(Apple)') ORDER BY id" } diff --git a/regression-test/suites/search/test_search_exact_lowercase.groovy b/regression-test/suites/search/test_search_exact_lowercase.groovy index f4b82d411b6980..f9eba49b26076a 100644 --- a/regression-test/suites/search/test_search_exact_lowercase.groovy +++ b/regression-test/suites/search/test_search_exact_lowercase.groovy @@ -18,8 +18,8 @@ suite("test_search_exact_lowercase", "p0") { def tableName = "exact_lowercase_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -53,20 +53,20 @@ suite("test_search_exact_lowercase", "p0") { Thread.sleep(3000) // Test 1: EXACT on normal field (untokenized) - case sensitive - qt_normal_exact_lower "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_normal FROM ${tableName} WHERE search('text_normal:EXACT(hello world)') ORDER BY id" - qt_normal_exact_upper "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_normal FROM ${tableName} WHERE search('text_normal:EXACT(HELLO WORLD)') ORDER BY id" - qt_normal_exact_mixed "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_normal FROM ${tableName} WHERE search('text_normal:EXACT(Hello World)') ORDER BY id" + qt_normal_exact_lower "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_normal FROM ${tableName} WHERE search('text_normal:EXACT(hello world)') ORDER BY id" + qt_normal_exact_upper "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_normal FROM ${tableName} WHERE search('text_normal:EXACT(HELLO WORLD)') ORDER BY id" + qt_normal_exact_mixed "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_normal FROM ${tableName} WHERE search('text_normal:EXACT(Hello World)') ORDER BY id" // Test 2: EXACT on mixed index field // EXACT prefers untokenized index, so it's case sensitive (lowercase config is ignored) - qt_mixed_exact_lower "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:EXACT(hello world)') ORDER BY id" - qt_mixed_exact_upper "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:EXACT(HELLO WORLD)') ORDER BY id" - qt_mixed_exact_mixed "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:EXACT(Hello World)') ORDER BY id" + qt_mixed_exact_lower "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:EXACT(hello world)') ORDER BY id" + qt_mixed_exact_upper "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:EXACT(HELLO WORLD)') ORDER BY id" + qt_mixed_exact_mixed "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:EXACT(Hello World)') ORDER BY id" // Test 3: Verify that ANY on mixed index uses tokenized index with lowercase - qt_mixed_any_lowercase "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:ANY(hello world)') ORDER BY id" + qt_mixed_any_lowercase "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, text_mixed FROM ${tableName} WHERE search('text_mixed:ANY(hello world)') ORDER BY id" // Test 4: Compare EXACT (case-sensitive) vs ANY (with lowercase) - qt_exact_case_sensitive "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('text_mixed:EXACT(Test Case)') ORDER BY id" - qt_any_case_insensitive "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('text_mixed:ANY(test case)') ORDER BY id" + qt_exact_case_sensitive "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('text_mixed:EXACT(Test Case)') ORDER BY id" + qt_any_case_insensitive "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('text_mixed:ANY(test case)') ORDER BY id" } diff --git a/regression-test/suites/search/test_search_exact_match.groovy b/regression-test/suites/search/test_search_exact_match.groovy index 6f8439b0d2293a..488d5e65dd521d 100644 --- a/regression-test/suites/search/test_search_exact_match.groovy +++ b/regression-test/suites/search/test_search_exact_match.groovy @@ -18,8 +18,8 @@ suite("test_search_exact_match", "p0") { def tableName = "search_exact_test_table" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -61,58 +61,58 @@ suite("test_search_exact_match", "p0") { Thread.sleep(5000) // Test 1: EXACT match without tokenization - exact case matching - qt_exact_basic "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello World)') ORDER BY id" + qt_exact_basic "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello World)') ORDER BY id" // Test 2: EXACT match should not find partial matches (unlike ANY) - qt_exact_no_partial "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello)') ORDER BY id" + qt_exact_no_partial "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello)') ORDER BY id" // Test 3: EXACT match on field without tokenization - case sensitive - qt_exact_case_sensitive "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(hello world)') ORDER BY id" + qt_exact_case_sensitive "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(hello world)') ORDER BY id" // Test 4: EXACT match with different case - qt_exact_different_case "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(HELLO WORLD)') ORDER BY id" + qt_exact_different_case "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(HELLO WORLD)') ORDER BY id" // Test 5: EXACT match with spaces - qt_exact_spaces "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(a b c)') ORDER BY id" + qt_exact_spaces "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(a b c)') ORDER BY id" // Test 6: Compare EXACT vs ANY on tokenized field - qt_exact_vs_any_exact "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(test document)') ORDER BY id" - qt_exact_vs_any_any "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ALL(test document)') ORDER BY id" + qt_exact_vs_any_exact "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(test document)') ORDER BY id" + qt_exact_vs_any_any "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ALL(test document)') ORDER BY id" // Test 7: EXACT on field with mixed index (both tokenized and untokenized) // EXACT should use the untokenized index - qt_exact_mixed_index "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, mixed_index FROM ${tableName} WHERE search('mixed_index:EXACT(machine learning)') ORDER BY id" + qt_exact_mixed_index "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, mixed_index FROM ${tableName} WHERE search('mixed_index:EXACT(machine learning)') ORDER BY id" // Test 8: EXACT with special characters - qt_exact_special_chars "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Special!@#Chars)') ORDER BY id" + qt_exact_special_chars "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Special!@#Chars)') ORDER BY id" // Test 9: EXACT in boolean queries - qt_exact_and "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello World) AND content:test') ORDER BY id" - qt_exact_or "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello World) OR title:EXACT(hello world)') ORDER BY id" - qt_exact_not "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('NOT title:EXACT(HELLO WORLD)') ORDER BY id LIMIT 10" + qt_exact_and "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello World) AND content:test') ORDER BY id" + qt_exact_or "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello World) OR title:EXACT(hello world)') ORDER BY id" + qt_exact_not "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('NOT title:EXACT(HELLO WORLD)') ORDER BY id LIMIT 10" // Test 10: EXACT with NULL values sql """INSERT INTO ${tableName} VALUES (10, NULL, 'null title test', 'null', 'null')""" Thread.sleep(2000) - qt_exact_null "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(NULL)') ORDER BY id" + qt_exact_null "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(NULL)') ORDER BY id" // Test 11: Multiple EXACT conditions - qt_exact_multiple "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, keyword FROM ${tableName} WHERE search('title:EXACT(Hello World) AND keyword:EXACT(test keyword)') ORDER BY id" + qt_exact_multiple "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, keyword FROM ${tableName} WHERE search('title:EXACT(Hello World) AND keyword:EXACT(test keyword)') ORDER BY id" // Test 12: EXACT vs regular term query comparison - qt_term_query "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Hello') ORDER BY id" - qt_exact_query "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello)') ORDER BY id" + qt_term_query "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Hello') ORDER BY id" + qt_exact_query "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:EXACT(Hello)') ORDER BY id" // Test 13: EXACT with ALL - combining different operators - qt_exact_and_all "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:EXACT(Hello World) AND content:ALL(test document)') ORDER BY id" + qt_exact_and_all "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:EXACT(Hello World) AND content:ALL(test document)') ORDER BY id" // Test 14: Case sensitivity without lowercase config - qt_exact_case_hello "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(hello)') ORDER BY id" - qt_exact_case_HELLO "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(HELLO)') ORDER BY id" + qt_exact_case_hello "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(hello)') ORDER BY id" + qt_exact_case_HELLO "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, keyword FROM ${tableName} WHERE search('keyword:EXACT(HELLO)') ORDER BY id" // Test 15: EXACT on mixed_index should prefer untokenized index // So it should match exact string, not tokens - qt_exact_mixed_exact_match "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, mixed_index FROM ${tableName} WHERE search('mixed_index:EXACT(tokenized value)') ORDER BY id" - qt_any_mixed_token_match "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, mixed_index FROM ${tableName} WHERE search('mixed_index:ALL(tokenized value)') ORDER BY id" + qt_exact_mixed_exact_match "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, mixed_index FROM ${tableName} WHERE search('mixed_index:EXACT(tokenized value)') ORDER BY id" + qt_any_mixed_token_match "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, mixed_index FROM ${tableName} WHERE search('mixed_index:ALL(tokenized value)') ORDER BY id" } diff --git a/regression-test/suites/search/test_search_exact_multi_index.groovy b/regression-test/suites/search/test_search_exact_multi_index.groovy index ebe22c8e196f68..b3a48ee9bc1135 100644 --- a/regression-test/suites/search/test_search_exact_multi_index.groovy +++ b/regression-test/suites/search/test_search_exact_multi_index.groovy @@ -18,8 +18,8 @@ suite("test_search_exact_multi_index", "p0") { def tableName = "exact_multi_index_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -51,23 +51,23 @@ suite("test_search_exact_multi_index", "p0") { Thread.sleep(3000) // Test 1: EXACT should use untokenized index - exact match only - qt_exact_full_match """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(machine learning)', '{"mode":"standard"}') ORDER BY id""" + qt_exact_full_match """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(machine learning)', '{"mode":"standard"}') ORDER BY id""" // Test 2: EXACT should not match partial tokens - qt_exact_no_partial """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(machine)', '{"mode":"standard"}') ORDER BY id""" + qt_exact_no_partial """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(machine)', '{"mode":"standard"}') ORDER BY id""" // Test 3: ANY should use tokenized index - matches any token - qt_any_token_match """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ANY(machine learning)', '{"mode":"standard"}') ORDER BY id""" + qt_any_token_match """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ANY(machine learning)', '{"mode":"standard"}') ORDER BY id""" // Test 4: ALL should use tokenized index - matches all tokens - qt_all_token_match """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ALL(machine learning)', '{"mode":"standard"}') ORDER BY id""" + qt_all_token_match """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ALL(machine learning)', '{"mode":"standard"}') ORDER BY id""" // Test 5: Verify EXACT vs ANY behavior difference // EXACT: only exact string match // ANY: any token matches - qt_exact_strict """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(deep learning)', '{"mode":"standard"}') ORDER BY id""" - qt_any_loose """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ANY(deep learning)', '{"mode":"standard"}') ORDER BY id""" + qt_exact_strict """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(deep learning)', '{"mode":"standard"}') ORDER BY id""" + qt_any_loose """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:ANY(deep learning)', '{"mode":"standard"}') ORDER BY id""" // Test 6: Multiple conditions with EXACT and ANY - qt_mixed_exact_any """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(machine learning) OR content:ANY(intelligence)', '{"mode":"standard"}') ORDER BY id""" + qt_mixed_exact_any """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, content FROM ${tableName} WHERE search('content:EXACT(machine learning) OR content:ANY(intelligence)', '{"mode":"standard"}') ORDER BY id""" } diff --git a/regression-test/suites/search/test_search_field_group_query.groovy b/regression-test/suites/search/test_search_field_group_query.groovy index b352d6d1cc7db0..48e1e468acecb0 100644 --- a/regression-test/suites/search/test_search_field_group_query.groovy +++ b/regression-test/suites/search/test_search_field_group_query.groovy @@ -29,10 +29,10 @@ suite("test_search_field_group_query") { def tableName = "search_field_group_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. // When false, search() expressions are not pushed to the inverted index evaluation // path, causing "SearchExpr should not be executed without inverted index" errors. - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" diff --git a/regression-test/suites/search/test_search_function.groovy b/regression-test/suites/search/test_search_function.groovy index 25fb08cef5a106..6aa72658df83b4 100644 --- a/regression-test/suites/search/test_search_function.groovy +++ b/regression-test/suites/search/test_search_function.groovy @@ -18,10 +18,10 @@ suite("test_search_function", "p0") { def tableName = "search_test_table" def indexTableName = "search_test_index_table" - + sql "DROP TABLE IF EXISTS ${tableName}" sql "DROP TABLE IF EXISTS ${indexTableName}" - + // Create test table without inverted index sql """ CREATE TABLE ${tableName} ( @@ -39,7 +39,7 @@ suite("test_search_function", "p0") { "replication_allocation" = "tag.location.default: 1" ) """ - + // Create test table with inverted index sql """ CREATE TABLE ${indexTableName} ( @@ -61,7 +61,7 @@ suite("test_search_function", "p0") { "replication_allocation" = "tag.location.default: 1" ) """ - + // Insert test data def testData = [ [1, "Machine Learning Basics", "Introduction to machine learning algorithms and concepts", "Technology", "machine learning, AI, algorithms", "2023-01-15", 1500], @@ -75,83 +75,83 @@ suite("test_search_function", "p0") { [9, "Database Systems", "Relational and NoSQL database concepts", "Technology", "database, SQL, NoSQL", "2023-09-09", 1450], [10, "Software Engineering", "Best practices in software development", "Programming", "software engineering, development, practices", "2023-10-01", 1750] ] - + for (def row : testData) { sql """INSERT INTO ${tableName} VALUES (${row[0]}, '${row[1]}', '${row[2]}', '${row[3]}', '${row[4]}', '${row[5]}', ${row[6]})""" sql """INSERT INTO ${indexTableName} VALUES (${row[0]}, '${row[1]}', '${row[2]}', '${row[3]}', '${row[4]}', '${row[5]}', ${row[6]})""" } - + // Wait for index building and data settling Thread.sleep(10000) - + // Verify data insertion - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableName}" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${indexTableName}" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableName}" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${indexTableName}" + // Test 1: Basic term search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Machine') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Machine') ORDER BY id" + // Test 2: Phrase search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:\"Machine Learning\"') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:\"Machine Learning\"') ORDER BY id" + // Test 3: Multiple field search with AND - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Learning AND category:Technology') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Learning AND category:Technology') ORDER BY id" + // Test 4: Multiple field search with OR - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Python OR title:Algorithm') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Python OR title:Algorithm') ORDER BY id" + // Test 5: NOT search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${indexTableName} WHERE search('category:Technology AND NOT title:Machine')" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${indexTableName} WHERE search('category:Technology AND NOT title:Machine')" + // Test 6: Complex nested search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('(title:Learning OR content:algorithms) AND category:Technology') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('(title:Learning OR content:algorithms) AND category:Technology') ORDER BY id" + // Test 7: Wildcard search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Learn*') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Learn*') ORDER BY id" + // Test 8: Prefix search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Data*') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:Data*') ORDER BY id" + // Test 9: Search in content field - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('content:neural') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('content:neural') ORDER BY id" + // Test 10: Search in tags field - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('tags:programming') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('tags:programming') ORDER BY id" + // Test 11: Case insensitive search - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:MACHINE') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('title:MACHINE') ORDER BY id" + // Test 12: Search with spaces in field values - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('content:\"machine learning\"') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('content:\"machine learning\"') ORDER BY id" + // Test 13: Empty search result - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${indexTableName} WHERE search('title:nonexistent')" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${indexTableName} WHERE search('title:nonexistent')" + // Test 14: Search combined with other WHERE conditions - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('category:Technology') AND view_count > 1400 ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('category:Technology') AND view_count > 1400 ORDER BY id" + // Test 15: Search with GROUP BY - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ category, COUNT(*) as cnt FROM ${indexTableName} WHERE search('title:Learning OR title:Programming') GROUP BY category ORDER BY category" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ category, COUNT(*) as cnt FROM ${indexTableName} WHERE search('title:Learning OR title:Programming') GROUP BY category ORDER BY category" + // Test 16: Search with ORDER BY - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, view_count FROM ${indexTableName} WHERE search('tags:AI OR tags:programming') ORDER BY view_count DESC" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, view_count FROM ${indexTableName} WHERE search('tags:AI OR tags:programming') ORDER BY view_count DESC" + // Test 17: Search with LIMIT - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('category:Technology') ORDER BY id LIMIT 3" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('category:Technology') ORDER BY id LIMIT 3" + // Test 18: Search function in SELECT clause (should not be allowed - search is a predicate) // This test is commented out as it expects an exception //qt_sql "SELECT id, search('title:Machine') FROM ${indexTableName}" - + // Test 19: Invalid DSL syntax // This test is commented out as it expects an exception //qt_sql "SELECT id FROM ${indexTableName} WHERE search('title:')" - + // Test 20: ANY query test - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('tags:ANY(AI programming)') ORDER BY id" - + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('tags:ANY(AI programming)') ORDER BY id" + // Test 21: ALL query test - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('tags:ALL(machine learning)') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${indexTableName} WHERE search('tags:ALL(machine learning)') ORDER BY id" // Test 22: Search on non-indexed table — must now throw at FE planning time. // After the fix for Jira CIR-20006, RewriteSearchToSlots refuses to rewrite @@ -159,7 +159,7 @@ suite("test_search_function", "p0") { // AnalysisException that names the column and points at "inverted index". boolean threw = false try { - sql """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Machine') ORDER BY id""" + sql """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Machine') ORDER BY id""" } catch (Exception e) { threw = true logger.info(e.getMessage()) diff --git a/regression-test/suites/search/test_search_inverted_index.groovy b/regression-test/suites/search/test_search_inverted_index.groovy index d4d83384d76e9f..51a6052030ab23 100644 --- a/regression-test/suites/search/test_search_inverted_index.groovy +++ b/regression-test/suites/search/test_search_inverted_index.groovy @@ -77,7 +77,7 @@ suite("test_search_inverted_index", "p0") { def titlePrefixes = ["Advanced", "Introduction to", "Complete Guide", "Mastering", "Understanding", "Learning", "Exploring", "Discovering", "Building", "Creating"] def titleTopics = ["Machine Learning", "Data Science", "Web Development", "Mobile Apps", "Cloud Computing", "Artificial Intelligence", "Database Systems", "Software Engineering", "Cybersecurity", "DevOps"] def authors = ["John Smith", "Jane Doe", "Bob Johnson", "Alice Wilson", "Charlie Brown", "Diana Prince", "Eve Adams", "Frank Miller", "Grace Lee", "Henry Taylor"] - + for (int i = 1; i <= count; i++) { def title = "${titlePrefixes[i % titlePrefixes.size()]} ${titleTopics[i % titleTopics.size()]}" def content = "This is comprehensive content about ${titleTopics[i % titleTopics.size()]} with detailed explanations and practical examples for beginners and advanced users alike." @@ -88,7 +88,7 @@ suite("test_search_inverted_index", "p0") { def publishDate = "2023-" + String.format("%02d", (i % 12) + 1) + "-" + String.format("%02d", (i % 28) + 1) def viewCount = 1000 + (i * 137) % 5000 // Pseudo-random view counts def rating = 3.0 + ((i * 73) % 20) / 10.0 // Pseudo-random ratings between 3.0-4.9 - + data.add([i, title, content, description, category, tags, author, publishDate, viewCount, rating]) } return data @@ -102,7 +102,7 @@ suite("test_search_inverted_index", "p0") { for (def row : testData) { def insertSql = """INSERT INTO ${tableWithIndex} VALUES (${row[0]}, '${row[1]}', '${row[2]}', '${row[3]}', '${row[4]}', '${row[5]}', '${row[6]}', '${row[7]}', ${row[8]}, ${row[9]})""" sql insertSql - + insertSql = """INSERT INTO ${tableWithoutIndex} VALUES (${row[0]}, '${row[1]}', '${row[2]}', '${row[3]}', '${row[4]}', '${row[5]}', '${row[6]}', '${row[7]}', ${row[8]}, ${row[9]})""" sql insertSql } @@ -111,52 +111,52 @@ suite("test_search_inverted_index", "p0") { Thread.sleep(10000) // Verify data insertion - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex}" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithoutIndex}" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex}" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithoutIndex}" // Test 1: Basic search functionality on indexed table - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:Machine')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:Machine')" // Test 2: Compare results between indexed and non-indexed tables - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableWithIndex} WHERE search('title:Learning') ORDER BY id" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableWithIndex} WHERE search('title:Learning') ORDER BY id" //qt_sql "SELECT id FROM ${tableWithoutIndex} WHERE search('title:Learning') ORDER BY id" // Test 3: Complex search with multiple fields - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:Machine AND category:Technology')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:Machine AND category:Technology')" // Test 4: Search with phrase queries //qt_sql "SELECT COUNT(*) FROM ${tableWithIndex} WHERE search('content:\"comprehensive content\"')" // Test 5: Search with boolean operators - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('(title:Learning OR title:Guide) AND category:Technology')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('(title:Learning OR title:Guide) AND category:Technology')" // Test 6: Search with NOT operator - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('NOT title:Machine')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('NOT title:Machine')" // Test 7: Wildcard searches //qt_sql "SELECT COUNT(*) FROM ${tableWithIndex} WHERE search('title:Learn*')" // Test 8: Search in tags field (test tokenized field) - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:tutorial')" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:devops')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:tutorial')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:devops')" // Test 9: Search by author //qt_sql "SELECT COUNT(*) FROM ${tableWithIndex} WHERE search('author:\"John Smith\"')" // Test 10: Search combined with regular WHERE clauses - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('category:Technology') AND view_count > 3000" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('category:Technology') AND view_count > 3000" // Test 11: Search with GROUP BY - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ category, COUNT(*) as cnt FROM ${tableWithIndex} WHERE search('title:Learning') GROUP BY category ORDER BY cnt DESC, category ASC" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ category, COUNT(*) as cnt FROM ${tableWithIndex} WHERE search('title:Learning') GROUP BY category ORDER BY cnt DESC, category ASC" // Test 12: Search with ORDER BY and LIMIT - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableWithIndex} WHERE search('title:Advanced') ORDER BY view_count DESC LIMIT 10" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableWithIndex} WHERE search('title:Advanced') ORDER BY view_count DESC LIMIT 10" // Test 13: Search with aggregation functions - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ AVG(rating), MAX(view_count), MIN(view_count) FROM ${tableWithIndex} WHERE search('category:Technology')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ AVG(rating), MAX(view_count), MIN(view_count) FROM ${tableWithIndex} WHERE search('category:Technology')" // Test 14: Search with HAVING clause qt_sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ category, COUNT(*) as cnt + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ category, COUNT(*) as cnt FROM ${tableWithIndex} WHERE search('tags:guide OR tags:tutorial') GROUP BY category @@ -166,7 +166,7 @@ suite("test_search_inverted_index", "p0") { // Test 15: Nested search queries qt_sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableWithIndex} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableWithIndex} WHERE search('title:Complete OR title:Advanced') AND id IN ( SELECT id FROM ${tableWithIndex} @@ -180,25 +180,25 @@ suite("test_search_inverted_index", "p0") { //qt_sql "SELECT COUNT(*) FROM ${tableWithIndex} WHERE search('title:\"Complete Guide\"')" // Edge Case 2: Search with very common terms - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('content:the')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('content:the')" // Edge Case 3: Search with numeric-like terms - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('content:2023')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('content:2023')" // Edge Case 4: Case sensitivity test - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:MACHINE')" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:machine')" - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:Machine')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:MACHINE')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:machine')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('title:Machine')" // Index effectiveness test //qt_sql "SELECT id, title FROM ${tableWithIndex} WHERE search('title:Introduction AND content:\"practical examples\" AND tags:tutorial') ORDER BY view_count DESC LIMIT 100" // Test ANY query performance - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:ANY(tutorial guide example)')" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:ANY(tutorial guide example)')" - // Test ALL query performance - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:ALL(machine learning)')" + // Test ALL query performance + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ COUNT(*) FROM ${tableWithIndex} WHERE search('tags:ALL(machine learning)')" // Test complex ANY/ALL combinations - qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableWithIndex} WHERE search('(tags:ANY(java python) OR tags:ALL(tutorial guide)) AND category:Technology') order by id LIMIT 10" + qt_sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableWithIndex} WHERE search('(tags:ANY(java python) OR tags:ALL(tutorial guide)) AND category:Technology') order by id LIMIT 10" } diff --git a/regression-test/suites/search/test_search_inverted_index_profile.groovy b/regression-test/suites/search/test_search_inverted_index_profile.groovy index 6e0b4c92a5e44a..62426eef9f583e 100644 --- a/regression-test/suites/search/test_search_inverted_index_profile.groovy +++ b/regression-test/suites/search/test_search_inverted_index_profile.groovy @@ -72,8 +72,7 @@ suite("test_search_inverted_index_profile", "nonConcurrent") { sql """ set enable_sql_cache = false """ sql """ set enable_inverted_index_searcher_cache = false """ sql """ set enable_inverted_index_query_cache = false """ - sql """ set enable_common_expr_pushdown = true """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true """ + sql """ set enable_segment_limit_pushdown = true """ def queryId1 = "search_profile_miss_${System.currentTimeMillis()}" try { @@ -127,7 +126,7 @@ suite("test_search_inverted_index_profile", "nonConcurrent") { sql """ set enable_inverted_index_query_cache = false """ // First run: populate searcher cache - sql """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + sql """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:cherry') ORDER BY id""" // Second run: should hit searcher cache @@ -179,16 +178,16 @@ suite("test_search_inverted_index_profile", "nonConcurrent") { GetDebugPoint().enableDebugPointForAllBEs("FieldReaderResolver.resolve.io_ctx") // First query: cache miss, debug point validates io_ctx consistency - qt_io_ctx_miss """ SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + qt_io_ctx_miss """ SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('content:tropical') ORDER BY id """ // Second query: cache hit, reuses the cached searcher // If io_ctx was stale, this would crash under ASAN - qt_io_ctx_hit """ SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + qt_io_ctx_hit """ SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('content:tropical') ORDER BY id """ // Third query: different DSL but same field — exercises resolver cache - qt_io_ctx_multi """ SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + qt_io_ctx_multi """ SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('content:tropical OR content:fruit') ORDER BY id """ } finally { GetDebugPoint().disableDebugPointForAllBEs("FieldReaderResolver.resolve.io_ctx") @@ -204,7 +203,7 @@ suite("test_search_inverted_index_profile", "nonConcurrent") { sql """ set enable_inverted_index_query_cache = true """ // First run: populate DSL cache - sql """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + sql """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:banana') ORDER BY id""" // Second run: should hit DSL cache @@ -251,7 +250,7 @@ suite("test_search_inverted_index_profile", "nonConcurrent") { sql """ set enable_inverted_index_query_cache = false """ // First run: cache miss (searcher cache disabled, nothing to hit) - sql """SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + sql """SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:grape') ORDER BY id""" // Second run: should STILL be a cache miss because searcher cache is disabled @@ -291,7 +290,7 @@ suite("test_search_inverted_index_profile", "nonConcurrent") { // both should return identical results. // ========================================================================= def search_result = sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:apple') ORDER BY id """ def match_result = sql """ diff --git a/regression-test/suites/search/test_search_inverted_is_null_pushdown.groovy b/regression-test/suites/search/test_search_inverted_is_null_pushdown.groovy index 8a4eec5f8eadf1..14fd007e5a5d69 100644 --- a/regression-test/suites/search/test_search_inverted_is_null_pushdown.groovy +++ b/regression-test/suites/search/test_search_inverted_is_null_pushdown.groovy @@ -42,7 +42,7 @@ suite("test_search_inverted_is_null_pushdown", "p0") { (4, NULL, 'qux', 10) """ - sql "SET enable_common_expr_pushdown=true" + sql "SET enable_segment_limit_pushdown=true" sql "SET inverted_index_skip_threshold=0" def nullBranchQuery = """ diff --git a/regression-test/suites/search/test_search_lucene_mode.groovy b/regression-test/suites/search/test_search_lucene_mode.groovy index 4a2a5c7d94ccd7..ca5526669a80fe 100644 --- a/regression-test/suites/search/test_search_lucene_mode.groovy +++ b/regression-test/suites/search/test_search_lucene_mode.groovy @@ -33,8 +33,8 @@ suite("test_search_lucene_mode", "p0") { def tableName = "search_lucene_mode_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -73,7 +73,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 1: Standard mode AND behavior ============ // In standard mode, 'apple AND banana' behaves like boolean AND qt_standard_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:apple AND title:banana') ORDER BY id @@ -83,7 +83,7 @@ suite("test_search_lucene_mode", "p0") { // In Lucene mode, 'a AND b' marks both as MUST (+a +b) // Expected same result as standard mode for simple AND qt_lucene_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple AND banana', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -92,7 +92,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 3: Standard mode OR behavior ============ // In standard mode, 'apple OR date' returns any row matching either qt_standard_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:apple OR title:date') ORDER BY id @@ -101,7 +101,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 4: Lucene mode OR behavior ============ // In Lucene mode, 'a OR b' marks both as SHOULD with minimum_should_match=1 qt_lucene_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple OR date', '{"default_field":"title","default_operator":"or","mode":"lucene"}') ORDER BY id @@ -117,7 +117,7 @@ suite("test_search_lucene_mode", "p0") { // So effectively: +apple only // Expected: rows containing 'apple' -> 1, 2, 3, 8 qt_lucene_complex_and_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple AND banana OR cherry', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -133,7 +133,7 @@ suite("test_search_lucene_mode", "p0") { // So effectively: apple AND (banana OR cherry) // Expected: rows with 'apple' AND ('banana' OR 'cherry') -> 1, 2 qt_lucene_min_should_match_1 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple AND banana OR cherry', '{"default_field":"title","default_operator":"and","mode":"lucene","minimum_should_match":1}') ORDER BY id @@ -144,7 +144,7 @@ suite("test_search_lucene_mode", "p0") { // This matches all documents EXCEPT those containing the negated term. // Expected: all docs without "apple" in title (4, 5, 6, 7) qt_lucene_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('NOT apple', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -156,7 +156,7 @@ suite("test_search_lucene_mode", "p0") { // - 'NOT b' makes 'b' MUST_NOT // Expected: rows with 'apple' but NOT 'banana' qt_lucene_and_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple AND NOT banana', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -168,7 +168,7 @@ suite("test_search_lucene_mode", "p0") { // - 'NOT b' makes 'b' MUST_NOT // Expected: rows with 'apple' OR (NOT 'banana') qt_lucene_or_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple OR NOT banana', '{"default_field":"title","default_operator":"or","mode":"lucene","minimum_should_match":1}') ORDER BY id @@ -178,7 +178,7 @@ suite("test_search_lucene_mode", "p0") { // 'a OR b OR c' with only SHOULD clauses // minimum_should_match defaults to 1 (at least one must match) qt_lucene_or_only """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple OR date OR fig', '{"default_field":"title","default_operator":"or","mode":"lucene"}') ORDER BY id @@ -187,7 +187,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 11: Lucene mode cross-field query ============ // Multi-field query with Lucene mode qt_lucene_cross_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, category + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, category FROM ${tableName} WHERE search('title:apple AND category:fruit', '{"default_operator":"and","mode":"lucene"}') ORDER BY id @@ -196,7 +196,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 12: Standard mode for comparison ============ // Same query in standard mode for comparison qt_standard_cross_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, category + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, category FROM ${tableName} WHERE search('title:apple AND category:fruit') ORDER BY id @@ -204,7 +204,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 13: Lucene mode with phrase query ============ qt_lucene_phrase """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('"apple banana"', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -212,7 +212,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 14: Lucene mode with wildcard ============ qt_lucene_wildcard """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('app* AND ban*', '{"default_field":"title","default_operator":"and","mode":"lucene"}') ORDER BY id @@ -221,7 +221,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 15: Verify standard mode unchanged ============ // Ensure standard mode is not affected by the Lucene mode addition qt_standard_unchanged """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:apple AND title:banana') ORDER BY id @@ -229,7 +229,7 @@ suite("test_search_lucene_mode", "p0") { // ============ Test 16: Lucene mode with empty options (should use standard mode) ============ qt_empty_options """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple AND banana', '{"default_field":"title","default_operator":"and"}') ORDER BY id @@ -239,7 +239,7 @@ suite("test_search_lucene_mode", "p0") { // With minimum_should_match=0 (default in filter context), SHOULD clauses are discarded // when MUST clauses exist qt_lucene_min_should_match_0 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('apple AND banana OR date', '{"default_field":"title","default_operator":"and","mode":"lucene","minimum_should_match":0}') ORDER BY id diff --git a/regression-test/suites/search/test_search_mow_support.groovy b/regression-test/suites/search/test_search_mow_support.groovy index 279cc45b1dfa84..8a111f0e75a528 100644 --- a/regression-test/suites/search/test_search_mow_support.groovy +++ b/regression-test/suites/search/test_search_mow_support.groovy @@ -49,8 +49,8 @@ suite("test_search_mow_support", "p0") { (4, 'rainbowman lowercase', 'case variants') """ - sql "SET enable_common_expr_pushdown = true" - sql "SET enable_common_expr_pushdown_for_inverted_index = true" + sql "SET enable_segment_limit_pushdown = true" + sql "SET enable_segment_limit_pushdown = true" def exactCount = sql """ SELECT /*+SET_VAR(enable_inverted_index_query=true) */ count(*) diff --git a/regression-test/suites/search/test_search_multi_analyzer_lucene.groovy b/regression-test/suites/search/test_search_multi_analyzer_lucene.groovy index 2d7657728bb9a9..19be731283495e 100644 --- a/regression-test/suites/search/test_search_multi_analyzer_lucene.groovy +++ b/regression-test/suites/search/test_search_multi_analyzer_lucene.groovy @@ -28,8 +28,8 @@ suite("test_search_multi_analyzer_lucene") { def tableName = "search_multi_analyzer_lucene_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -60,7 +60,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 1: Lucene mode TERM query - should use tokenized index qt_lucene_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('hello', '{"default_field":"title", "default_operator":"AND", "mode":"lucene", "minimum_should_match": 0}') ORDER BY id @@ -68,7 +68,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 2: Lucene mode AND query qt_lucene_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('hello AND world', '{"default_field":"title", "default_operator":"AND", "mode":"lucene"}') ORDER BY id @@ -76,7 +76,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 3: Lucene mode OR query qt_lucene_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('hello OR peace', '{"default_field":"title", "default_operator":"OR", "mode":"lucene"}') ORDER BY id @@ -84,7 +84,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 4: Lucene mode wildcard query qt_lucene_wildcard """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('h*llo', '{"default_field":"title", "default_operator":"AND", "mode":"lucene", "minimum_should_match": 0}') ORDER BY id @@ -92,7 +92,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 5: Standard mode TERM query (non-lucene) with multi-index qt_standard_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:hello') ORDER BY id @@ -100,7 +100,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 6: Standard mode phrase query with multi-index qt_standard_phrase """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:"hello world"') ORDER BY id @@ -108,7 +108,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 7: Lucene mode phrase query with multi-index qt_lucene_phrase """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('"hello world"', '{"default_field":"title", "default_operator":"AND", "mode":"lucene"}') ORDER BY id @@ -116,7 +116,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 8: ANY clause with multi-index qt_any_multi_index """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:ANY(hello peace)') ORDER BY id @@ -124,7 +124,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 9: ALL clause with multi-index qt_all_multi_index """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:ALL(hello world)') ORDER BY id @@ -167,7 +167,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 10: Untokenized wildcard h*llo - no match because full string "hello world" != h*llo qt_untok_wildcard_no_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${untokTable} WHERE search('h*llo', '{"default_field":"title", "mode":"lucene"}') ORDER BY id @@ -175,7 +175,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 11: Untokenized wildcard hello* - matches full strings starting with "hello" qt_untok_wildcard_prefix """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${untokTable} WHERE search('hello*', '{"default_field":"title", "mode":"lucene"}') ORDER BY id @@ -183,7 +183,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 12: Untokenized wildcard *world - matches full strings ending with "world" qt_untok_wildcard_suffix """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${untokTable} WHERE search('*world', '{"default_field":"title", "mode":"lucene"}') ORDER BY id @@ -191,7 +191,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 13: Untokenized PREFIX hel* - matches full strings starting with "hel" qt_untok_prefix """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${untokTable} WHERE search('title:hel*', '{"mode":"lucene"}') ORDER BY id @@ -199,7 +199,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 14: Untokenized REGEXP hel.* - matches full strings matching regex qt_untok_regexp """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${untokTable} WHERE search('title:/hel.*/', '{"mode":"lucene"}') ORDER BY id @@ -207,7 +207,7 @@ suite("test_search_multi_analyzer_lucene") { // Test 15: Untokenized exact phrase match qt_untok_exact """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${untokTable} WHERE search('title:"hello world"', '{"mode":"lucene"}') ORDER BY id diff --git a/regression-test/suites/search/test_search_multi_field.groovy b/regression-test/suites/search/test_search_multi_field.groovy index f9f6ab3a42e106..fdd5b748c85515 100644 --- a/regression-test/suites/search/test_search_multi_field.groovy +++ b/regression-test/suites/search/test_search_multi_field.groovy @@ -33,8 +33,8 @@ suite("test_search_multi_field", "p0") { def tableName = "search_multi_field_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -78,7 +78,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 1: Single term across multiple fields ============ // "machine" in title OR content qt_multi_field_single_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine', '{"mode":"standard","fields":["title","content"]}') ORDER BY id @@ -90,7 +90,7 @@ suite("test_search_multi_field", "p0") { // id=1: title has both terms // id=9: title has "machine", content has "learning" (cross_fields match) qt_multi_field_multi_term_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"mode":"standard","fields":["title","content"],"default_operator":"and","type":"cross_fields"}') ORDER BY id @@ -100,7 +100,7 @@ suite("test_search_multi_field", "p0") { // Same as Test 2 but with mode:lucene - should have same result // Uses cross_fields semantics explicitly qt_multi_field_multi_term_and_lucene """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"fields":["title","content"],"default_operator":"and","mode":"lucene","type":"cross_fields"}') ORDER BY id @@ -108,7 +108,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 3: Multiple terms with OR (default) ============ qt_multi_field_multi_term_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"mode":"standard","fields":["title","content"],"default_operator":"or"}') ORDER BY id @@ -117,7 +117,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 4: Explicit AND operator in DSL (cross_fields) ============ // Uses explicit type:cross_fields for backward compatibility qt_multi_field_explicit_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine AND learning', '{"mode":"standard","fields":["title","content"],"type":"cross_fields"}') ORDER BY id @@ -125,7 +125,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 5: Mixed - some terms with explicit field (cross_fields) ============ qt_multi_field_mixed """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, category + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, category FROM ${tableName} WHERE search('machine AND category:tech', '{"mode":"standard","fields":["title","content"],"type":"cross_fields"}') ORDER BY id @@ -133,7 +133,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 6: Three fields ============ qt_three_fields """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('ai', '{"mode":"standard","fields":["title","content","tags"]}') ORDER BY id @@ -141,7 +141,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 7: Wildcard across fields ============ qt_multi_field_wildcard """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('learn*', '{"mode":"standard","fields":["title","content","tags"]}') ORDER BY id @@ -149,7 +149,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 8: NOT operator (cross_fields) ============ qt_multi_field_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine AND NOT cooking', '{"mode":"standard","fields":["title","content"],"type":"cross_fields"}') ORDER BY id @@ -157,7 +157,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 9: Complex boolean (cross_fields) ============ qt_multi_field_complex """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('(machine OR ai) AND NOT cooking', '{"mode":"standard","fields":["title","content"],"type":"cross_fields"}') ORDER BY id @@ -165,7 +165,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 10: Single field in array (backward compatible) ============ qt_single_field_array """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine', '{"mode":"standard","fields":["title"]}') ORDER BY id @@ -175,7 +175,7 @@ suite("test_search_multi_field", "p0") { // This is equivalent to Test 2 but uses Lucene mode with explicit AND operator // Uses cross_fields semantics explicitly qt_multi_field_lucene_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine AND learning', '{"fields":["title","content"],"mode":"lucene","minimum_should_match":0,"type":"cross_fields"}') ORDER BY id @@ -186,7 +186,7 @@ suite("test_search_multi_field", "p0") { // Query: "machine AND learning" across title and content // id=9 has 'machine' in title and 'learning' in content - should match with cross_fields qt_multi_field_cross_fields_verify """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('machine AND learning', '{"mode":"standard","fields":["title","content"],"type":"cross_fields"}') ORDER BY id @@ -194,7 +194,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 12: Multi-field with Lucene mode - OR ============ qt_multi_field_lucene_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine OR cooking', '{"fields":["title","content"],"mode":"lucene"}') ORDER BY id @@ -203,7 +203,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 13: Multi-field with Lucene mode - AND OR mixed (cross_fields) ============ // With minimum_should_match=0, SHOULD clauses are discarded when MUST exists qt_multi_field_lucene_and_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine AND learning OR cooking', '{"fields":["title","content"],"mode":"lucene","minimum_should_match":0,"type":"cross_fields"}') ORDER BY id @@ -211,7 +211,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 14: Multi-field with Lucene mode - minimum_should_match=1 (cross_fields) ============ qt_multi_field_lucene_min_should_1 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine AND learning OR cooking', '{"fields":["title","content"],"mode":"lucene","minimum_should_match":1,"type":"cross_fields"}') ORDER BY id @@ -219,7 +219,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 15: Multi-field with Lucene mode - AND NOT (cross_fields) ============ qt_multi_field_lucene_and_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine AND NOT maintenance', '{"fields":["title","content"],"mode":"lucene","minimum_should_match":0,"type":"cross_fields"}') ORDER BY id @@ -228,7 +228,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 16: Comparison - same query with default_field vs fields ============ // Using default_field (single field) qt_compare_default_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine', '{"mode":"standard","default_field":"title"}') ORDER BY id @@ -236,7 +236,7 @@ suite("test_search_multi_field", "p0") { // Using fields array with single field (should be same as default_field) qt_compare_fields_single """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine', '{"mode":"standard","fields":["title"]}') ORDER BY id @@ -244,7 +244,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 17: EXACT function across fields ============ qt_multi_field_exact """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('EXACT(machine learning)', '{"mode":"standard","fields":["title","content"]}') ORDER BY id @@ -252,7 +252,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 18: ANY function across fields ============ qt_multi_field_any """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('ANY(machine cooking)', '{"mode":"standard","fields":["title","content"]}') ORDER BY id @@ -263,7 +263,7 @@ suite("test_search_multi_field", "p0") { // Only id=1 matches: title has both "machine" and "learning" // id=9 does NOT match: "machine" in title, "learning" in content (different fields) qt_multi_field_best_fields_default """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"mode":"standard","fields":["title","content"],"default_operator":"and"}') ORDER BY id @@ -273,7 +273,7 @@ suite("test_search_multi_field", "p0") { // With cross_fields, terms can be in DIFFERENT fields // Both id=1 and id=9 match qt_multi_field_cross_fields """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"mode":"standard","fields":["title","content"],"default_operator":"and","type":"cross_fields"}') ORDER BY id @@ -283,7 +283,7 @@ suite("test_search_multi_field", "p0") { // In lucene mode, best_fields uses per-clause expansion (matching ES query_string), // so id=1 and id=9 both match (terms can be across different fields) qt_multi_field_best_fields_lucene """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"fields":["title","content"],"default_operator":"and","mode":"lucene","type":"best_fields"}') ORDER BY id @@ -291,7 +291,7 @@ suite("test_search_multi_field", "p0") { // ============ Test 22: cross_fields with Lucene mode ============ qt_multi_field_cross_fields_lucene """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('machine learning', '{"fields":["title","content"],"default_operator":"and","mode":"lucene","type":"cross_fields"}') ORDER BY id @@ -301,28 +301,28 @@ suite("test_search_multi_field", "p0") { // Regression test for DORIS-24536: search('*', ...) with multi-field should not error // "*" is a match-all query that should return all rows qt_multi_field_match_all_best_fields """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('*', '{"fields":["title","content"],"type":"best_fields","default_operator":"AND","mode":"lucene","minimum_should_match":0}') """ // ============ Test 24: MATCH_ALL_DOCS (*) with cross_fields + lucene mode ============ qt_multi_field_match_all_cross_fields """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('*', '{"fields":["title","content"],"type":"cross_fields","default_operator":"AND","mode":"lucene","minimum_should_match":0}') """ // ============ Test 25: MATCH_ALL_DOCS (*) with single default_field + lucene mode ============ qt_match_all_single_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('*', '{"default_field":"title","default_operator":"AND","mode":"lucene","minimum_should_match":0}') """ // ============ Test 26: MATCH_ALL_DOCS (*) with best_fields standard mode (no lucene) ============ qt_multi_field_match_all_standard """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('*', '{"mode":"standard","fields":["title","content"],"type":"best_fields","default_operator":"AND"}') """ diff --git a/regression-test/suites/search/test_search_not_null_bitmap.groovy b/regression-test/suites/search/test_search_not_null_bitmap.groovy index e15c705bc7b537..7812cd19dda326 100644 --- a/regression-test/suites/search/test_search_not_null_bitmap.groovy +++ b/regression-test/suites/search/test_search_not_null_bitmap.groovy @@ -25,7 +25,7 @@ suite("test_search_not_null_bitmap", "p0") { def tableName = "search_not_null_bitmap" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -58,26 +58,26 @@ suite("test_search_not_null_bitmap", "p0") { // Internal NOT via search DSL - must match external NOT qt_not_internal_ids """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('NOT msg:omega') ORDER BY id """ // External NOT via SQL NOT operator (this always worked correctly) qt_not_external_ids """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE NOT search('msg:omega') ORDER BY id """ // Count must match between internal and external NOT qt_not_internal_count """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT msg:omega') """ qt_not_external_count """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE NOT search('msg:omega') """ @@ -113,12 +113,12 @@ suite("test_search_not_null_bitmap", "p0") { // All NULL rows should be excluded by NOT query qt_all_null_internal """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${allNullTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${allNullTable} WHERE search('NOT msg:anything') """ qt_all_null_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${allNullTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${allNullTable} WHERE NOT search('msg:anything') """ @@ -160,39 +160,39 @@ suite("test_search_not_null_bitmap", "p0") { // NOT on title field: NULL title rows (id=2,4) should be excluded qt_mixed_not_title_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE search('NOT title:hello') ORDER BY id """ qt_mixed_not_title_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE NOT search('title:hello') ORDER BY id """ // NOT on content field: NULL content rows (id=3,4) should be excluded qt_mixed_not_content_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE search('NOT content:morning') ORDER BY id """ qt_mixed_not_content_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE NOT search('content:morning') ORDER BY id """ // Complex: (title:hello OR content:good) AND NOT title:goodbye qt_mixed_complex_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE search('(title:hello OR content:good) AND NOT title:goodbye') ORDER BY id """ qt_mixed_complex_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE (search('title:hello') OR search('content:good')) AND NOT search('title:goodbye') ORDER BY id @@ -203,13 +203,13 @@ suite("test_search_not_null_bitmap", "p0") { // --------------------------------------------------------------- qt_multi_must_not_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE search('NOT title:hello AND NOT title:goodbye') ORDER BY id """ qt_multi_must_not_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mixedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mixedTable} WHERE NOT search('title:hello') AND NOT search('title:goodbye') ORDER BY id diff --git a/regression-test/suites/search/test_search_null_regression.groovy b/regression-test/suites/search/test_search_null_regression.groovy index dc5dc4e421547d..0ce97ac7c78aea 100644 --- a/regression-test/suites/search/test_search_null_regression.groovy +++ b/regression-test/suites/search/test_search_null_regression.groovy @@ -18,8 +18,8 @@ suite("test_search_null_regression", "p0") { def tableName = "search_null_regression_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -71,24 +71,24 @@ suite("test_search_null_regression", "p0") { // This reproduces the original bug: search('title:"Ronald" or (content:ALL("Selma Blair"))', '{"mode":"standard"}') // vs title match "Ronald" or (content match_all "Selma Blair") qt_regression_1_search_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Ronald OR (content:ALL(Selma Blair))', '{"mode":"standard"}') """ qt_regression_1_match_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Ronald" or (content match_all "Selma Blair") """ // Detailed verification - get actual matching rows for OR query qt_regression_1_search_or_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:Ronald OR (content:ALL(Selma Blair))', '{"mode":"standard"}') ORDER BY id """ qt_regression_1_match_or_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE title match "Ronald" or (content match_all "Selma Blair") ORDER BY id """ @@ -96,24 +96,24 @@ suite("test_search_null_regression", "p0") { // Regression Test 2: Original Issue - NOT Query Inconsistency // This reproduces: search('not content:"Round"', '{"mode":"standard"}') vs not search('content:"Round"', '{"mode":"standard"}') qt_regression_2_internal_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT content:Round', '{"mode":"standard"}') """ qt_regression_2_external_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('content:Round', '{"mode":"standard"}') """ // Detailed verification for NOT query qt_regression_2_internal_not_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('NOT content:Round', '{"mode":"standard"}') ORDER BY id """ qt_regression_2_external_not_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE not search('content:Round', '{"mode":"standard"}') ORDER BY id """ @@ -121,73 +121,73 @@ suite("test_search_null_regression", "p0") { // Regression Test 3: NULL Handling in OR Queries // Verify that OR queries properly handle NULL values according to SQL semantics qt_regression_3_null_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:NonExistent OR content:Ronald', '{"mode":"standard"}') ORDER BY id """ // Test with match function for comparison qt_regression_3_match_null_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE title match "NonExistent" or content match "Ronald" ORDER BY id """ // Regression Test 4: NULL Handling in AND Queries qt_regression_4_null_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Ronald AND content:biography', '{"mode":"standard"}') ORDER BY id """ // Regression Test 5: Complex Boolean Operations qt_regression_5_complex_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('(title:Ronald OR content:Selma) AND NOT content:Round', '{"mode":"standard"}') """ qt_regression_5_complex_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE (title match "Ronald" or content match "Selma") and not search('content:"Round"', '{"mode":"standard"}') """ // Regression Test 6: Edge Case - All NULL Query qt_regression_6_all_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:NonExistent AND content:NonExistent', '{"mode":"standard"}') """ // Regression Test 7: Case Sensitivity and Variations qt_regression_7_case_lower """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('content:round', '{"mode":"standard"}') """ qt_regression_7_case_upper """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('content:Round', '{"mode":"standard"}') """ // Regression Test 8: Multiple NOT operations qt_regression_8_multiple_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT (title:nonexistent OR content:nonexistent)', '{"mode":"standard"}') """ qt_regression_8_external_multiple_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('title:nonexistent OR content:nonexistent', '{"mode":"standard"}') """ // Regression Test 9: Empty string handling qt_regression_9_empty_string """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:"" OR content:Round', '{"mode":"standard"}') """ // Regression Test 10: Performance test with complex query qt_regression_10_performance """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('(title:Ronald OR title:Selma OR content:Round) AND NOT (title:NonExistent AND content:NonExistent)', '{"mode":"standard"}') """ } \ No newline at end of file diff --git a/regression-test/suites/search/test_search_null_semantics.groovy b/regression-test/suites/search/test_search_null_semantics.groovy index 2003c2d4c50542..98426816c4da58 100644 --- a/regression-test/suites/search/test_search_null_semantics.groovy +++ b/regression-test/suites/search/test_search_null_semantics.groovy @@ -18,8 +18,8 @@ suite("test_search_null_semantics", "p0") { def tableName = "search_null_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -63,30 +63,30 @@ suite("test_search_null_semantics", "p0") { // search('title:"Ronald" or (content:ALL("Selma Blair"))', '{"mode":"standard"}') should match // title match "Ronald" or (content match_all "Selma Blair") qt_test_case_1_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Ronald OR (content:ALL(Selma Blair))', '{"mode":"standard"}') """ qt_test_case_1_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Ronald" or (content match_all "Selma Blair") """ // Test Case 2: NOT query consistency - Original Issue Reproduction // search('not content:"Round"', '{"mode":"standard"}') should match not search('content:"Round"', '{"mode":"standard"}') qt_test_case_2_internal_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT content:Round', '{"mode":"standard"}') """ qt_test_case_2_external_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('content:Round', '{"mode":"standard"}') """ // Test Case 2b: Phrase NOT queries must treat NULL rows as UNKNOWN qt_test_case_2_phrase_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE NOT search('content:"Selma Blair"', '{"mode":"standard"}') ORDER BY id """ @@ -94,7 +94,7 @@ suite("test_search_null_semantics", "p0") { // Test Case 3: NULL handling in OR queries // Verify that NULL OR TRUE = TRUE logic works qt_test_case_3_or_with_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:Ronald OR content:biography', '{"mode":"standard"}') ORDER BY id """ @@ -102,42 +102,42 @@ suite("test_search_null_semantics", "p0") { // Test Case 4: NULL handling in AND queries // Verify that NULL AND TRUE = NULL logic works qt_test_case_4_and_with_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:Ronald AND content:biography', '{"mode":"standard"}') ORDER BY id """ // Test Case 5: Complex OR query with multiple NULL scenarios qt_test_case_5_complex_or_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Unknown OR content:mascot OR category:Test', '{"mode":"standard"}') """ qt_test_case_5_complex_or_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Unknown" or content match "mascot" or category match "Test" """ // Test Case 6: NOT query with different field types qt_test_case_6_not_title_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT title:Ronald', '{"mode":"standard"}') """ qt_test_case_6_not_title_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('title:Ronald', '{"mode":"standard"}') """ // Test Case 7: Mixed boolean operations qt_test_case_7_mixed """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('(title:Ronald OR content:Selma) AND NOT category:Unknown', '{"mode":"standard"}') """ // Test Case 8: Edge case - all NULL fields qt_test_case_8_all_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:NonExistent OR content:NonExistent OR category:NonExistent', '{"mode":"standard"}') """ @@ -205,69 +205,69 @@ suite("test_search_null_semantics", "p0") { Thread.sleep(10000) qt_nested_1_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE search('(field_a:alpha OR field_b:beta) AND (field_c:gamma OR field_d:delta)', '{"mode":"standard"}') """ qt_nested_1_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE (field_a match "alpha" OR field_b match "beta") AND (field_c match "gamma" OR field_d match "delta") """ qt_nested_1_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, field_a, field_b, field_c, field_d + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, field_a, field_b, field_c, field_d FROM ${nestedTable} WHERE search('(field_a:alpha OR field_b:beta) AND (field_c:gamma OR field_d:delta)', '{"mode":"standard"}') ORDER BY id """ qt_nested_2_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE search('field_a:target OR (field_b:beta AND (field_c:gamma OR field_d:delta))', '{"mode":"standard"}') """ qt_nested_2_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE field_a match "target" OR (field_b match "beta" AND (field_c match "gamma" OR field_d match "delta")) """ qt_nested_3_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE search('NOT (field_a:forbidden OR field_b:forbidden)', '{"mode":"standard"}') """ qt_nested_3_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE NOT (field_a match "forbidden" OR field_b match "forbidden") """ qt_nested_4_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE search('(field_a:alpha OR field_b:beta) AND NOT (field_c:exclude OR field_d:exclude)', '{"mode":"standard"}') """ qt_nested_4_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE (field_a match "alpha" OR field_b match "beta") AND NOT (field_c match "exclude" OR field_d match "exclude") """ qt_nested_5_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE search('field_a:alpha OR field_b:beta OR field_c:gamma OR field_d:delta', '{"mode":"standard"}') """ qt_nested_5_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE field_a match "alpha" OR field_b match "beta" OR field_c match "gamma" OR field_d match "delta" """ qt_nested_6_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE search('field_a:alpha AND (field_b:beta OR (field_c:gamma AND field_d:delta))', '{"mode":"standard"}') """ qt_nested_6_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${nestedTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${nestedTable} WHERE field_a match "alpha" AND (field_b match "beta" OR (field_c match "gamma" AND field_d match "delta")) """ @@ -327,79 +327,79 @@ suite("test_search_null_semantics", "p0") { Thread.sleep(10000) qt_ternary_1_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('title:Ronald OR content:Selma', '{"mode":"standard"}') """ qt_ternary_1_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE title match "Ronald" OR content match "Selma" """ qt_ternary_1_search_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content, category FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content, category FROM ${ternaryTable} WHERE search('title:Ronald OR content:Selma', '{"mode":"standard"}') ORDER BY id """ qt_ternary_1_match_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content, category FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content, category FROM ${ternaryTable} WHERE title match "Ronald" OR content match "Selma" ORDER BY id """ qt_ternary_2_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('title:Ronald AND category:politics', '{"mode":"standard"}') """ qt_ternary_2_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE title match "Ronald" AND category match "politics" """ qt_ternary_3_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('NOT content:spam', '{"mode":"standard"}') """ qt_ternary_3_external """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE NOT search('content:spam', '{"mode":"standard"}') """ qt_ternary_4_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('title:Ronald OR content:Selma OR category:biography', '{"mode":"standard"}') """ qt_ternary_4_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE title match "Ronald" OR content match "Selma" OR category match "biography" """ qt_ternary_5_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('(title:Ronald OR content:Selma) AND category:politics', '{"mode":"standard"}') """ qt_ternary_5_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE (title match "Ronald" OR content match "Selma") AND category match "politics" """ qt_ternary_6_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('title:Ronald OR NOT content:spam', '{"mode":"standard"}') """ qt_ternary_6_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE title match "Ronald" OR NOT content match "spam" """ qt_ternary_7_all_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${ternaryTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${ternaryTable} WHERE search('title:NonExistent OR content:NonExistent OR category:NonExistent', '{"mode":"standard"}') """ diff --git a/regression-test/suites/search/test_search_regexp_lowercase.groovy b/regression-test/suites/search/test_search_regexp_lowercase.groovy index 81b93d0de7d162..09c46a517389d0 100644 --- a/regression-test/suites/search/test_search_regexp_lowercase.groovy +++ b/regression-test/suites/search/test_search_regexp_lowercase.groovy @@ -22,8 +22,8 @@ suite("test_search_regexp_lowercase", "p0") { def tableName = "search_regexp_lowercase_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -56,14 +56,14 @@ suite("test_search_regexp_lowercase", "p0") { // search() REGEXP with uppercase pattern - should return 0 rows // because indexed terms are lowercased (abc, def) but pattern AB.* is case-sensitive qt_regexp_uppercase_no_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE search('/AB.*/', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ // match_regexp with uppercase pattern - should also return 0 rows qt_match_regexp_uppercase_no_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE title match_regexp 'AB.*' ORDER BY a """ @@ -74,14 +74,14 @@ suite("test_search_regexp_lowercase", "p0") { // search() REGEXP with lowercase pattern - should match both rows with "abc" qt_regexp_lowercase_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE search('/ab.*/', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ // match_regexp with lowercase pattern - should also match qt_match_regexp_lowercase_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE title match_regexp 'ab.*' ORDER BY a """ @@ -92,14 +92,14 @@ suite("test_search_regexp_lowercase", "p0") { // search() WILDCARD with uppercase - should match because wildcard patterns are lowercased qt_wildcard_uppercase_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE search('AB*', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ // search() WILDCARD with lowercase - should also match qt_wildcard_lowercase_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE search('ab*', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ @@ -110,14 +110,14 @@ suite("test_search_regexp_lowercase", "p0") { // Lowercase regex that matches "apple" - should match rows 3 and 4 qt_regexp_apple_lowercase """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE search('/app.*/', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ // Uppercase regex "App.*" should NOT match (terms are lowercased as "apple") qt_regexp_apple_uppercase_no_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ${tableName} WHERE search('/App.*/', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ @@ -128,26 +128,26 @@ suite("test_search_regexp_lowercase", "p0") { // Both should return same results for lowercase pattern qt_consistency_regexp_cherry """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ a FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ a FROM ${tableName} WHERE search('/cher.*/', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ qt_consistency_match_regexp_cherry """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ a FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ a FROM ${tableName} WHERE title match_regexp 'cher.*' ORDER BY a """ // Both should return 0 rows for uppercase pattern qt_consistency_regexp_cherry_upper """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ a FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ a FROM ${tableName} WHERE search('/CHER.*/', '{"default_field":"title","default_operator":"AND","mode":"lucene", "minimum_should_match": 0}') ORDER BY a """ qt_consistency_match_regexp_cherry_upper """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ a FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ a FROM ${tableName} WHERE title match_regexp 'CHER.*' ORDER BY a """ diff --git a/regression-test/suites/search/test_search_slash_in_term.groovy b/regression-test/suites/search/test_search_slash_in_term.groovy index fa625c8171f101..deefa5d1c23e7d 100644 --- a/regression-test/suites/search/test_search_slash_in_term.groovy +++ b/regression-test/suites/search/test_search_slash_in_term.groovy @@ -31,7 +31,7 @@ suite("test_search_slash_in_term", "p0") { def tableName = "search_slash_in_term_test" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -72,7 +72,7 @@ suite("test_search_slash_in_term", "p0") { // title:AC/DC should parse as single term, standard analyzer tokenizes to "ac" and "dc" // With default OR operator, matches rows containing "ac" or "dc" in title order_qt_slash_in_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:AC/DC') ORDER BY id @@ -82,7 +82,7 @@ suite("test_search_slash_in_term", "p0") { // title:AC\/DC should produce the same result as title:AC/DC // Groovy: \\\\/ -> SQL: \\/ -> DSL: \/ -> unescaped: / order_qt_escaped_slash_in_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:AC\\\\/DC') ORDER BY id @@ -91,7 +91,7 @@ suite("test_search_slash_in_term", "p0") { // ============ Test 3: Slash in term with default_field (lucene mode) ============ // Bare AC/DC with default_field should work order_qt_slash_bare_lucene """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('AC/DC', '{"default_field":"title","default_operator":"OR","minimum_should_match":0}') ORDER BY id @@ -99,7 +99,7 @@ suite("test_search_slash_in_term", "p0") { // ============ Test 4: Escaped slash with default_field should match ============ order_qt_escaped_slash_bare_lucene """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('AC\\\\/DC', '{"default_field":"title","default_operator":"OR","minimum_should_match":0}') ORDER BY id @@ -107,7 +107,7 @@ suite("test_search_slash_in_term", "p0") { // ============ Test 5: Multiple slashes in term ============ order_qt_multi_slash """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:path/to/file') ORDER BY id @@ -116,7 +116,7 @@ suite("test_search_slash_in_term", "p0") { // ============ Test 6: Regex pattern still works ============ // /[a-z]+/ should be parsed as regex, not as term with slashes order_qt_regex_still_works """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:/rock/') ORDER BY id @@ -124,7 +124,7 @@ suite("test_search_slash_in_term", "p0") { // ============ Test 7: Slash in term with standard mode ============ order_qt_slash_standard_mode """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('AC/DC', '{"default_field":"title","mode":"standard"}') ORDER BY id diff --git a/regression-test/suites/search/test_search_usage_restrictions.groovy b/regression-test/suites/search/test_search_usage_restrictions.groovy index 842fa5454adb49..de510db6ad2759 100644 --- a/regression-test/suites/search/test_search_usage_restrictions.groovy +++ b/regression-test/suites/search/test_search_usage_restrictions.groovy @@ -70,53 +70,53 @@ suite("test_search_usage_restrictions", "p0") { // ============ Valid Usage Tests ============ // Test 1: search() in WHERE clause is allowed - qt_valid_where "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Learning') ORDER BY id" + qt_valid_where "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} WHERE search('title:Learning') ORDER BY id" // Test 2: search() with AND/OR in WHERE is allowed - qt_valid_where_complex "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') AND id > 1 ORDER BY id" + qt_valid_where_complex "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') AND id > 1 ORDER BY id" // Test 3: Multiple search() in WHERE is allowed - qt_valid_multiple_search "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') OR search('content:tutorial') ORDER BY id" + qt_valid_multiple_search "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') OR search('content:tutorial') ORDER BY id" // Test 4: search() with LIMIT is allowed - qt_valid_with_limit "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') LIMIT 2" + qt_valid_with_limit "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') LIMIT 2" // ============ Invalid Usage Tests - Should Fail ============ // Test 5: search() in GROUP BY should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} GROUP BY search('title:Learning')" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} GROUP BY search('title:Learning')" exception "predicates are only supported inside WHERE filters on single-table scans" } // Test 6: search() in SELECT then GROUP BY alias should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ search('title:Learning') as s, count(*) FROM ${tableName} GROUP BY s" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ search('title:Learning') as s, count(*) FROM ${tableName} GROUP BY s" exception "search()" } // Test 7: search() in SELECT projection (without WHERE) should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ search('title:Learning'), title FROM ${tableName}" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ search('title:Learning'), title FROM ${tableName}" exception "search()" } // Test 8: search() in aggregate output should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(search('title:Learning')) FROM ${tableName}" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(search('title:Learning')) FROM ${tableName}" exception "search()" } // Test 9: search() in HAVING clause should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ category, count(*) FROM ${tableName} GROUP BY category HAVING search('title:Learning')" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ category, count(*) FROM ${tableName} GROUP BY category HAVING search('title:Learning')" exception "predicates are only supported inside WHERE filters on single-table scans" } // Test 10: search() with JOIN should fail (not single table) test { sql """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ t1.id FROM ${tableName} t1 + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ t1.id FROM ${tableName} t1 JOIN ${tableName2} t2 ON t1.id = t2.id WHERE search('title:Learning') """ @@ -125,25 +125,25 @@ suite("test_search_usage_restrictions", "p0") { // Test 11: search() in ORDER BY should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title FROM ${tableName} ORDER BY search('title:Learning')" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title FROM ${tableName} ORDER BY search('title:Learning')" exception "search()" } // Test 12: search() in CASE WHEN (outside WHERE) should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ CASE WHEN search('title:Learning') THEN 1 ELSE 0 END FROM ${tableName}" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ CASE WHEN search('title:Learning') THEN 1 ELSE 0 END FROM ${tableName}" exception "search()" } // Test 13: search() in aggregate function context should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ max(search('title:Learning')) FROM ${tableName}" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ max(search('title:Learning')) FROM ${tableName}" exception "search()" } // Test 14: search() in window function should fail test { - sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, row_number() OVER (ORDER BY search('title:Learning')) FROM ${tableName}" + sql "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, row_number() OVER (ORDER BY search('title:Learning')) FROM ${tableName}" exception "search()" } @@ -151,24 +151,24 @@ suite("test_search_usage_restrictions", "p0") { // Test 15: search() in subquery WHERE is allowed (subquery is single table) qt_valid_subquery """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ * FROM ( + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ * FROM ( SELECT id, title FROM ${tableName} WHERE search('title:Learning') ) t WHERE id > 1 ORDER BY id """ // Test 16: Multiple fields in search() DSL is allowed - qt_valid_multi_field "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning AND content:tutorial') ORDER BY id" + qt_valid_multi_field "SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning AND content:tutorial') ORDER BY id" // Test 17: search() with complex boolean logic in WHERE is allowed qt_valid_complex_where """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE (search('title:Learning') OR id = 1) AND category = 'Technology' ORDER BY id """ // Test 18: search() in UNION queries (each part valid) should work qt_valid_union """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${tableName} WHERE search('title:Learning') UNION ALL SELECT id FROM ${tableName} WHERE search('content:tutorial') ORDER BY id diff --git a/regression-test/suites/search/test_search_variant_dual_index_reader.groovy b/regression-test/suites/search/test_search_variant_dual_index_reader.groovy index 2463d126ba6ebc..2eca25dea076ca 100644 --- a/regression-test/suites/search/test_search_variant_dual_index_reader.groovy +++ b/regression-test/suites/search/test_search_variant_dual_index_reader.groovy @@ -37,7 +37,7 @@ suite("test_search_variant_dual_index_reader", "p0") { def tableName = "test_variant_dual_index_reader" sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ // Pin doc_mode to false to prevent CI flakiness from fuzzy testing. sql """ set default_variant_enable_doc_mode = false """ @@ -87,7 +87,7 @@ suite("test_search_variant_dual_index_reader", "p0") { // Before fix: returns empty because EQUAL_QUERY selects STRING_TYPE reader. // After fix: returns rows 1, 3 because MATCH_ANY_QUERY selects FULLTEXT reader. qt_dual_index_basic """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('admin', '{"default_field":"props.string_8","mode":"lucene"}') ORDER BY id """ @@ -95,7 +95,7 @@ suite("test_search_variant_dual_index_reader", "p0") { // Test 2: Multi-term AND search. Both "admin" and "access" must match. // Before fix: empty. After fix: row 3. qt_dual_index_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('admin access', '{"default_field":"props.string_8","mode":"lucene","default_operator":"AND"}') ORDER BY id """ @@ -103,14 +103,14 @@ suite("test_search_variant_dual_index_reader", "p0") { // Test 3: Search on a different subcolumn matching the same field_pattern. // Ensures the fix works across different subcolumns under the same pattern. qt_dual_index_other_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('hello', '{"default_field":"props.string_1","mode":"lucene"}') ORDER BY id """ // Test 4: Field-qualified syntax with dual indexes. qt_dual_index_field_syntax """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('props.string_8:access', '{"mode":"lucene"}') ORDER BY id """ @@ -118,7 +118,7 @@ suite("test_search_variant_dual_index_reader", "p0") { // Test 5: Case-insensitive search (lowercase index). // "ADMIN" should match "admin user" and "admin access granted". qt_dual_index_case_insensitive """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('ADMIN', '{"default_field":"props.string_8","mode":"lucene"}') ORDER BY id """ @@ -126,7 +126,7 @@ suite("test_search_variant_dual_index_reader", "p0") { // Test 6: Verify MATCH_ANY also works as baseline (uses MATCH query type directly, // so it always picks FULLTEXT reader — this should work both before and after the fix). qt_dual_index_match_baseline """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE props['string_8'] MATCH_ANY 'admin' ORDER BY id """ diff --git a/regression-test/suites/search/test_search_variant_subcolumn_analyzer.groovy b/regression-test/suites/search/test_search_variant_subcolumn_analyzer.groovy index 69bc0f29157337..b33d97d7c13642 100644 --- a/regression-test/suites/search/test_search_variant_subcolumn_analyzer.groovy +++ b/regression-test/suites/search/test_search_variant_subcolumn_analyzer.groovy @@ -32,7 +32,7 @@ suite("test_search_variant_subcolumn_analyzer", "p0") { def tableName = "test_variant_subcolumn_analyzer" sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ // Pin doc_mode to false to prevent CI flakiness from fuzzy testing. // When default_variant_enable_doc_mode=true (randomly set by fuzzy testing), @@ -82,49 +82,49 @@ suite("test_search_variant_subcolumn_analyzer", "p0") { // "admin" should match "admin only" and "admin access granted" because the unicode // parser tokenizes them into ["admin", "only"] and ["admin", "access", "granted"] qt_search_variant_analyzer_basic """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('admin', '{"default_field":"data.string_8","mode":"lucene"}') ORDER BY id """ // Test 2: Verify MATCH also works (as a baseline) qt_match_variant_baseline """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE data['string_8'] MATCH_ANY 'admin' ORDER BY id """ // Test 3: Multi-term search should also work with tokenization qt_search_variant_analyzer_multi """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('admin access', '{"default_field":"data.string_8","mode":"lucene","default_operator":"AND"}') ORDER BY id """ // Test 4: Search on a different subcolumn matching the same field_pattern qt_search_variant_analyzer_other_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('hello', '{"default_field":"data.string_1","mode":"lucene"}') ORDER BY id """ // Test 5: Search with field-qualified syntax on variant subcolumn qt_search_variant_analyzer_field_syntax """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('data.string_8:user', '{"mode":"lucene"}') ORDER BY id """ // Test 6: Verify lowercase is applied (search for "ADMIN" should match "admin only") qt_search_variant_analyzer_lowercase """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('ADMIN', '{"default_field":"data.string_8","mode":"lucene"}') ORDER BY id """ // Test 7: Phrase search on variant subcolumn with analyzer qt_search_variant_analyzer_phrase """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('"admin only"', '{"default_field":"data.string_8","mode":"lucene"}') ORDER BY id """ @@ -169,7 +169,7 @@ suite("test_search_variant_subcolumn_analyzer", "p0") { // Test 8: search() on variant subcolumn with named field_pattern (direct match) qt_search_variant_direct_index """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName2} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName2} WHERE search('admin', '{"default_field":"data.name","mode":"lucene"}') ORDER BY id """ diff --git a/regression-test/suites/search/test_search_variant_wildcard.groovy b/regression-test/suites/search/test_search_variant_wildcard.groovy index 37fb79d35dac4b..205110d1348388 100644 --- a/regression-test/suites/search/test_search_variant_wildcard.groovy +++ b/regression-test/suites/search/test_search_variant_wildcard.groovy @@ -34,7 +34,7 @@ suite("test_search_variant_wildcard", "p0") { def tableName = "test_search_variant_wildcard" sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -77,21 +77,21 @@ suite("test_search_variant_wildcard", "p0") { // Test 1: TERM search for 'smith' on lastname - should return John Smith qt_term_smith """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('smith', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 2: TERM search for 'smithson' on lastname - should return Jane Smithson qt_term_smithson """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('smithson', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 3: TERM search for 'johnson' on lastname - should return Michael David Johnson qt_term_johnson """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('johnson', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ @@ -100,63 +100,63 @@ suite("test_search_variant_wildcard", "p0") { // Test 4: Leading wildcard '*ith' - should match "Smith" (ends with "ith") qt_wildcard_star_ith """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('*ith', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 5: Middle wildcard 'sm*th' - should match "Smith" qt_wildcard_sm_star_th """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('sm*th', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 6: Single char wildcard 'sm?th' - should match "Smith" qt_wildcard_sm_q_th """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('sm?th', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 7: Trailing wildcard 'smith*' - should match "Smith" and "Smithson" qt_wildcard_smith_star """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('smith*', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 8: Wildcard 'sm*' - should match "Smith" and "Smithson" qt_wildcard_sm_star """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('sm*', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 9: Wildcard '*son' - should match "Smithson" and "Johnson" qt_wildcard_star_son """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('*son', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 10: Wildcard on firstname field 'jo?n' - should match "John" qt_wildcard_firstname """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('jo?n', '{"default_field":"props.string_8","default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 11: Wildcard combined with AND - 'sm*th AND props.string_8:john' qt_wildcard_and_term """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('props.string_17:sm*th AND props.string_8:john', '{"default_operator":"and","mode":"lucene"}') ORDER BY id """ // Test 12: Standalone wildcard '*' matches all non-null values qt_wildcard_star_all """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ id FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ id FROM ${tableName} WHERE search('*', '{"default_field":"props.string_17","default_operator":"and","mode":"lucene"}') ORDER BY id """ diff --git a/regression-test/suites/search/test_search_variant_wildcard_custom_analyzer.groovy b/regression-test/suites/search/test_search_variant_wildcard_custom_analyzer.groovy index 2b2c91ff1259ae..b7c8c6c1a55f2d 100644 --- a/regression-test/suites/search/test_search_variant_wildcard_custom_analyzer.groovy +++ b/regression-test/suites/search/test_search_variant_wildcard_custom_analyzer.groovy @@ -37,7 +37,7 @@ suite("test_search_variant_wildcard_custom_analyzer", "p0") { def tableName = "test_search_variant_wildcard_custom_analyzer" sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -89,21 +89,21 @@ suite("test_search_variant_wildcard_custom_analyzer", "p0") { // Test 1: TERM search for 'smith' on lastname - should return John Smith qt_term_smith """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('smith', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 2: TERM search for 'smithson' on lastname - should return Jane Smithson qt_term_smithson """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('smithson', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 3: TERM search for 'johnson' on lastname - should return Michael David Johnson qt_term_johnson """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('johnson', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ @@ -112,42 +112,42 @@ suite("test_search_variant_wildcard_custom_analyzer", "p0") { // Test 4: Leading wildcard '*ith' - should match "smith" (ends with "ith") qt_wildcard_star_ith """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('*ith', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 5: Middle wildcard 'sm*th' - should match "smith" qt_wildcard_sm_star_th """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('sm*th', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 6: Single char wildcard 'sm?th' - should match "smith" qt_wildcard_sm_q_th """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('sm?th', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 7: Trailing wildcard 'smith*' - should match "smith" and "smithson" qt_wildcard_smith_star """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('smith*', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 8: Trailing wildcard 'sm*' - should match "smith" and "smithson" qt_wildcard_sm_star """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('sm*', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 9: Leading wildcard '*son' - should match "smithson" and "johnson" qt_wildcard_star_son """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('*son', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ @@ -156,14 +156,14 @@ suite("test_search_variant_wildcard_custom_analyzer", "p0") { // Test 10: Wildcard 'jo?n' on firstname - should match "john" qt_wildcard_firstname """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('jo?n', '{"default_field":"overflowProperties.string_8","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ // Test 11: Wildcard 'mi*' on firstname - should match "michael david" qt_wildcard_firstname_michael """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('mi*', '{"default_field":"overflowProperties.string_8","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ @@ -172,7 +172,7 @@ suite("test_search_variant_wildcard_custom_analyzer", "p0") { // Test 12: Wildcard combined with AND across fields qt_wildcard_cross_field """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('overflowProperties.string_17:sm*th AND overflowProperties.string_8:john', '{"default_operator":"and","mode":"lucene"}') ORDER BY objectId """ @@ -181,7 +181,7 @@ suite("test_search_variant_wildcard_custom_analyzer", "p0") { // Test 13: Standalone wildcard '*' matches all non-null values qt_wildcard_star_all """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true)*/ objectId FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true)*/ objectId FROM ${tableName} WHERE search('*', '{"default_field":"overflowProperties.string_17","default_operator":"and","mode":"lucene"}') ORDER BY objectId """ diff --git a/regression-test/suites/search/test_search_vs_match_consistency.groovy b/regression-test/suites/search/test_search_vs_match_consistency.groovy index 61afe470f32082..235d2b61e125e2 100644 --- a/regression-test/suites/search/test_search_vs_match_consistency.groovy +++ b/regression-test/suites/search/test_search_vs_match_consistency.groovy @@ -18,8 +18,8 @@ suite("test_search_vs_match_consistency", "p0") { def tableName = "search_match_consistency_test" - // Pin enable_common_expr_pushdown to prevent CI flakiness from fuzzy testing. - sql """ set enable_common_expr_pushdown = true """ + // Pin enable_segment_limit_pushdown to prevent CI flakiness from fuzzy testing. + sql """ set enable_segment_limit_pushdown = true """ sql "DROP TABLE IF EXISTS ${tableName}" @@ -106,122 +106,122 @@ suite("test_search_vs_match_consistency", "p0") { Thread.sleep(5000) qt_keyword_case_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ title FROM ${keywordTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ title FROM ${keywordTable} WHERE redirect match_all "Rainbowman" ORDER BY title """ qt_keyword_case_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ title FROM ${keywordTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ title FROM ${keywordTable} WHERE search('redirect:All("Rainbowman")', '{"mode":"standard"}') ORDER BY title """ // Test Suite 1: Basic OR query consistency qt_test_1_1_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Ronald OR title:Selma', '{"mode":"standard"}') """ qt_test_1_1_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Ronald" or title match "Selma" """ // Test 1.2: OR across different fields qt_test_1_2_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Ronald OR content:Selma', '{"mode":"standard"}') """ qt_test_1_2_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Ronald" or content match "Selma" """ // Test 1.3: Complex OR with ALL operation qt_test_1_3_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Ronald OR (content:ALL(Selma Blair))', '{"mode":"standard"}') """ qt_test_1_3_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Ronald" or (content match_all "Selma Blair") """ // Test Suite 2: NOT query consistency qt_test_2_1_internal_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT content:Round', '{"mode":"standard"}') """ qt_test_2_1_external_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('content:Round', '{"mode":"standard"}') """ // Test 2.2: NOT with different fields qt_test_2_2_internal_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT title:Ronald', '{"mode":"standard"}') """ qt_test_2_2_external_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('title:Ronald', '{"mode":"standard"}') """ // Test 2.3: NOT with complex expression qt_test_2_3_internal_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('NOT (title:Ronald AND content:biography)', '{"mode":"standard"}') """ qt_test_2_3_external_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE not search('title:Ronald AND content:biography', '{"mode":"standard"}') """ // Test Suite 3: NULL value behavior in OR queries qt_test_3_1_or_with_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:NonExistent OR content:Ronald', '{"mode":"standard"}') ORDER BY id """ qt_test_3_2_or_multiple_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:Mystery OR content:Round', '{"mode":"standard"}') ORDER BY id """ // Test Suite 4: AND query behavior with NULLs qt_test_4_1_and_with_null """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${tableName} WHERE search('title:Ronald AND content:biography', '{"mode":"standard"}') ORDER BY id """ // Test Suite 5: Edge cases and complex scenarios qt_test_5_1_empty_string """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:"" OR content:Round', '{"mode":"standard"}') """ qt_test_5_2_complex_nested """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('(title:Ronald OR title:Selma) AND NOT (content:Round AND author:NonExistent)', '{"mode":"standard"}') """ // Test Suite 6: Performance and consistency verification qt_test_6_1_large_or_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE search('title:Ronald OR title:Selma OR content:Round OR content:biography OR author:Smith OR tags:history', '{"mode":"standard"}') """ qt_test_6_1_large_or_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${tableName} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${tableName} WHERE title match "Ronald" or title match "Selma" or content match "Round" or content match "biography" or author match "Smith" or tags match "history" """ @@ -280,17 +280,17 @@ suite("test_search_vs_match_consistency", "p0") { // Mandy/Kesha consistency checks qt_man_pat_1_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE search('content:ALL("Mandy Patinkin") OR NOT (content:ANY("Kesha"))', '{"mode":"standard"}') """ qt_man_pat_1_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE content match_all "Mandy Patinkin" or not (content match_any "Kesha") """ qt_man_pat_1_search_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content, + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content, CASE WHEN title IS NULL THEN 'NULL' ELSE 'NOT_NULL' END AS title_status, CASE WHEN content IS NULL THEN 'NULL' ELSE 'NOT_NULL' END AS content_status FROM ${mandyTable} @@ -299,7 +299,7 @@ suite("test_search_vs_match_consistency", "p0") { """ qt_man_pat_1_match_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content, + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content, CASE WHEN title IS NULL THEN 'NULL' ELSE 'NOT_NULL' END AS title_status, CASE WHEN content IS NULL THEN 'NULL' ELSE 'NOT_NULL' END AS content_status FROM ${mandyTable} @@ -308,54 +308,54 @@ suite("test_search_vs_match_consistency", "p0") { """ qt_man_pat_2_search_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE search('title:Mandy OR content:Kesha', '{"mode":"standard"}') """ qt_man_pat_2_match_or """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE title match "Mandy" OR content match "Kesha" """ qt_man_pat_2_search_or_ids """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mandyTable} WHERE search('title:Mandy OR content:Kesha', '{"mode":"standard"}') ORDER BY id """ qt_man_pat_2_match_or_ids """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id FROM ${mandyTable} WHERE title match "Mandy" OR content match "Kesha" ORDER BY id """ qt_man_pat_3_search_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE search('title:Mandy AND category:biography', '{"mode":"standard"}') """ qt_man_pat_3_match_and """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE title match "Mandy" AND category match "biography" """ qt_man_pat_4_search_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE search('NOT content:Kesha', '{"mode":"standard"}') """ qt_man_pat_4_match_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE NOT content match "Kesha" """ qt_man_pat_5_search_nested """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE search('(title:Mandy OR content:Kesha) AND category:music', '{"mode":"standard"}') """ qt_man_pat_5_match_nested """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${mandyTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${mandyTable} WHERE (title match "Mandy" OR content match "Kesha") AND category match "music" """ @@ -405,69 +405,69 @@ suite("test_search_vs_match_consistency", "p0") { Thread.sleep(10000) qt_fred_1_search """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('title:Fred OR NOT content:ANY("Rahul Gandhi")', '{"mode":"standard"}') """ qt_fred_1_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE title match "Fred" OR NOT (content match_any "Rahul Gandhi") """ qt_fred_1_search_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${fredTable} WHERE search('title:Fred OR NOT content:ANY("Rahul Gandhi")', '{"mode":"standard"}') ORDER BY id """ qt_fred_1_match_rows """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id, title, content FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ id, title, content FROM ${fredTable} WHERE title match "Fred" OR NOT (content match_any "Rahul Gandhi") ORDER BY id """ qt_fred_2_title_only """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('title:Fred', '{"mode":"standard"}') """ qt_fred_2_content_any """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('content:ANY("Rahul Gandhi")', '{"mode":"standard"}') """ qt_fred_2_not_content """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('NOT content:ANY("Rahul Gandhi")', '{"mode":"standard"}') """ qt_fred_3_or_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('title:Fred OR NOT title:Random', '{"mode":"standard"}') """ qt_fred_3_or_not_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE title match "Fred" OR NOT title match "Random" """ qt_fred_4_and_not """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('title:Fred AND NOT content:ANY("Rahul Gandhi")', '{"mode":"standard"}') """ qt_fred_4_and_not_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE title match "Fred" AND NOT (content match_any "Rahul Gandhi") """ qt_fred_5_nested """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE search('(title:Fred OR title:John) OR NOT (content:ANY("Rahul Gandhi") OR content:ANY("politics"))', '{"mode":"standard"}') """ qt_fred_5_nested_match """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ count(*) FROM ${fredTable} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true) */ count(*) FROM ${fredTable} WHERE (title match "Fred" OR title match "John") OR NOT (content match_any "Rahul Gandhi" OR content match_any "politics") """ diff --git a/regression-test/suites/variant_doc_mode_p2/load.groovy b/regression-test/suites/variant_doc_mode_p2/load.groovy index e9a926f380e12d..8c26467efc3ad9 100644 --- a/regression-test/suites/variant_doc_mode_p2/load.groovy +++ b/regression-test/suites/variant_doc_mode_p2/load.groovy @@ -91,7 +91,7 @@ suite("test_doc_value_p2", "nonConcurrent,p2"){ -- INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "deprecated_variant_enable_flatten_nested" = "false", "inverted_index_storage_format"= "v2"); """ // 2015 @@ -123,7 +123,7 @@ suite("test_doc_value_p2", "nonConcurrent,p2"){ exception "The idx_var index can not be built on the v column, because it is a variant type column" } } - + // // add bloom filter at the end of loading data @@ -132,7 +132,7 @@ suite("test_doc_value_p2", "nonConcurrent,p2"){ trigger_and_wait_compaction("github_events", "full") sql """set enable_match_without_inverted_index = false""" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // filter by bloom filter qt_sql """select cast(v["payload"]["pull_request"]["additions"] as int) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1;""" @@ -145,7 +145,7 @@ suite("test_doc_value_p2", "nonConcurrent,p2"){ qt_sql """select * from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10""" sql """select * from github_events order by k limit 10""" - + sql "DROP TABLE IF EXISTS github_events2" sql """ CREATE TABLE IF NOT EXISTS github_events2 ( @@ -153,7 +153,7 @@ suite("test_doc_value_p2", "nonConcurrent,p2"){ v variant not null ) UNIQUE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "false", "deprecated_variant_enable_flatten_nested" = "false", "bloom_filter_columns" = "v"); """ sql """insert into github_events2 select * from github_events order by k""" diff --git a/regression-test/suites/variant_github_events_new_p2/load.groovy b/regression-test/suites/variant_github_events_new_p2/load.groovy index 5fd5a120d8f4f5..c3ded51897c4c7 100644 --- a/regression-test/suites/variant_github_events_new_p2/load.groovy +++ b/regression-test/suites/variant_github_events_new_p2/load.groovy @@ -22,8 +22,8 @@ suite("regression_test_variant_github_events_p2", "p2"){ table "${table_name}" // set http request header params - set 'read_json_by_line', 'true' - set 'format', 'json' + set 'read_json_by_line', 'true' + set 'format', 'json' set 'max_filter_ratio', '0.1' set 'memtable_on_sink_node', 'true' file file_name // import json file @@ -55,7 +55,7 @@ suite("regression_test_variant_github_events_p2", "p2"){ INDEX idx_var(v) USING INVERTED COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "false"); """ @@ -67,7 +67,7 @@ suite("regression_test_variant_github_events_p2", "p2"){ INDEX idx_var(v) USING INVERTED COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "false"); """ // 2015 @@ -90,11 +90,11 @@ suite("regression_test_variant_github_events_p2", "p2"){ // test array index sql """insert into github_events_arr select k, cast(v['payload']['pull_request']['head']['repo']['topics'] as array) from github_events""" - sql "set enable_common_expr_pushdown = true; " + sql "set enable_segment_limit_pushdown = true; " qt_sql """select count() from github_events_arr where array_contains(v, 'css');""" - sql "set enable_common_expr_pushdown = false; " + sql "set enable_segment_limit_pushdown = false; " qt_sql """select count() from github_events_arr where array_contains(v, 'css');""" - sql "set enable_common_expr_pushdown = true; " + sql "set enable_segment_limit_pushdown = true; " // TODO fix compaction issue, this case could be stable qt_sql """select cast(v["payload"]["pull_request"]["additions"] as int) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1;""" @@ -115,7 +115,7 @@ suite("regression_test_variant_github_events_p2", "p2"){ insert into github_events_2 select 1, cast(v["repo"]["name"] as string) FROM github_events; """ // insert batches of nulls - for(int t = 0; t <= 10; t += 1){ + for(int t = 0; t <= 10; t += 1){ long k = 9223372036854775107 + t sql """INSERT INTO github_events VALUES (${k}, NULL)""" } @@ -138,7 +138,7 @@ suite("regression_test_variant_github_events_p2", "p2"){ } } sql """ALTER TABLE github_events ADD COLUMN v2 variant DEFAULT NULL""" - for(int t = 0; t <= 10; t += 1){ + for(int t = 0; t <= 10; t += 1){ long k = 9223372036854775107 + t sql """INSERT INTO github_events VALUES (${k}, '{"aaaa" : 1234, "bbbb" : "11ssss"}', '{"xxxx" : 1234, "yyyy" : [1.111]}')""" } @@ -152,8 +152,7 @@ suite("regression_test_variant_github_events_p2", "p2"){ // query and filterd by inverted index if (!enable_typed_paths_to_sparse) { profile("test_profile_1") { - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_pipeline_x_engine = true;""" sql """ set enable_profile = true;""" sql """ set profile_level = 2;""" @@ -173,11 +172,10 @@ suite("regression_test_variant_github_events_p2", "p2"){ } // Assert that the sum of all matched numbers equals 67677 assertEquals(67677, total) - } + } } } - - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + + sql """ set enable_segment_limit_pushdown = true; """ qt_sql_inv """select count() from github_events where arrays_overlap(cast(v['payload']['pull_request']['head']['repo']['topics'] as array), ['javascript', 'css'] )""" } diff --git a/regression-test/suites/variant_github_events_nonConcurrent_p2/load.groovy b/regression-test/suites/variant_github_events_nonConcurrent_p2/load.groovy index 0bf08c0633ced4..64f9d0e351de99 100644 --- a/regression-test/suites/variant_github_events_nonConcurrent_p2/load.groovy +++ b/regression-test/suites/variant_github_events_nonConcurrent_p2/load.groovy @@ -84,7 +84,7 @@ suite("regression_test_variant_github_events_p2", "nonConcurrent,p2"){ -- INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "true", "deprecated_variant_enable_flatten_nested" = "true", "inverted_index_storage_format"= "v2"); """ // 2015 @@ -116,7 +116,7 @@ suite("regression_test_variant_github_events_p2", "nonConcurrent,p2"){ exception "The idx_var index can not be built on the v column, because it is a variant type column" } } - + // // add bloom filter at the end of loading data @@ -125,7 +125,7 @@ suite("regression_test_variant_github_events_p2", "nonConcurrent,p2"){ trigger_and_wait_compaction("github_events", "full", 1800) sql """set enable_match_without_inverted_index = false""" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ // filter by bloom filter qt_sql """select cast(v["payload"]["pull_request"]["additions"] as int) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1;""" @@ -146,7 +146,7 @@ suite("regression_test_variant_github_events_p2", "nonConcurrent,p2"){ v variant not null ) UNIQUE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "false", "deprecated_variant_enable_flatten_nested" = "true", "bloom_filter_columns" = "v"); """ sql """insert into github_events2 select * from github_events order by k""" diff --git a/regression-test/suites/variant_p0/doc_mode/load.groovy b/regression-test/suites/variant_p0/doc_mode/load.groovy index 896ee0d8efeac3..0c68036277f98c 100644 --- a/regression-test/suites/variant_p0/doc_mode/load.groovy +++ b/regression-test/suites/variant_p0/doc_mode/load.groovy @@ -25,8 +25,8 @@ suite("regression_test_variant_doc_value", "p0"){ table "${table_name}" // set http request header params - set 'read_json_by_line', 'true' - set 'format', 'json' + set 'read_json_by_line', 'true' + set 'format', 'json' set 'max_filter_ratio', '0.1' set 'memtable_on_sink_node', 'true' file file_name // import json file @@ -103,10 +103,10 @@ suite("regression_test_variant_doc_value", "p0"){ qt_sql4 "select v['b'], v['b']['c'] from ${table_name} where cast(v['b'] as string) != 'null' and cast(v['b'] as string) is not null and cast(v['b'] as string) != '{}' order by k,cast(v as string) desc limit 10000;" qt_sql5 "select v['b'] from ${table_name} where cast(v['b'] as int) > 0;" qt_sql6 "select cast(v['b'] as string) from ${table_name} where cast(v['b'] as string) != 'null' and cast(v['b'] as string) is not null and cast(v['b'] as string) != '{}' order by k, cast(v['b'] as string) " - // verify table_name + // verify table_name } sql "insert into simple_variant_DUPLICATE select k, cast(v as string) from simple_variant_UNIQUE;" - + // 2. type confilct cases def table_name = "type_conflict_resolution" create_table table_name @@ -184,7 +184,7 @@ suite("regression_test_variant_doc_value", "p0"){ ) DUPLICATE KEY(`k`) - DISTRIBUTED BY RANDOM BUCKETS 5 + DISTRIBUTED BY RANDOM BUCKETS 5 properties("replication_num" = "1", "disable_auto_compaction" = "false"); """ sql """insert into ${table_name} values (1, '{"A" : 123}', '{"B" : 123}', '{"C" : 456}');""" @@ -232,7 +232,7 @@ suite("regression_test_variant_doc_value", "p0"){ qt_sql_29_1 """select * from alter_variant where length(cast(v2 as string)) > 2 and cast(v2 as string) != 'null' order by k, cast(v as string), cast(v2 as string);""" verify table_name - // 11. boolean values + // 11. boolean values table_name = "boolean_values" create_table table_name sql """INSERT INTO ${table_name} VALUES (1, ''), (2, '{"k1": true, "k2": false}'), (3, '{}'), (4, '{"k1": false}');""" @@ -294,7 +294,7 @@ suite("regression_test_variant_doc_value", "p0"){ sql """insert into ${table_name} values (5, '{"i" : 1}'), (1, '{"a" : 1}')""" sql """insert into ${table_name} values (6, '{"j" : 1}'), (1, '{"a" : 1}')""" sql """insert into ${table_name} values (6, '{"k" : 1}'), (1, '{"a" : 1}')""" - sql "select /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=4,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=16,parallel_scan_min_rows_per_scanner=128,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=2,enable_parallel_result_sink=false,sort_phase_num=0,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=2,enable_function_pushdown=true,enable_common_expr_pushdown=true,enable_local_exchange=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,enable_common_expr_pushdown_for_inverted_index=false,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ * from ${table_name}" + sql "select /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=4,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=16,parallel_scan_min_rows_per_scanner=128,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=2,enable_parallel_result_sink=false,sort_phase_num=0,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=2,enable_function_pushdown=true,enable_segment_limit_pushdown=true,enable_local_exchange=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ * from ${table_name}" qt_sql_36_1 "select cast(v['a'] as int), cast(v['b'] as int), cast(v['c'] as int) from ${table_name} order by k limit 10" sql "DELETE FROM ${table_name} WHERE k=1" sql "select * from ${table_name}" @@ -311,22 +311,22 @@ suite("regression_test_variant_doc_value", "p0"){ // table_name = "invalid_variant" // set_be_config.call("max_filter_ratio_for_variant_parsing", "1") // create_table.call(table_name, "DUPLICATE", "4") - // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" - // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" // set_be_config.call("max_filter_ratio_for_variant_parsing", "0.05") - // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" - // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" // sql "select * from ${table_name}" // test all sparse columns table_name = "all_sparse_columns" create_table.call(table_name, "DUPLICATE", "1") - sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "1"}')""" - sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "2"}')""" + sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "1"}')""" + sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "2"}')""" qt_sql_37 "select * from ${table_name} order by k, cast(v as string)" // test mow with delete - table_name = "variant_mow" + table_name = "variant_mow" sql """ CREATE TABLE IF NOT EXISTS ${table_name} ( k bigint, @@ -334,7 +334,7 @@ suite("regression_test_variant_doc_value", "p0"){ v variant ) UNIQUE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "false", "enable_unique_key_merge_on_write" = "true"); """ sql """insert into ${table_name} values (1, "abc", '{"a" : 1}'), (1, "cde", '{"b" : 1}')""" @@ -350,14 +350,14 @@ suite("regression_test_variant_doc_value", "p0"){ sql "truncate table sparse_columns" // test cast - table_name = "variant_cast" + table_name = "variant_cast" create_table.call(table_name, "DUPLICATE", "1") sql """ insert into variant_cast values(1,'["CXO0N: 1045901740", "HMkTa: 1348450505", "44 HHD: 915015173", "j9WoJ: -1517316688"]'),(2,'"[1]"'),(3,'123456'),(4,'1.11111') """ - qt_sql_39 "select k, json_type(cast(v as json), '\$') from variant_cast order by k" - qt_sql_39 "select cast(v as array) from variant_cast where k = 1 order by k" - qt_sql_39 "select cast(v as string) from variant_cast where k = 2 order by k" + qt_sql_39 "select k, json_type(cast(v as json), '\$') from variant_cast order by k" + qt_sql_39 "select cast(v as array) from variant_cast where k = 1 order by k" + qt_sql_39 "select cast(v as string) from variant_cast where k = 2 order by k" sql "DROP TABLE IF EXISTS records" sql """ @@ -426,7 +426,7 @@ suite("regression_test_variant_doc_value", "p0"){ PROPERTIES ( "replication_allocation" = "tag.location.default: 1" ); - """ + """ exception("errCode = 2, detailMessage = Variant type should not be used in key") } sql "DROP TABLE IF EXISTS var_as_key" diff --git a/regression-test/suites/variant_p0/doc_mode/predefine/test_prdefine_insert_into_select.groovy b/regression-test/suites/variant_p0/doc_mode/predefine/test_prdefine_insert_into_select.groovy index eb51cc9f1367d1..b3434030ef11eb 100644 --- a/regression-test/suites/variant_p0/doc_mode/predefine/test_prdefine_insert_into_select.groovy +++ b/regression-test/suites/variant_p0/doc_mode/predefine/test_prdefine_insert_into_select.groovy @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -suite("predefine_insert_into_select_doc_mode", "p0"){ +suite("predefine_insert_into_select_doc_mode", "p0"){ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = true """ @@ -49,7 +49,7 @@ suite("predefine_insert_into_select_doc_mode", "p0"){ ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true")""" sql """insert into toTable_without_define values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}');""" - + sql """ insert into toTable_without_define select id, cast(var as string) from fromTable""" boolean findException = false try { @@ -59,7 +59,7 @@ suite("predefine_insert_into_select_doc_mode", "p0"){ findException = true } assertTrue(findException) - + order_qt_sql """ select * from toTable_without_define""" sql "DROP TABLE IF EXISTS toTable_with_define" @@ -73,7 +73,7 @@ suite("predefine_insert_into_select_doc_mode", "p0"){ ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true")""" sql """insert into toTable_with_define values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}');""" - + sql """ insert into toTable_with_define select id, cast(var as string) from fromTable""" findException = false @@ -84,7 +84,7 @@ suite("predefine_insert_into_select_doc_mode", "p0"){ findException = true } assertTrue(findException) - + order_qt_sql """ select * from toTable_with_define""" sql "DROP TABLE IF EXISTS toTable" @@ -101,6 +101,6 @@ suite("predefine_insert_into_select_doc_mode", "p0"){ } else { sql """ set enable_match_without_inverted_index = true """ } - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ order_qt_sql """ select count() from toTable where cast (var['d'] as string) match '123' """ } diff --git a/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_pattern.groovy b/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_pattern.groovy index 6d1cdfaa3a49b5..167011b224de97 100644 --- a/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_pattern.groovy +++ b/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_pattern.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("variant_predefine_base_doc_value", "p0"){ +suite("variant_predefine_base_doc_value", "p0"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ def count = new Random().nextInt(5) @@ -52,7 +52,7 @@ suite("variant_predefine_base_doc_value", "p0"){ qt_sql """ select count() from ${tableName} where cast(var['b?b'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['bb3'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['bxx'] as string) match '789' """ - + trigger_and_wait_compaction(tableName, "full") @@ -93,7 +93,7 @@ suite("variant_predefine_base_doc_value", "p0"){ qt_sql """ select count() from ${tableName} where cast(var['a']['b1'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['bxc'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['c2323'] as string) match '789' """ - + trigger_and_wait_compaction(tableName, "full") qt_sql """select * from ${tableName} order by id""" @@ -102,5 +102,5 @@ qt_sql """ select count() from ${tableName} where cast(var['a']['c2323'] as stri qt_sql """ select count() from ${tableName} where cast(var['a']['b1'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['bxc'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['c2323'] as string) match '789' """ - + } diff --git a/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_schema_change.groovy b/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_schema_change.groovy index a2011a7239b678..02eee2d2563c75 100644 --- a/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_schema_change.groovy +++ b/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_schema_change.groovy @@ -47,12 +47,12 @@ suite("predefine_schema_change_doc_value", "p0"){ } else { sql """ set enable_match_without_inverted_index = true """ } - - sql """ set enable_common_expr_pushdown = true """ + + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${tableName} where cast (var['d'] as string) match '123' """ qt_sql """ select * from ${tableName} """ qt_sql """ select variant_type(var) from ${tableName} """ - + sql """ alter table ${tableName} modify column col1 varchar(200) NULL """ waitForSchemaChangeDone { diff --git a/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_type_index.groovy b/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_type_index.groovy index 3d13529ea27b2f..8087fb0442e2e8 100644 --- a/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_type_index.groovy +++ b/regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_type_index.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("variant_predefine_index_doc_value", "p0"){ +suite("variant_predefine_index_doc_value", "p0"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = true """ sql """ set default_variant_doc_materialization_min_rows = 0 """ @@ -43,12 +43,12 @@ suite("variant_predefine_index_doc_value", "p0"){ (3, '{"path" : {"int" : 789, "decimal" : 789.789123456789, "string" : "hello"}}'), (4, '{"path" : {"int" : 100, "decimal" : 100.100123456789, "string" : "world"}}'), (5, '{"path" : {"int" : 111, "decimal" : 111.111111111111, "string" : "hello"}}')""" - + qt_sql """ select variant_type(var) from ${tableName} """ qt_sql """select * from ${tableName} order by id""" sql """ set profile_level = 2""" sql """ set inverted_index_skip_threshold = 0 """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_match_without_inverted_index = false """ qt_sql """ select count() from ${tableName} where cast(var['path']['int'] as int) = 789 """ qt_sql """ select count() from ${tableName} where cast(var['path']['decimal'] as DECIMAL(15, 12)) = 789.789123456789 """ @@ -93,22 +93,22 @@ suite("variant_predefine_index_doc_value", "p0"){ "group_commit_data_bytes" = "134217728", "disable_auto_compaction" = "true" ); - """ + """ for (int i = 0; i < 10; i++) { sql """ INSERT INTO objects (id, overflow_properties) - VALUES + VALUES (6, '{"color":"Bright Red","description":"A bright red circular object with a metallic shine","shape":"Large Circle","tags":["metallic","reflective"]}'), (7, '{"color":"Deep Blue","description":"Opaque square made of plastic in deep blue","shape":"Small Square","tags":["opaque","plastic"]}'), (8, '{"color":"Green","description":"Tall green triangle carved from wood","shape":"Tall Triangle","tags":["matte","wood"]}'), (9, '{"color":"Reddish Orange","description":"Glossy ceramic hexagon with reddish orange tint","shape":"Flat Hexagon","tags":["glossy","ceramic"]}'), - (10, '{"color":"Yellow","description":"Shiny yellow circular badge","shape":"Wide Circle","tags":["shiny","plastic"]}'); + (10, '{"color":"Yellow","description":"Shiny yellow circular badge","shape":"Wide Circle","tags":["shiny","plastic"]}'); """ } trigger_and_wait_compaction(tableName, "cumulative") sql "set enable_match_without_inverted_index = false" - qt_sql "select count() from objects where (overflow_properties['color'] MATCH_PHRASE 'Blue')" - qt_sql "select count() from objects where (array_contains(cast(overflow_properties['tags'] as array), 'plastic'))" + qt_sql "select count() from objects where (overflow_properties['color'] MATCH_PHRASE 'Blue')" + qt_sql "select count() from objects where (array_contains(cast(overflow_properties['tags'] as array), 'plastic'))" qt_sql "select cast(overflow_properties['color'] as string) from objects where overflow_properties['color'] IS NOT NULL and id = 6 limit 1" qt_sql "select overflow_properties['color'] from objects where overflow_properties['color'] IS NOT NULL and id = 6 limit 1" } \ No newline at end of file diff --git a/regression-test/suites/variant_p0/doc_mode/with_index/test_array_contains_with_inverted_index.groovy b/regression-test/suites/variant_p0/doc_mode/with_index/test_array_contains_with_inverted_index.groovy index db0f4ea9661218..f095fd8b5568cb 100644 --- a/regression-test/suites/variant_p0/doc_mode/with_index/test_array_contains_with_inverted_index.groovy +++ b/regression-test/suites/variant_p0/doc_mode/with_index/test_array_contains_with_inverted_index.groovy @@ -20,9 +20,8 @@ suite("array_contains_with_index_doc_value", "p0") { def indexTblName = "tai" setFeConfigTemporary([enable_inverted_index_v1_for_variant: true]) { - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_profile = true;""" sql "DROP TABLE IF EXISTS ${indexTblName}" @@ -66,7 +65,7 @@ suite("array_contains_with_index_doc_value", "p0") { sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', '0974e7a82e30d1af83205e474fadd0a2', '{"inventors":["w"]}'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', '26823b3995ee38bd145ddd910b2f6300', '{"inventors":["x"]}'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', 'ee27ee1da291e46403c408e220bed6e1', '{"inventors":["y"]}'); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTblName}""" def param_contains = ["'s'", "''", null] @@ -90,24 +89,24 @@ suite("array_contains_with_index_doc_value", "p0") { for (int i = 0 ; i < param.size(); ++i) { def p = param[i] log.info("param: ${p}") - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ } } } diff --git a/regression-test/suites/variant_p0/ext_meta/test_variant_external_meta_integration.groovy b/regression-test/suites/variant_p0/ext_meta/test_variant_external_meta_integration.groovy index ed492cf8e3205b..639d749c7f71fb 100644 --- a/regression-test/suites/variant_p0/ext_meta/test_variant_external_meta_integration.groovy +++ b/regression-test/suites/variant_p0/ext_meta/test_variant_external_meta_integration.groovy @@ -23,15 +23,15 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); backend_id = backendId_to_backendIP.keySet()[0] - def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), - backendId_to_backendHttpPort.get(backend_id), + def (code, out, err) = update_be_config(backendId_to_backendIP.get(backend_id), + backendId_to_backendHttpPort.get(backend_id), key, value) logger.info("update config: code=" + code + ", out=" + out + ", err=" + err) } sql "set enable_match_without_inverted_index = false" - sql "set enable_common_expr_pushdown_for_inverted_index = true" - sql "set enable_common_expr_pushdown = true" + sql "set enable_segment_limit_pushdown = true" + sql "set enable_segment_limit_pushdown = true" // Test 1: External meta with inverted index on extracted columns sql "DROP TABLE IF EXISTS test_inverted_index_extracted" @@ -45,19 +45,19 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "storage_format" = "V3"); """ - + sql """insert into test_inverted_index_extracted values (1, '{"name": "Alice Smith", "age": 25}')""" sql """insert into test_inverted_index_extracted values (2, '{"name": "Bob Johnson", "age": 30}')""" sql """insert into test_inverted_index_extracted values (3, '{"name": "Charlie Smith", "age": 35}')""" - + // Test inverted index on name field (should work with external meta) qt_inverted_1 "select k, v['name'] from test_inverted_index_extracted where v['name'] match 'Smith' order by k" qt_inverted_2 "select k, v['name'] from test_inverted_index_extracted where v['name'] match 'Alice' order by k" qt_inverted_3 "select k, v['age'] from test_inverted_index_extracted where cast(v['age'] as int) > 25 order by k" - + // After compaction, inverted index should still work trigger_and_wait_compaction("test_inverted_index_extracted", "full", 1800) - + qt_inverted_after_compact_1 "select k, v['name'] from test_inverted_index_extracted where v['name'] match 'Smith' order by k" qt_inverted_after_compact_2 "select count(*) from test_inverted_index_extracted where v['name'] match 'Johnson'" @@ -73,11 +73,11 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "storage_format" = "V3"); """ - + sql """insert into test_parent_index values (1, '{"title": "Hello World", "content": "This is a test"}')""" sql """insert into test_parent_index values (2, '{"title": "Test Document", "content": "Another test here"}')""" sql """insert into test_parent_index values (3, '{"title": "World News", "content": "Breaking news today"}')""" - + // Query with inherited inverted index qt_parent_idx_1 "select k, v['title'] from test_parent_index where v['title'] match 'World' order by k" qt_parent_idx_2 "select k, v['content'] from test_parent_index where v['content'] match 'test' order by k" @@ -95,19 +95,19 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "storage_format" = "V3"); """ - + sql """insert into test_multiple_variants values (1, '{"a": 1, "b": 2}', '{"x": 10, "y": 20}')""" sql """insert into test_multiple_variants values (2, '{"a": 100, "c": 300}', '{"x": 1000, "z": 3000}')""" sql """insert into test_multiple_variants values (3, '{"d": 4}', '{"w": 40}')""" - + // Both variant columns should use external meta independently qt_multi_var_1 "select k, v1['a'], v2['x'] from test_multiple_variants order by k" qt_multi_var_2 "select k, v1['b'] from test_multiple_variants where cast(v1['b'] as int) is not null order by k" qt_multi_var_3 "select k, v2['y'] from test_multiple_variants where cast(v2['y'] as int) is not null order by k" qt_multi_var_4 "select k, v1['d'], v2['w'] from test_multiple_variants where cast(v1['d'] as int) is not null order by k" - + trigger_and_wait_compaction("test_multiple_variants", "full", 1800) - + qt_multi_var_after_compact_1 "select k, v1['a'], v2['x'] from test_multiple_variants order by k" qt_multi_var_after_compact_2 "select count(*) from test_multiple_variants" @@ -123,12 +123,12 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """insert into test_aggregation values (1, 'A', '{"value": 100, "count": 1}')""" sql """insert into test_aggregation values (2, 'A', '{"value": 200, "count": 2}')""" sql """insert into test_aggregation values (3, 'B', '{"value": 150, "count": 1}')""" sql """insert into test_aggregation values (4, 'B', '{"value": 250, "count": 3}')""" - + qt_agg_1 "select category, sum(cast(v['value'] as int)) from test_aggregation group by category order by category" qt_agg_2 "select category, avg(cast(v['count'] as double)) from test_aggregation group by category order by category" qt_agg_3 "select count(distinct category) from test_aggregation where cast(v['value'] as int) > 100" @@ -136,7 +136,7 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { // Test 5: External meta with JOIN operations sql "DROP TABLE IF EXISTS test_join_left" sql "DROP TABLE IF EXISTS test_join_right" - + sql """ CREATE TABLE test_join_left ( k bigint, @@ -146,7 +146,7 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """ CREATE TABLE test_join_right ( k bigint, @@ -156,24 +156,24 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """insert into test_join_left values (1, '{"name": "Alice", "dept_id": 10}')""" sql """insert into test_join_left values (2, '{"name": "Bob", "dept_id": 20}')""" sql """insert into test_join_left values (3, '{"name": "Charlie", "dept_id": 10}')""" - + sql """insert into test_join_right values (10, '{"dept_name": "Engineering", "location": "Building A"}')""" sql """insert into test_join_right values (20, '{"dept_name": "Sales", "location": "Building B"}')""" - + qt_join_1 """ select l.k, l.v['name'], r.v['dept_name'] - from test_join_left l + from test_join_left l join test_join_right r on cast(l.v['dept_id'] as int) = r.k order by l.k """ - + qt_join_2 """ - select count(*) - from test_join_left l + select count(*) + from test_join_left l join test_join_right r on cast(l.v['dept_id'] as int) = r.k where r.v['location'] = 'Building A' """ @@ -181,7 +181,7 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { // Test 6: External meta with UNION operations sql "DROP TABLE IF EXISTS test_union_1" sql "DROP TABLE IF EXISTS test_union_2" - + sql """ CREATE TABLE test_union_1 ( k bigint, @@ -191,7 +191,7 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """ CREATE TABLE test_union_2 ( k bigint, @@ -201,22 +201,22 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """insert into test_union_1 values (1, '{"source": "table1", "value": 100}')""" sql """insert into test_union_1 values (2, '{"source": "table1", "value": 200}')""" - + sql """insert into test_union_2 values (3, '{"source": "table2", "value": 150}')""" sql """insert into test_union_2 values (4, '{"source": "table2", "value": 250}')""" - + qt_union_1 """ select k, v['source'], v['value'] from test_union_1 union all select k, v['source'], v['value'] from test_union_2 order by k """ - + qt_union_2 """ - select cast(v['source'] as string) as src, count(*) + select cast(v['source'] as string) as src, count(*) from ( select v from test_union_1 union all @@ -237,18 +237,18 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + for (int i = 1; i <= 10; i++) { sql """insert into test_subquery values (${i}, '{"score": ${i * 10}, "grade": "${i > 5 ? 'A' : 'B'}"}')""" } - + qt_subquery_1 """ select k, v['score'], v['grade'] from test_subquery where cast(v['score'] as int) > (select avg(cast(v['score'] as int)) from test_subquery) order by k """ - + qt_subquery_2 """ select cast(v['grade'] as string) as grade, count(*) as cnt from test_subquery @@ -269,13 +269,13 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """insert into test_having values (1, 'A', '{"amount": 100}')""" sql """insert into test_having values (2, 'A', '{"amount": 200}')""" sql """insert into test_having values (3, 'A', '{"amount": 300}')""" sql """insert into test_having values (4, 'B', '{"amount": 50}')""" sql """insert into test_having values (5, 'B', '{"amount": 60}')""" - + qt_having_1 """ select category, sum(cast(v['amount'] as int)) as total from test_having @@ -295,18 +295,18 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + for (int i = 1; i <= 20; i++) { sql """insert into test_order_limit values (${i}, '{"priority": ${20 - i}, "name": "item_${i}"}')""" } - + qt_order_limit_1 """ select k, v['priority'], v['name'] from test_order_limit order by cast(v['priority'] as int) desc limit 5 """ - + qt_order_limit_2 """ select k, v['name'] from test_order_limit @@ -326,12 +326,12 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "false", "storage_format" = "V3"); """ - + sql """insert into test_distinct values (1, '{"category": "A", "value": 100}')""" sql """insert into test_distinct values (2, '{"category": "B", "value": 200}')""" sql """insert into test_distinct values (3, '{"category": "A", "value": 150}')""" sql """insert into test_distinct values (4, '{"category": "C", "value": 100}')""" - + qt_distinct_1 "select distinct cast(v['category'] as string) from test_distinct order by cast(v['category'] as string)" qt_distinct_2 "select distinct cast(v['value'] as int) from test_distinct order by cast(v['value'] as int)" qt_distinct_3 "select count(distinct cast(v['category'] as string)) from test_distinct" @@ -349,7 +349,7 @@ suite("test_variant_external_meta_integration", "nonConcurrent") { sql "DROP TABLE IF EXISTS test_having" sql "DROP TABLE IF EXISTS test_order_limit" sql "DROP TABLE IF EXISTS test_distinct" - + } diff --git a/regression-test/suites/variant_p0/load.groovy b/regression-test/suites/variant_p0/load.groovy index 0f88a264dc693f..6d5b9d27fb42ed 100644 --- a/regression-test/suites/variant_p0/load.groovy +++ b/regression-test/suites/variant_p0/load.groovy @@ -23,8 +23,8 @@ suite("regression_test_variant", "p0"){ table "${table_name}" // set http request header params - set 'read_json_by_line', 'true' - set 'format', 'json' + set 'read_json_by_line', 'true' + set 'format', 'json' set 'max_filter_ratio', '0.1' set 'memtable_on_sink_node', 'true' file file_name // import json file @@ -101,10 +101,10 @@ suite("regression_test_variant", "p0"){ qt_sql4 "select v['b'], v['b']['c'] from ${table_name} where cast(v['b'] as string) != 'null' and cast(v['b'] as string) is not null and cast(v['b'] as string) != '{}' order by k,cast(v as string) desc limit 10000;" qt_sql5 "select v['b'] from ${table_name} where cast(v['b'] as int) > 0;" qt_sql6 "select cast(v['b'] as string) from ${table_name} where cast(v['b'] as string) != 'null' and cast(v['b'] as string) is not null and cast(v['b'] as string) != '{}' order by k, cast(v['b'] as string) " - // verify table_name + // verify table_name } sql "insert into simple_variant_DUPLICATE select k, cast(v as string) from simple_variant_UNIQUE;" - + // 2. type confilct cases def table_name = "type_conflict_resolution" create_table table_name @@ -182,7 +182,7 @@ suite("regression_test_variant", "p0"){ ) DUPLICATE KEY(`k`) - DISTRIBUTED BY RANDOM BUCKETS 5 + DISTRIBUTED BY RANDOM BUCKETS 5 properties("replication_num" = "1", "disable_auto_compaction" = "false"); """ sql """insert into ${table_name} values (1, '{"A" : 123}', '{"B" : 123}', '{"C" : 456}');""" @@ -230,7 +230,7 @@ suite("regression_test_variant", "p0"){ qt_sql_29_1 """select * from alter_variant where length(cast(v2 as string)) > 2 and cast(v2 as string) != 'null' order by k, cast(v as string), cast(v2 as string);""" verify table_name - // 11. boolean values + // 11. boolean values table_name = "boolean_values" create_table table_name sql """INSERT INTO ${table_name} VALUES (1, ''), (2, '{"k1": true, "k2": false}'), (3, '{}'), (4, '{"k1": false}');""" @@ -292,7 +292,7 @@ suite("regression_test_variant", "p0"){ sql """insert into ${table_name} values (5, '{"i" : 1}'), (1, '{"a" : 1}')""" sql """insert into ${table_name} values (6, '{"j" : 1}'), (1, '{"a" : 1}')""" sql """insert into ${table_name} values (6, '{"k" : 1}'), (1, '{"a" : 1}')""" - sql "select /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=4,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=16,parallel_scan_min_rows_per_scanner=128,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=2,enable_parallel_result_sink=false,sort_phase_num=0,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=2,enable_function_pushdown=true,enable_common_expr_pushdown=true,enable_local_exchange=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,enable_common_expr_pushdown_for_inverted_index=false,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ * from ${table_name}" + sql "select /*+SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=4,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=true,parallel_scan_max_scanners_count=16,parallel_scan_min_rows_per_scanner=128,enable_fold_constant_by_be=true,enable_rewrite_element_at_to_slot=true,runtime_filter_type=2,enable_parallel_result_sink=false,sort_phase_num=0,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=2,enable_function_pushdown=true,enable_segment_limit_pushdown=true,enable_local_exchange=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ * from ${table_name}" qt_sql_36_1 "select cast(v['a'] as int), cast(v['b'] as int), cast(v['c'] as int) from ${table_name} order by k limit 10" sql "DELETE FROM ${table_name} WHERE k=1" sql "select * from ${table_name}" @@ -309,22 +309,22 @@ suite("regression_test_variant", "p0"){ // table_name = "invalid_variant" // set_be_config.call("max_filter_ratio_for_variant_parsing", "1") // create_table.call(table_name, "DUPLICATE", "4") - // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" - // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" // set_be_config.call("max_filter_ratio_for_variant_parsing", "0.05") - // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" - // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a" 1}')""" + // sql """insert into ${table_name} values (1, '{"a" 1}'), (1, '{"a" 1}')""" // sql "select * from ${table_name}" // test all sparse columns table_name = "all_sparse_columns" create_table.call(table_name, "DUPLICATE", "1") - sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "1"}')""" - sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "2"}')""" + sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "1"}')""" + sql """insert into ${table_name} values (1, '{"a" : 1}'), (1, '{"a": "2"}')""" qt_sql_37 "select * from ${table_name} order by k, cast(v as string)" // test mow with delete - table_name = "variant_mow" + table_name = "variant_mow" sql """ CREATE TABLE IF NOT EXISTS ${table_name} ( k bigint, @@ -332,7 +332,7 @@ suite("regression_test_variant", "p0"){ v variant ) UNIQUE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "false", "enable_unique_key_merge_on_write" = "true"); """ sql """insert into ${table_name} values (1, "abc", '{"a" : 1}'), (1, "cde", '{"b" : 1}')""" @@ -348,14 +348,14 @@ suite("regression_test_variant", "p0"){ sql "truncate table sparse_columns" // test cast - table_name = "variant_cast" + table_name = "variant_cast" create_table.call(table_name, "DUPLICATE", "1") sql """ insert into variant_cast values(1,'["CXO0N: 1045901740", "HMkTa: 1348450505", "44 HHD: 915015173", "j9WoJ: -1517316688"]'),(2,'"[1]"'),(3,'123456'),(4,'1.11111') """ - qt_sql_39 "select k, json_type(cast(v as json), '\$') from variant_cast order by k" - qt_sql_39 "select cast(v as array) from variant_cast where k = 1 order by k" - qt_sql_39 "select cast(v as string) from variant_cast where k = 2 order by k" + qt_sql_39 "select k, json_type(cast(v as json), '\$') from variant_cast order by k" + qt_sql_39 "select cast(v as array) from variant_cast where k = 1 order by k" + qt_sql_39 "select cast(v as string) from variant_cast where k = 2 order by k" sql "DROP TABLE IF EXISTS records" sql """ @@ -424,7 +424,7 @@ suite("regression_test_variant", "p0"){ PROPERTIES ( "replication_allocation" = "tag.location.default: 1" ); - """ + """ exception("errCode = 2, detailMessage = Variant type should not be used in key") } sql "DROP TABLE IF EXISTS var_as_key" diff --git a/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse.groovy b/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse.groovy index 9e64ab753d87d8..ea843f65f76c06 100644 --- a/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse.groovy +++ b/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse.groovy @@ -14,8 +14,8 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -suite("predefined_typed_to_sparse", "p0"){ - sql """ set enable_common_expr_pushdown = true """ +suite("predefined_typed_to_sparse", "p0"){ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_doc_mode = false """ sql """ set enable_variant_schema_auto_cast = false """ def count = new Random().nextInt(10) + 1 @@ -57,9 +57,9 @@ suite("predefined_typed_to_sparse", "p0"){ `var` variant < 'array_decimal_*':array, 'array_ipv6_*':array, - 'int_*':int, - 'string_*':string, - 'decimal_*':decimalv3(26,9), + 'int_*':int, + 'string_*':string, + 'decimal_*':decimalv3(26,9), 'datetime_*':datetime, 'datetimev2_*':datetimev2(6), 'date_*':date, @@ -120,7 +120,7 @@ suite("predefined_typed_to_sparse", "p0"){ "largeint_1": "12345678901234567890123456789012345678", "char_1": "short text" }' - ); + ); """ for (int i = 1; i < 10; i++) { load_json_data.call(tableName, getS3Url() + "/regression/variant/schema_tmpt${i}.json") @@ -139,9 +139,9 @@ suite("predefined_typed_to_sparse", "p0"){ `var` variant < 'array_decimal_*':array, 'array_ipv6_*':array, - 'int_*':int, - 'string_*':string, - 'decimal_*':decimalv3(26,9), + 'int_*':int, + 'string_*':string, + 'decimal_*':decimalv3(26,9), 'datetime_*':datetime, 'datetimev2_*':datetimev2(6), 'date_*':date, @@ -169,7 +169,7 @@ suite("predefined_typed_to_sparse", "p0"){ INDEX idx_a_m (var) USING INVERTED PROPERTIES("field_pattern"="largeint_*") COMMENT '', INDEX idx_a_n (var) USING INVERTED PROPERTIES("field_pattern"="char_*") COMMENT '' ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true") - """ + """ for (int i = 1; i < 10; i++) { sql """ @@ -202,7 +202,7 @@ suite("predefined_typed_to_sparse", "p0"){ "largeint_1": "12345678901234567890123456789012345678", "char_1": "short text" }' - ); + ); """ } diff --git a/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse_1shard.groovy b/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse_1shard.groovy index 046fa77cf6ecf2..382d7e78f2d944 100644 --- a/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse_1shard.groovy +++ b/regression-test/suites/variant_p0/predefine/predefined_typed_to_sparse_1shard.groovy @@ -14,8 +14,8 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -suite("test_predefine_typed_to_sparse_1shard", "p0"){ - sql """ set enable_common_expr_pushdown = true """ +suite("test_predefine_typed_to_sparse_1shard", "p0"){ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_doc_mode = false """ sql """ set enable_variant_schema_auto_cast = false """ @@ -57,9 +57,9 @@ suite("test_predefine_typed_to_sparse_1shard", "p0"){ `var` variant < 'array_decimal_*':array, 'array_ipv6_*':array, - 'int_*':int, - 'string_*':string, - 'decimal_*':decimalv3(26,9), + 'int_*':int, + 'string_*':string, + 'decimal_*':decimalv3(26,9), 'datetime_*':datetime, 'datetimev2_*':datetimev2(6), 'date_*':date, @@ -87,7 +87,7 @@ suite("test_predefine_typed_to_sparse_1shard", "p0"){ INDEX idx_a_m (var) USING INVERTED PROPERTIES("field_pattern"="largeint_*") COMMENT '', INDEX idx_a_n (var) USING INVERTED PROPERTIES("field_pattern"="char_*") COMMENT '' ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true") - """ + """ for (int i = 1; i < 10; i++) { sql """ @@ -120,7 +120,7 @@ suite("test_predefine_typed_to_sparse_1shard", "p0"){ "largeint_1": "12345678901234567890123456789012345678", "char_1": "short text" }' - ); + ); """ } diff --git a/regression-test/suites/variant_p0/predefine/test_custom_analyzer.groovy b/regression-test/suites/variant_p0/predefine/test_custom_analyzer.groovy index 94987795c10af3..a38a3cd755af66 100644 --- a/regression-test/suites/variant_p0/predefine/test_custom_analyzer.groovy +++ b/regression-test/suites/variant_p0/predefine/test_custom_analyzer.groovy @@ -58,7 +58,7 @@ suite("test_variant_custom_analyzer", "p0") { sql """ CREATE INVERTED INDEX ANALYZER IF NOT EXISTS lowercase_delimited PROPERTIES - ( + ( "tokenizer" = "standard", "token_filter" = "asciifolding, word_splitter, lowercase" ); @@ -84,7 +84,7 @@ suite("test_variant_custom_analyzer", "p0") { qt_tokenize_sql """ select tokenize("clayfighter 63⅓", '"analyzer"="lowercase_delimited"'); """ qt_tokenize_sql """ select tokenize("β-carbon nitride", '"analyzer"="lowercase_delimited"'); """ qt_tokenize_sql """ select tokenize("ǁŨǁe language", '"analyzer"="lowercase_delimited"'); """ - + sql "DROP TABLE IF EXISTS ${indexTbName1}" sql """ CREATE TABLE ${indexTbName1} ( @@ -109,7 +109,7 @@ suite("test_variant_custom_analyzer", "p0") { try { trigger_and_wait_compaction(indexTbName1, "full", 1800) sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select a, ch['ch'] from ${indexTbName1} where ch['ch'] match 'abcDEF'; """ qt_sql """ select a, ch['ch'] from ${indexTbName1} where ch['ch'] match '中'; """ @@ -135,7 +135,7 @@ suite("test_variant_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select a, ch['ch'] from ${indexTbName2} where ch['ch'] match '102'; """ } finally { @@ -159,7 +159,7 @@ suite("test_variant_custom_analyzer", "p0") { try { sql "sync" - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ qt_sql """ select a, ch['ch'] from ${indexTbName3} where ch['ch'] match '1080º avalanche'; """ } finally { diff --git a/regression-test/suites/variant_p0/predefine/test_multi_index_file.groovy b/regression-test/suites/variant_p0/predefine/test_multi_index_file.groovy index c3caf57e3a9cb2..0af894d0431b9d 100644 --- a/regression-test/suites/variant_p0/predefine/test_multi_index_file.groovy +++ b/regression-test/suites/variant_p0/predefine/test_multi_index_file.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("test_variant_multi_index_file", "p0, nonConcurrent"){ +suite("test_variant_multi_index_file", "p0, nonConcurrent"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql "set default_variant_max_subcolumns_count = 100" sql """ set default_variant_doc_materialization_min_rows = 0 """ diff --git a/regression-test/suites/variant_p0/predefine/test_multi_index_nonCurrent.groovy b/regression-test/suites/variant_p0/predefine/test_multi_index_nonCurrent.groovy index 125e1040b0dee5..c9ac7313a2bacc 100644 --- a/regression-test/suites/variant_p0/predefine/test_multi_index_nonCurrent.groovy +++ b/regression-test/suites/variant_p0/predefine/test_multi_index_nonCurrent.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { +suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -48,9 +48,9 @@ suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { sql """insert into ${tableName} values(1, '{"string" : "hello", "array_string" : ["hello"]}'), (2, '{"string" : "world", "array_string" : ["world"]}'), (3, '{"string" : "hello", "array_string" : ["hello"]}'), (4, '{"string" : "world", "array_string" : ["world"]}'), (5, '{"string" : "hello", "array_string" : ["hello"]}') """ // insert into test_variant_multi_index_nonCurrent values(1, '{"string" : "hello", "array_string" : ["hello"]}'), (2, '{"string" : "world", "array_string" : ["world"]}'), (3, '{"string" : "hello", "array_string" : ["hello"]}'), (4, '{"string" : "world", "array_string" : ["world"]}'), (5, '{"string" : "hello", "array_string" : ["hello"]}') sql """ set inverted_index_skip_threshold = 0 """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_match_without_inverted_index = false """ - + queryAndCheck("select count() from ${tableName} where var['string'] match_phrase 'hello'", 2) queryAndCheck("select count() from ${tableName} where var['string'] = 'hello'", 2) queryAndCheck("select count() from ${tableName} where var['string'] in ('hello', 'world')", 0) @@ -125,9 +125,9 @@ suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { (5, '{"string1" : "hello", "array_string" : ["hello"], "string2" : "hello"}') """ sql """ set inverted_index_skip_threshold = 0 """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_match_without_inverted_index = false """ - + queryAndCheck("select count() from ${tableName} where var['string1'] match_phrase 'hello'", 2) queryAndCheck("select count() from ${tableName} where var['string1'] = 'hello'", 2) queryAndCheck("select count() from ${tableName} where var['string1'] in ('hello', 'world')", 0) @@ -221,9 +221,9 @@ suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { `var` variant < 'array_decimal_*':array, 'array_ipv6_*':array, - 'int_*':int, - 'string_*':string, - 'decimal_*':decimalv3(26,9), + 'int_*':int, + 'string_*':string, + 'decimal_*':decimalv3(26,9), 'datetime_*':datetime, 'datetimev2_*':datetimev2(6), 'date_*':date, @@ -280,7 +280,7 @@ suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { "largeint_1": "12345678901234567890123456789012345678", "char_1": "short text" }' - ); + ); """ queryAndCheck("select count() from ${tableName} where array_contains(cast(var['array_decimal_1'] as array), 12345678901234567.123456789)", 0) @@ -343,7 +343,7 @@ suite("test_variant_multi_index_nonCurrent", "p0, nonConcurrent") { queryAndCheck("select count() from ${tableName} where var['char_1'] match_all 'short text'", 0) queryAndCheck("select count() from ${tableName} where var['char_1'] match_all 'short texts'", 1) - + findException = false try { sql """ select count() from ${tableName} where var['char_1'] match_phrase 'short text' """ diff --git a/regression-test/suites/variant_p0/predefine/test_prdefine_insert_into_select.groovy b/regression-test/suites/variant_p0/predefine/test_prdefine_insert_into_select.groovy index 216ae377a48f86..782b74c0163279 100644 --- a/regression-test/suites/variant_p0/predefine/test_prdefine_insert_into_select.groovy +++ b/regression-test/suites/variant_p0/predefine/test_prdefine_insert_into_select.groovy @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -suite("test_predefine_insert_into_select", "p0"){ +suite("test_predefine_insert_into_select", "p0"){ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -43,7 +43,7 @@ suite("test_predefine_insert_into_select", "p0"){ ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true")""" sql """insert into toTable_without_define values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}');""" - + sql """ insert into toTable_without_define select id, cast(var as string) from fromTable""" boolean findException = false try { @@ -53,7 +53,7 @@ suite("test_predefine_insert_into_select", "p0"){ findException = true } assertTrue(findException) - + order_qt_sql """ select * from toTable_without_define""" order_qt_sql """ select variant_type(var) from toTable_without_define""" @@ -68,7 +68,7 @@ suite("test_predefine_insert_into_select", "p0"){ ) ENGINE=OLAP DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "disable_auto_compaction" = "true")""" sql """insert into toTable_with_define values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}');""" - + sql """ insert into toTable_with_define select id, cast(var as string) from fromTable""" findException = false @@ -79,7 +79,7 @@ suite("test_predefine_insert_into_select", "p0"){ findException = true } assertTrue(findException) - + order_qt_sql """ select * from toTable_with_define""" order_qt_sql """ select variant_type(var) from toTable_with_define""" @@ -95,6 +95,6 @@ suite("test_predefine_insert_into_select", "p0"){ order_qt_sql """ select variant_type(var) from toTable""" sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ order_qt_sql """ select count() from toTable where cast (var['d'] as string) match '123' """ } diff --git a/regression-test/suites/variant_p0/predefine/test_predefine_pattern.groovy b/regression-test/suites/variant_p0/predefine/test_predefine_pattern.groovy index 54f7f010b54c67..f46816df2b293b 100644 --- a/regression-test/suites/variant_p0/predefine/test_predefine_pattern.groovy +++ b/regression-test/suites/variant_p0/predefine/test_predefine_pattern.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("test_variant_predefine_base", "p0"){ +suite("test_variant_predefine_base", "p0"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ def count = new Random().nextInt(5) @@ -53,7 +53,7 @@ suite("test_variant_predefine_base", "p0"){ qt_sql """ select count() from ${tableName} where cast(var['b?b'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['bb3'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['bxx'] as string) match '789' """ - + trigger_and_wait_compaction(tableName, "full", 1800) @@ -89,14 +89,14 @@ suite("test_variant_predefine_base", "p0"){ sql """insert into ${tableName} values(2, '{"a" : {"b" : 111, "*" : 111, "b1" : 111, "bxc" : 111, "c2323" : 111}}')""" sql """insert into ${tableName} values(3, '{"a" : {"b" : 222, "*" : 222, "b1" : 222, "bxc" : 222, "c2323" : 222}}')""" - qt_sql """ select variant_type(var) from base_match_name_variant_test group by variant_type(var) """ + qt_sql """ select variant_type(var) from base_match_name_variant_test group by variant_type(var) """ qt_sql """select * from ${tableName} order by id""" qt_sql """ select count() from ${tableName} where cast(var['a']['b'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['*'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['b1'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['bxc'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['c2323'] as string) match '789' """ - + trigger_and_wait_compaction(tableName, "full", 1800) qt_sql """select * from ${tableName} order by id""" @@ -106,5 +106,5 @@ qt_sql """ select count() from ${tableName} where cast(var['a']['c2323'] as stri qt_sql """ select count() from ${tableName} where cast(var['a']['b1'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['bxc'] as string) match '789' """ qt_sql """ select count() from ${tableName} where cast(var['a']['c2323'] as string) match '789' """ - + } diff --git a/regression-test/suites/variant_p0/predefine/test_predefine_schema_change.groovy b/regression-test/suites/variant_p0/predefine/test_predefine_schema_change.groovy index 2b092c0b79b08b..92f28c330b620c 100644 --- a/regression-test/suites/variant_p0/predefine/test_predefine_schema_change.groovy +++ b/regression-test/suites/variant_p0/predefine/test_predefine_schema_change.groovy @@ -37,11 +37,11 @@ suite("test_predefine_schema_change", "p0"){ sql """insert into ${tableName} values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}', 'col');""" sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${tableName} where cast (var['d'] as string) match '123' """ qt_sql """ select * from ${tableName} """ qt_sql """ select variant_type(var) from ${tableName} """ - + sql """ alter table ${tableName} modify column col1 varchar(200) NULL """ waitForSchemaChangeDone { diff --git a/regression-test/suites/variant_p0/predefine/test_predefine_type_index.groovy b/regression-test/suites/variant_p0/predefine/test_predefine_type_index.groovy index 0d09539ec3f4d9..926436718106a5 100644 --- a/regression-test/suites/variant_p0/predefine/test_predefine_type_index.groovy +++ b/regression-test/suites/variant_p0/predefine/test_predefine_type_index.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("test_variant_predefine_index_type", "p0"){ +suite("test_variant_predefine_index_type", "p0"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -42,12 +42,12 @@ suite("test_variant_predefine_index_type", "p0"){ (3, '{"path" : {"int" : 789, "decimal" : 789.789123456789, "string" : "hello"}}'), (4, '{"path" : {"int" : 100, "decimal" : 100.100123456789, "string" : "world"}}'), (5, '{"path" : {"int" : 111, "decimal" : 111.111111111111, "string" : "hello"}}')""" - + qt_sql """ select variant_type(var) from ${tableName} """ qt_sql """select * from ${tableName} order by id""" sql """ set profile_level = 2""" sql """ set inverted_index_skip_threshold = 0 """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_match_without_inverted_index = false """ sql """ set enable_segment_limit_pushdown = false """ @@ -104,22 +104,22 @@ suite("test_variant_predefine_index_type", "p0"){ "group_commit_data_bytes" = "134217728", "disable_auto_compaction" = "true" ); - """ + """ for (int i = 0; i < 10; i++) { sql """ INSERT INTO objects (id, overflow_properties) - VALUES + VALUES (6, '{"color":"Bright Red","description":"A bright red circular object with a metallic shine","shape":"Large Circle","tags":["metallic","reflective"]}'), (7, '{"color":"Deep Blue","description":"Opaque square made of plastic in deep blue","shape":"Small Square","tags":["opaque","plastic"]}'), (8, '{"color":"Green","description":"Tall green triangle carved from wood","shape":"Tall Triangle","tags":["matte","wood"]}'), (9, '{"color":"Reddish Orange","description":"Glossy ceramic hexagon with reddish orange tint","shape":"Flat Hexagon","tags":["glossy","ceramic"]}'), - (10, '{"color":"Yellow","description":"Shiny yellow circular badge","shape":"Wide Circle","tags":["shiny","plastic"]}'); + (10, '{"color":"Yellow","description":"Shiny yellow circular badge","shape":"Wide Circle","tags":["shiny","plastic"]}'); """ } trigger_and_wait_compaction(tableName, "cumulative", 1800) sql "set enable_match_without_inverted_index = false" - qt_sql "select count() from objects where (overflow_properties['color'] MATCH_PHRASE 'Blue')" - qt_sql "select count() from objects where (array_contains(cast(overflow_properties['tags'] as array), 'plastic'))" + qt_sql "select count() from objects where (overflow_properties['color'] MATCH_PHRASE 'Blue')" + qt_sql "select count() from objects where (array_contains(cast(overflow_properties['tags'] as array), 'plastic'))" qt_sql "select cast(overflow_properties['color'] as string) from objects where overflow_properties['color'] IS NOT NULL and id = 6 limit 1" qt_sql "select overflow_properties['color'] from objects where overflow_properties['color'] IS NOT NULL and id = 6 limit 1" } diff --git a/regression-test/suites/variant_p0/predefine/test_predefine_type_multi_index.groovy b/regression-test/suites/variant_p0/predefine/test_predefine_type_multi_index.groovy index ef615a40e09c58..95ad56077bea36 100644 --- a/regression-test/suites/variant_p0/predefine/test_predefine_type_multi_index.groovy +++ b/regression-test/suites/variant_p0/predefine/test_predefine_type_multi_index.groovy @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -suite("test_variant_predefine_type_multi_index", "p0"){ +suite("test_variant_predefine_type_multi_index", "p0"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_doc_materialization_min_rows = 0 """ @@ -42,9 +42,9 @@ suite("test_variant_predefine_type_multi_index", "p0"){ sql """ set profile_level = 2""" sql """ set inverted_index_skip_threshold = 0 """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set enable_match_without_inverted_index = false """ - + qt_sql """ select count() from ${tableName} where var['path']['string'] match 'hello' """ qt_sql """ select count() from ${tableName} where var['path']['string'] = 'hello' """ diff --git a/regression-test/suites/variant_p0/predefine/test_schema_template_auto_cast.groovy b/regression-test/suites/variant_p0/predefine/test_schema_template_auto_cast.groovy index 0e5a90ed9c9939..fafe264679c839 100644 --- a/regression-test/suites/variant_p0/predefine/test_schema_template_auto_cast.groovy +++ b/regression-test/suites/variant_p0/predefine/test_schema_template_auto_cast.groovy @@ -18,7 +18,7 @@ suite("test_schema_template_auto_cast", "p0") { sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ sql """ set enable_variant_schema_auto_cast = true """ diff --git a/regression-test/suites/variant_p0/predefine/test_types_with_indexes_profile.groovy b/regression-test/suites/variant_p0/predefine/test_types_with_indexes_profile.groovy index 41d0a32883d1cd..fed6d18a73a60f 100644 --- a/regression-test/suites/variant_p0/predefine/test_types_with_indexes_profile.groovy +++ b/regression-test/suites/variant_p0/predefine/test_types_with_indexes_profile.groovy @@ -14,10 +14,10 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -suite("test_variant_predefine_types_with_indexes_profile", "p0,nonConcurrent"){ +suite("test_variant_predefine_types_with_indexes_profile", "p0,nonConcurrent"){ sql """ set describe_extend_variant_column = true """ sql """ set enable_match_without_inverted_index = false """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ @@ -58,9 +58,9 @@ suite("test_variant_predefine_types_with_indexes_profile", "p0,nonConcurrent"){ `var` variant < 'array_decimal_*':array, 'array_ipv6_*':array, - 'int_*':int, - 'string_*':string, - 'decimal_*':decimalv3(26,9), + 'int_*':int, + 'string_*':string, + 'decimal_*':decimalv3(26,9), 'datetime_*':datetime, 'datetimev2_*':datetimev2(6), 'date_*':date, @@ -116,7 +116,7 @@ suite("test_variant_predefine_types_with_indexes_profile", "p0,nonConcurrent"){ "largeint_1": "12345678901234567890123456789012345678", "char_1": "short text" }' - ); + ); """ for (int i = 1; i < 10; i++) { load_json_data.call(tableName, getS3Url() + "/regression/variant/schema_tmpt${i}.json") @@ -229,5 +229,5 @@ suite("test_variant_predefine_types_with_indexes_profile", "p0,nonConcurrent"){ for (int i = 1; i < 10; i++) { sql """insert into test_variant_predefine_types_with_indexes_profile values (1, '{"a" : 123, "b" : 456, "d" : 789, "f" : "12345678901234567890123456789012345678"}')""" } - trigger_and_wait_compaction(tableName, "full", 1800) + trigger_and_wait_compaction(tableName, "full", 1800) } \ No newline at end of file diff --git a/regression-test/suites/variant_p0/predefine/test_variant_is_null_expr.groovy b/regression-test/suites/variant_p0/predefine/test_variant_is_null_expr.groovy index 82cbe5f2a7b52c..eba543f2f02dbf 100644 --- a/regression-test/suites/variant_p0/predefine/test_variant_is_null_expr.groovy +++ b/regression-test/suites/variant_p0/predefine/test_variant_is_null_expr.groovy @@ -22,7 +22,7 @@ suite("test_variant_is_null_expr", "p0, nonConcurrent") { sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ - sql """ DROP TABLE IF EXISTS ${testTable} """ + sql """ DROP TABLE IF EXISTS ${testTable} """ sql """ CREATE TABLE ${testTable} ( `k` int(11) NULL COMMENT "", @@ -54,8 +54,8 @@ suite("test_variant_is_null_expr", "p0, nonConcurrent") { GetDebugPoint().enableDebugPointForAllBEs(checkpoints_name, [filtered_rows: expectedFilteredRows]) sql "set experimental_enable_parallel_scan = false" sql " set inverted_index_skip_threshold = 0 " - sql "set enable_common_expr_pushdown = true" - sql "set enable_common_expr_pushdown_for_inverted_index = true" + sql "set enable_segment_limit_pushdown = true" + sql "set enable_segment_limit_pushdown = true" sql "sync" sql "${sqlQuery}" } finally { @@ -63,7 +63,7 @@ suite("test_variant_is_null_expr", "p0, nonConcurrent") { GetDebugPoint().disableDebugPointForAllBEs("segment_iterator.apply_inverted_index") } } - + queryAndCheck (" select * from ${testTable} where v['int1'] is not null; ", 2) queryAndCheck (" select * from ${testTable} where v['int1'] is null; ", 1) queryAndCheck (" select * from ${testTable} where v['string1'] is not null; ", 2) diff --git a/regression-test/suites/variant_p0/query_subcolumns.groovy b/regression-test/suites/variant_p0/query_subcolumns.groovy index 482cc5144ed644..8d8c7abbf3547a 100644 --- a/regression-test/suites/variant_p0/query_subcolumns.groovy +++ b/regression-test/suites/variant_p0/query_subcolumns.groovy @@ -30,12 +30,12 @@ suite("regression_test_query_subcolumns", "nonConcurrent"){ sql """DROP TABLE IF EXISTS query_subcolumns""" // query must use inverted index for match operator - sql """ set enable_common_expr_pushdown = true; """ + sql """ set enable_segment_limit_pushdown = true; """ sql "set enable_match_without_inverted_index = false" sql "set default_variant_enable_doc_mode = false" for (int i = 0; i < 5; i++) { int max_subcolumns_count = Math.floor(Math.random() * 10) - // int max_subcolumns_count =1 + // int max_subcolumns_count =1 def var = """variant, INDEX idx_v (v) USING INVERTED PROPERTIES("parser" = "english") """ if (max_subcolumns_count % 2 == 0) { @@ -81,7 +81,7 @@ suite("regression_test_query_subcolumns", "nonConcurrent"){ // } // triger compaction - trigger_and_wait_compaction("query_subcolumns", "full", 1800) + trigger_and_wait_compaction("query_subcolumns", "full", 1800) qt_sql "select v['a'] from query_subcolumns where cast(v['a'] as int) is not null order by k" qt_sql "select v['b'] from query_subcolumns where cast(v['b'] as int) is not null order by k" diff --git a/regression-test/suites/variant_p0/schema_change/test_add_multi_var_mulit_indexes.groovy b/regression-test/suites/variant_p0/schema_change/test_add_multi_var_mulit_indexes.groovy index 9d17358a390603..78affe63400617 100644 --- a/regression-test/suites/variant_p0/schema_change/test_add_multi_var_mulit_indexes.groovy +++ b/regression-test/suites/variant_p0/schema_change/test_add_multi_var_mulit_indexes.groovy @@ -51,7 +51,7 @@ suite("regression_test_variant_add_multi_var_mulit_indexes", "variant_type"){ properties("replication_num" = "1", "disable_auto_compaction" = "true"); """ sql """insert into ${table_name} values (0, '{"a" : 12345,"b" : 2}')""" - + sql """ alter table ${table_name} add column v2 variant<'a': string, 'b': string> NULL""" sql """insert into ${table_name} values (1, '{"a" : 12345,"b" : 2}', '{"a" : 12345,"b" : 3}')""" @@ -82,12 +82,11 @@ suite("regression_test_variant_add_multi_var_mulit_indexes", "variant_type"){ sql """ set enable_match_without_inverted_index = false""" sql """ set enable_inverted_index_query = true""" - sql """ set enable_common_expr_pushdown = true""" - sql """ set enable_common_expr_pushdown_for_inverted_index = true""" - + sql """ set enable_segment_limit_pushdown = true""" + qt_sql "select * from ${table_name} where cast(v2['a'] as string) match '12345' order by k" qt_sql "select * from ${table_name} where cast(v2['b'] as string) match '2' order by k" qt_sql "select * from ${table_name} where cast(v3['b'] as int) = 2 order by k" - - + + } \ No newline at end of file diff --git a/regression-test/suites/variant_p0/test_sub_path_pruning.groovy b/regression-test/suites/variant_p0/test_sub_path_pruning.groovy index dad5004cf53723..6c88532375e5d3 100644 --- a/regression-test/suites/variant_p0/test_sub_path_pruning.groovy +++ b/regression-test/suites/variant_p0/test_sub_path_pruning.groovy @@ -28,7 +28,7 @@ suite("test_sub_path_pruning", "variant_type"){ CREATE TABLE `pruning_test` ( `id` INT NULL, `dt` VARIANT NULL - ) + ) DUPLICATE KEY(id) DISTRIBUTED BY HASH(id) PROPERTIES("replication_num"="1") @@ -144,7 +144,7 @@ suite("test_sub_path_pruning", "variant_type"){ // two children order_qt_sql """ - select /*+SET_VAR(batch_size=50,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=2,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=false,parallel_scan_max_scanners_count=16,parallel_scan_min_rows_per_scanner=128,enable_fold_constant_by_be=false,enable_rewrite_element_at_to_slot=true,runtime_filter_type=2,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=2,enable_function_pushdown=true,enable_common_expr_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ dt['a'] as c1 from pruning_test union all select dt['a'] as c1 from pruning_test; + select /*+SET_VAR(batch_size=50,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=2,profile_level=1,enable_pipeline_engine=true,enable_parallel_scan=false,parallel_scan_max_scanners_count=16,parallel_scan_min_rows_per_scanner=128,enable_fold_constant_by_be=false,enable_rewrite_element_at_to_slot=true,runtime_filter_type=2,enable_nereids_planner=true,rewrite_or_to_in_predicate_threshold=2,enable_function_pushdown=true,enable_segment_limit_pushdown=true,enable_local_exchange=false,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=false,enable_two_phase_read_opt=true,spill_min_revocable_mem=33554432,fetch_remote_schema_timeout_seconds=120,enable_spill=false,enable_force_spill=false,data_queue_max_blocks=1,spill_streaming_agg_mem_limit=268435456,spill_aggregation_partition_count=5) */ dt['a'] as c1 from pruning_test union all select dt['a'] as c1 from pruning_test; """ order_qt_sql """select c1['a'] from (select dt as c1 from pruning_test union all select dt as c1 from pruning_test) v1;""" order_qt_sql """select c1['b'] from (select dt['a'] as c1 from pruning_test union all select dt['a'] as c1 from pruning_test) v1;""" diff --git a/regression-test/suites/variant_p0/test_variant_is_null_expr.groovy b/regression-test/suites/variant_p0/test_variant_is_null_expr.groovy index c30d3b3c0cb35b..20eb4d6e4f8d5e 100644 --- a/regression-test/suites/variant_p0/test_variant_is_null_expr.groovy +++ b/regression-test/suites/variant_p0/test_variant_is_null_expr.groovy @@ -21,7 +21,7 @@ suite("test_variant_is_null_expr", "p0, nonConcurrent") { def testTable = "test_variant_is_null_expr" sql "set default_variant_max_subcolumns_count = 10" sql "set default_variant_doc_materialization_min_rows = 0" - sql """ DROP TABLE IF EXISTS ${testTable} """ + sql """ DROP TABLE IF EXISTS ${testTable} """ sql """ CREATE TABLE ${testTable} ( `k` int(11) NULL COMMENT "", @@ -48,8 +48,8 @@ suite("test_variant_is_null_expr", "p0, nonConcurrent") { GetDebugPoint().enableDebugPointForAllBEs(checkpoints_name, [filtered_rows: expectedFilteredRows]) sql "set experimental_enable_parallel_scan = false" sql " set inverted_index_skip_threshold = 0 " - sql " set enable_common_expr_pushdown_for_inverted_index = true" - sql " set enable_common_expr_pushdown = true" + sql " set enable_segment_limit_pushdown = true" + sql " set enable_segment_limit_pushdown = true" sql " set enable_parallel_scan = false" sql "sync" sql "${sqlQuery}" @@ -58,8 +58,8 @@ suite("test_variant_is_null_expr", "p0, nonConcurrent") { GetDebugPoint().disableDebugPointForAllBEs("segment_iterator.apply_inverted_index") } } - - queryAndCheck (" select /*+ SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=1,enable_binary_search_filtering_partitions=true,enable_sql_cache=false,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=2097152,use_serial_exchange=false,enable_shared_exchange_sink_buffer=true,parallel_prepare_threshold=2,enable_fold_constant_by_be=false,enable_rewrite_element_at_to_slot=true,runtime_filter_wait_infinitely=true,runtime_filter_type=5,runtime_filter_max_in_num=40960,enable_sync_runtime_filter_size=false,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=2,enable_runtime_filter_prune=false,enable_runtime_filter_partition_prune=false,enable_fast_analyze_into_values=true,enable_function_pushdown=true,enable_common_expr_pushdown=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,enable_common_expr_pushdown_for_inverted_index=false,fe_debug=true,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,data_queue_max_blocks=1,enable_spill=true,enable_reserve_memory=true,spill_min_revocable_mem=104857600,spill_aggregation_partition_count=32,spill_hash_join_partition_count=32,spill_revocable_memory_high_watermark_percent=-1) */ * from ${testTable} where v['int1'] is not null; ", 2) + + queryAndCheck (" select /*+ SET_VAR(batch_size=4064,broker_load_batch_size=16352,disable_streaming_preaggregations=false,enable_distinct_streaming_aggregation=true,parallel_pipeline_task_num=1,enable_binary_search_filtering_partitions=true,enable_sql_cache=false,enable_parallel_scan=true,parallel_scan_max_scanners_count=48,parallel_scan_min_rows_per_scanner=2097152,use_serial_exchange=false,enable_shared_exchange_sink_buffer=true,parallel_prepare_threshold=2,enable_fold_constant_by_be=false,enable_rewrite_element_at_to_slot=true,runtime_filter_wait_infinitely=true,runtime_filter_type=5,runtime_filter_max_in_num=40960,enable_sync_runtime_filter_size=false,enable_parallel_result_sink=true,sort_phase_num=0,rewrite_or_to_in_predicate_threshold=2,enable_runtime_filter_prune=false,enable_runtime_filter_partition_prune=false,enable_fast_analyze_into_values=true,enable_function_pushdown=true,enable_segment_limit_pushdown=true,partition_pruning_expand_threshold=10,enable_share_hash_table_for_broadcast_join=true,enable_two_phase_read_opt=true,fe_debug=true,fetch_remote_schema_timeout_seconds=120,max_fetch_remote_schema_tablet_count=512,data_queue_max_blocks=1,enable_spill=true,enable_reserve_memory=true,spill_min_revocable_mem=104857600,spill_aggregation_partition_count=32,spill_hash_join_partition_count=32,spill_revocable_memory_high_watermark_percent=-1) */ * from ${testTable} where v['int1'] is not null; ", 2) queryAndCheck (" select * from ${testTable} where v['int1'] is null; ", 1) queryAndCheck (" select * from ${testTable} where v['string1'] is not null; ", 2) queryAndCheck (" select * from ${testTable} where v['string1'] is null; ", 1) diff --git a/regression-test/suites/variant_p0/test_variant_search_subcolumn.groovy b/regression-test/suites/variant_p0/test_variant_search_subcolumn.groovy index d4a4f9bc12c31c..095d3fb84d6e02 100644 --- a/regression-test/suites/variant_p0/test_variant_search_subcolumn.groovy +++ b/regression-test/suites/variant_p0/test_variant_search_subcolumn.groovy @@ -57,7 +57,7 @@ suite("test_variant_search_subcolumn") { // Test 1: Single term search on variant subcolumn logger.info("Test 1: Single term search on variant subcolumn") qt_test1 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('overflowpropertiesfulltext.string4:0ff') ORDER BY id """ @@ -66,7 +66,7 @@ suite("test_variant_search_subcolumn") { // Test 2: AND query on same variant subcolumn logger.info("Test 2: AND query on same variant subcolumn") qt_test2 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('overflowpropertiesfulltext.string4:0ff AND overflowpropertiesfulltext.string4:dpr') ORDER BY id """ @@ -75,7 +75,7 @@ suite("test_variant_search_subcolumn") { // Test 3: ALL search on variant subcolumn logger.info("Test 3: ALL search on variant subcolumn") qt_test3 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('overflowpropertiesfulltext.string4:ALL(0ff dpr)') ORDER BY id """ @@ -84,7 +84,7 @@ suite("test_variant_search_subcolumn") { // Test 4: Search on different variant subcolumns (OR) logger.info("Test 4: Search on different variant subcolumns") qt_test4 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('overflowpropertiesfulltext.string4:hello OR overflowpropertiesfulltext.string5:dpr') ORDER BY id """ @@ -93,7 +93,7 @@ suite("test_variant_search_subcolumn") { // Test 5: Search on non-existent subcolumn logger.info("Test 5: Search on non-existent subcolumn") qt_test5 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ COUNT(*) FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ COUNT(*) FROM ${table_name} WHERE search('overflowpropertiesfulltext.nonexistent:value') """ // Expected: 0 @@ -101,7 +101,7 @@ suite("test_variant_search_subcolumn") { // Test 6: Nested variant path logger.info("Test 6: Nested variant path") qt_test6 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('overflowpropertiesfulltext.nested.field:0ff') ORDER BY id """ @@ -110,7 +110,7 @@ suite("test_variant_search_subcolumn") { // Test 7: Complex query with variant subcolumns logger.info("Test 7: Complex query with variant subcolumns") qt_test7 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('(overflowpropertiesfulltext.string4:0ff OR overflowpropertiesfulltext.string4:dpr) AND NOT overflowpropertiesfulltext.string4:hello') ORDER BY id """ @@ -125,7 +125,7 @@ suite("test_variant_search_subcolumn") { Thread.sleep(5000) qt_test8 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} WHERE search('overflowpropertiesfulltext.field-name:test') ORDER BY id """ @@ -134,7 +134,7 @@ suite("test_variant_search_subcolumn") { // Test 9: Wildcard search on variant subcolumn //logger.info("Test 9: Wildcard search on variant subcolumn") //qt_test9 """ - // SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} + // SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ id FROM ${table_name} // WHERE search('overflowpropertiesfulltext.string4:0*') // ORDER BY id //""" @@ -144,7 +144,7 @@ suite("test_variant_search_subcolumn") { logger.info("Test 10: Verify normal field search still works (if id has index)") // This test verifies we didn't break normal field search qt_test10 """ - SELECT /*+SET_VAR(enable_common_expr_pushdown=true, default_variant_max_subcolumns_count=0)*/ COUNT(*) FROM ${table_name} + SELECT /*+SET_VAR(enable_segment_limit_pushdown=true, default_variant_max_subcolumns_count=0)*/ COUNT(*) FROM ${table_name} WHERE id > 0 """ // Expected: 7 diff --git a/regression-test/suites/variant_p0/with_index/load.groovy b/regression-test/suites/variant_p0/with_index/load.groovy index 99343d8dc6b874..36a33a466276ed 100644 --- a/regression-test/suites/variant_p0/with_index/load.groovy +++ b/regression-test/suites/variant_p0/with_index/load.groovy @@ -35,7 +35,7 @@ suite("regression_test_variant_with_index", "p0"){ """ sql """insert into var_with_index values(1, '{"a" : 0, "b": 3}', 'hello world'), (2, '{"a" : 123}', 'world'),(3, '{"a" : 123}', 'hello world')""" sql """set enable_match_without_inverted_index = false""" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql_inv_1 """select v["a"] from var_with_index where inv match 'hello' order by k""" qt_sql_inv_2 """select v["a"] from var_with_index where inv match 'hello' and cast(v['a'] as int) > 0 order by k""" qt_sql_inv_3 """select * from var_with_index where inv match 'hello' and cast(v["a"] as int) > 0 order by k""" @@ -45,7 +45,7 @@ suite("regression_test_variant_with_index", "p0"){ sql """insert into var_with_index values(1, '{"a1" : 0, "b1": 3}', 'hello world'), (2, '{"a2" : 123}', 'world'),(3, '{"a3" : 123}', 'hello world')""" sql """insert into var_with_index values(4, '{"b1" : 0, "b2": 3}', 'hello world'), (5, '{"b2" : 123}', 'world'),(6, '{"b3" : 123}', 'hello world')""" def drop_result = sql """ - ALTER TABLE var_with_index + ALTER TABLE var_with_index drop index idx """ logger.info("drop index " + "${table_name}" + "; result: " + drop_result) @@ -63,7 +63,7 @@ suite("regression_test_variant_with_index", "p0"){ assertEquals(show_result.size(), 1) sql """insert into var_with_index values(7, '{"a1" : 0, "b1": 3}', 'hello world'), (8, '{"a2" : 123}', 'world'),(9, '{"a3" : 123}', 'hello world')""" qt_sql_inv6 """select * from ${table_name} order by k desc limit 4""" - + sql """insert into var_with_index values(1, '{"a" : 0, "b": 3}', 'hello world'), (2, '{"a" : 123}', 'world'),(3, '{"a" : 123}', 'hello world')""" sql """insert into var_with_index values(1, '{"a" : 0, "b": 3}', 'hello world'), (2, '{"a" : 123}', 'world'),(3, '{"a" : 123}', 'hello world')""" diff --git a/regression-test/suites/variant_p0/with_index/test_array_contains_with_inverted_index.groovy b/regression-test/suites/variant_p0/with_index/test_array_contains_with_inverted_index.groovy index fcbdadf9064785..50cca5794d0617 100644 --- a/regression-test/suites/variant_p0/with_index/test_array_contains_with_inverted_index.groovy +++ b/regression-test/suites/variant_p0/with_index/test_array_contains_with_inverted_index.groovy @@ -20,9 +20,8 @@ suite("test_array_contains_with_inverted_index") { def indexTblName = "tai" setFeConfigTemporary([enable_inverted_index_v1_for_variant: true]) { - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_profile = true;""" sql "DROP TABLE IF EXISTS ${indexTblName}" @@ -70,7 +69,7 @@ suite("test_array_contains_with_inverted_index") { sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', '0974e7a82e30d1af83205e474fadd0a2', '{"inventors":["w"]}'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', '26823b3995ee38bd145ddd910b2f6300', '{"inventors":["x"]}'); """ sql """ INSERT INTO `${indexTblName}`(`apply_date`, `id`, `inventors`) VALUES ('2019-01-01', 'ee27ee1da291e46403c408e220bed6e1', '{"inventors":["y"]}'); """ - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """ select count() from ${indexTblName}""" def param_contains = ["'s'", "''", null] @@ -94,24 +93,24 @@ suite("test_array_contains_with_inverted_index") { for (int i = 0 ; i < param.size(); ++i) { def p = param[i] log.info("param: ${p}") - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = true)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ - order_qt_sql """ select /*+SET_VAR(enable_common_expr_pushdown = false)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where !arrays_overlap(cast(inventors['inventors'] as array), ${p}) or apply_date = '2017-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = true)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ + order_qt_sql """ select /*+SET_VAR(enable_segment_limit_pushdown = false)*/ * from tai where (arrays_overlap(cast(inventors['inventors'] as array), ${p}) and apply_date = '2017-01-01') or apply_date = '2019-01-01' order by id; """ } } } diff --git a/regression-test/suites/variant_p0/with_index/test_array_inverted_index_profile.groovy b/regression-test/suites/variant_p0/with_index/test_array_inverted_index_profile.groovy index 6494fa3bc78858..597f09060850bd 100644 --- a/regression-test/suites/variant_p0/with_index/test_array_inverted_index_profile.groovy +++ b/regression-test/suites/variant_p0/with_index/test_array_inverted_index_profile.groovy @@ -36,7 +36,7 @@ suite("test_variant_arrayInvertedIdx_profile", "p0,nonConcurrent"){ def dst = 'http://' + context.config.feHttpAddress def conn = new URL(dst + "/rest/v1/query_profile").openConnection() conn.setRequestMethod("GET") - def encoding = Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" + + def encoding = Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" + (context.config.feHttpPassword == null ? "" : context.config.feHttpPassword)).getBytes("UTF-8")) conn.setRequestProperty("Authorization", "Basic ${encoding}") return conn.getInputStream().getText() @@ -46,7 +46,7 @@ suite("test_variant_arrayInvertedIdx_profile", "p0,nonConcurrent"){ def dst = 'http://' + context.config.feHttpAddress def conn = new URL(dst + "/api/profile/text/?query_id=$id").openConnection() conn.setRequestMethod("GET") - def encoding = Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" + + def encoding = Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" + (context.config.feHttpPassword == null ? "" : context.config.feHttpPassword)).getBytes("UTF-8")) conn.setRequestProperty("Authorization", "Basic ${encoding}") return conn.getInputStream().getText() @@ -75,9 +75,8 @@ suite("test_variant_arrayInvertedIdx_profile", "p0,nonConcurrent"){ return getProfile(profileId).toString() } - // If we use common expr pass to inverted index , we should set enable_common_expr_pushdown = true - sql """ set enable_common_expr_pushdown = true; """ - sql """ set enable_common_expr_pushdown_for_inverted_index = true; """ + // Pin enable_segment_limit_pushdown to keep inverted-index pushdown stable under fuzzy testing + sql """ set enable_segment_limit_pushdown = true; """ sql """ set enable_profile = true;""" sql """ set profile_level = 2;""" setFeConfigTemporary([enable_inverted_index_v1_for_variant: true]) { diff --git a/regression-test/suites/variant_p0/with_index/var_index.groovy b/regression-test/suites/variant_p0/with_index/var_index.groovy index ae9a795d735bf5..2df5f665ae50d2 100644 --- a/regression-test/suites/variant_p0/with_index/var_index.groovy +++ b/regression-test/suites/variant_p0/with_index/var_index.groovy @@ -27,7 +27,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true"); """ @@ -37,10 +37,10 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ sql """insert into var_index values(4, '{"a" : 1234, "b" : "hello xxx world", "c" : 8181111}')""" qt_sql """select * from var_index where cast(v["a"] as smallint) > 123 and cast(v["b"] as string) match 'hello' and cast(v["c"] as int) > 1024 order by k""" trigger_and_wait_compaction(table_name, "full", 1800) - sql """ set enable_common_expr_pushdown = true """ - sql """set enable_match_without_inverted_index = false""" + sql """ set enable_segment_limit_pushdown = true """ + sql """set enable_match_without_inverted_index = false""" qt_sql """select * from var_index where cast(v["a"] as smallint) > 123 and cast(v["b"] as string) match 'hello' and cast(v["c"] as int) > 1024 order by k""" - sql """set enable_match_without_inverted_index = true""" + sql """set enable_match_without_inverted_index = true""" sql """insert into var_index values(5, '{"a" : 123456789, "b" : 123456, "c" : 8181111}')""" qt_sql """select * from var_index where cast(v["a"] as int) > 123 and cast(v["b"] as string) match 'hello' and cast(v["c"] as int) > 11111 order by k""" // insert double/float/array/json @@ -62,7 +62,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1"); """ } catch (Exception e) { @@ -79,7 +79,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ v variant ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1"); """ @@ -103,7 +103,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1"); """ } catch (Exception e) { @@ -117,7 +117,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ v variant ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1"); """ @@ -135,7 +135,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT '' ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1"); """ @@ -146,7 +146,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ v variant ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true", "inverted_index_storage_format" = "V1"); """ sql """ALTER TABLE var_index ADD INDEX idx_var(v) USING INVERTED""" @@ -155,7 +155,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ exception "The idx_var index can not be built on the v column, because it is a variant type column" } } - + } sql """ DROP TABLE IF EXISTS ${table_name} """ @@ -167,7 +167,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ INDEX idx_var2(v) USING INVERTED ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 1 + DISTRIBUTED BY HASH(k) BUCKETS 1 properties("replication_num" = "1", "disable_auto_compaction" = "true"); """ @@ -235,7 +235,7 @@ suite("regression_test_variant_var_index", "p0, nonConcurrent"){ } else { assertEquals(5, get_indeces_count()) } - + sql """ insert into ${table_name} values(2, '{"name": "李四", "age": 20}') """ sql """ insert into ${table_name} values(2, '{"name": "李四", "age": 20}') """ diff --git a/regression-test/suites/variant_p1/doc_snapshot/load.groovy b/regression-test/suites/variant_p1/doc_snapshot/load.groovy index afc17472be527b..3baf371463c62b 100644 --- a/regression-test/suites/variant_p1/doc_snapshot/load.groovy +++ b/regression-test/suites/variant_p1/doc_snapshot/load.groovy @@ -18,10 +18,10 @@ import org.codehaus.groovy.runtime.IOGroovyMethods suite("predefine_type_multi_index_doc_value", "p1"){ - + sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = true """ - + def load_json_data = {table_name, file_name -> // load the json data streamLoad { @@ -75,7 +75,7 @@ suite("predefine_type_multi_index_doc_value", "p1"){ INDEX idx_var_2 (`v`) USING INVERTED ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "true", "deprecated_variant_enable_flatten_nested" = "false"); """ @@ -92,12 +92,12 @@ suite("predefine_type_multi_index_doc_value", "p1"){ load_json_data.call(table_name, """${getS3Url() + '/regression/gharchive.m/2022-11-07-23.json'}""") sql """set enable_match_without_inverted_index = false""" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """select cast(v["repo"]["name"] as string) from github_events where v["repo"]["name"] match 'apache' order by k limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) match 'xpressengine/xe-core' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10""" - + sql """ drop table if exists github_events_2 """ sql """ create table github_events_2 like github_events """ sql """ insert into github_events_2 select * from github_events """ @@ -106,7 +106,7 @@ suite("predefine_type_multi_index_doc_value", "p1"){ qt_sql """select cast(v["repo"]["name"] as string) from github_events where v["repo"]["name"] match 'apache' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) match 'xpressengine/xe-core' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10""" - + qt_sql """select cast(v["repo"]["name"] as string) from github_events_2 where v["repo"]["name"] match 'apache' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events_2 where cast(v["repo"]["name"] as string) match 'xpressengine/xe-core' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events_2 where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10""" diff --git a/regression-test/suites/variant_p1/predefine/load.groovy b/regression-test/suites/variant_p1/predefine/load.groovy index 578731d51dbeba..e29ea965a48a79 100644 --- a/regression-test/suites/variant_p1/predefine/load.groovy +++ b/regression-test/suites/variant_p1/predefine/load.groovy @@ -18,10 +18,10 @@ import org.codehaus.groovy.runtime.IOGroovyMethods suite("test_predefine_type_multi_index", "p1"){ - + sql """ set default_variant_enable_typed_paths_to_sparse = false """ sql """ set default_variant_enable_doc_mode = false """ - + def load_json_data = {table_name, file_name -> // load the json data streamLoad { @@ -75,7 +75,7 @@ suite("test_predefine_type_multi_index", "p1"){ INDEX idx_var_2 (`v`) USING INVERTED ) DUPLICATE KEY(`k`) - DISTRIBUTED BY HASH(k) BUCKETS 4 + DISTRIBUTED BY HASH(k) BUCKETS 4 properties("replication_num" = "1", "disable_auto_compaction" = "true"); """ @@ -92,12 +92,12 @@ suite("test_predefine_type_multi_index", "p1"){ load_json_data.call(table_name, """${getS3Url() + '/regression/gharchive.m/2022-11-07-23.json'}""") sql """set enable_match_without_inverted_index = false""" - sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_segment_limit_pushdown = true """ qt_sql """select cast(v["repo"]["name"] as string) from github_events where v["repo"]["name"] match 'apache' order by k limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) match 'xpressengine/xe-core' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10""" - + sql """ drop table if exists github_events_2 """ sql """ create table github_events_2 like github_events """ sql """ insert into github_events_2 select * from github_events """ @@ -106,7 +106,7 @@ suite("test_predefine_type_multi_index", "p1"){ qt_sql """select cast(v["repo"]["name"] as string) from github_events where v["repo"]["name"] match 'apache' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) match 'xpressengine/xe-core' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10""" - + qt_sql """select cast(v["repo"]["name"] as string) from github_events_2 where v["repo"]["name"] match 'apache' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events_2 where cast(v["repo"]["name"] as string) match 'xpressengine/xe-core' order by 1 limit 10;""" qt_sql """select cast(v["repo"]["name"] as string) from github_events_2 where cast(v["repo"]["name"] as string) = 'xpressengine/xe-core' order by 1 limit 10"""