This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 756b9c26540 [bugfix](external)Modify the default value of `pushdowncount` (#37754) 756b9c26540 is described below commit 756b9c26540375847fdb5b79baffd201a247caee Author: wuwenchi <wuwenchi...@hotmail.com> AuthorDate: Tue Jul 16 18:55:27 2024 +0800 [bugfix](external)Modify the default value of `pushdowncount` (#37754) ## Proposed changes 1. Do not use `0`: If the number of entries in the table is 0, it is unclear whether optimization has been performed. 2. Do not use `null` or `-`: This makes it easier for the program to parse the `explain` data. --- .../src/main/java/org/apache/doris/datasource/FileScanNode.java | 5 ++++- .../external_table_p0/iceberg/test_iceberg_optimize_count.groovy | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java index 3c59c3d34cc..1213c1c03f2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java @@ -98,7 +98,10 @@ public abstract class FileScanNode extends ExternalScanNode { } public long getPushDownCount() { - return 0; + // 1. Do not use `0`: If the number of entries in the table is 0, + // it is unclear whether optimization has been performed. + // 2. Do not use `null` or `-`: This makes it easier for the program to parse the `explain` data. + return -1; } @Override diff --git a/regression-test/suites/external_table_p0/iceberg/test_iceberg_optimize_count.groovy b/regression-test/suites/external_table_p0/iceberg/test_iceberg_optimize_count.groovy index e55d0fefa8d..6c7789a6ca1 100644 --- a/regression-test/suites/external_table_p0/iceberg/test_iceberg_optimize_count.groovy +++ b/regression-test/suites/external_table_p0/iceberg/test_iceberg_optimize_count.groovy @@ -40,7 +40,6 @@ suite("test_iceberg_optimize_count", "p0,external,doris,external_docker,external );""" sql """ switch ${catalog_name} """ - sql """ create database if not exists ${catalog_name} """ sql """ use format_v2 """ sqlstr1 = """ select count(*) from sample_cow_orc; """ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org