This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 0735c19cdda branch-2.1: [fix](paimon) Covert Paimon DeletionFile Path to StoragePath in fe #49645 (#49751) 0735c19cdda is described below commit 0735c19cdda90db3af64b610cb74b5822bff9436 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Wed Apr 2 20:25:10 2025 +0800 branch-2.1: [fix](paimon) Covert Paimon DeletionFile Path to StoragePath in fe #49645 (#49751) Cherry-picked from #49645 Co-authored-by: Socrates <suyit...@selectdb.com> --- .../datasource/paimon/source/PaimonScanNode.java | 6 ++- .../paimon/test_paimon_deletion_vector_oss.out | Bin 0 -> 525 bytes .../paimon/test_paimon_deletion_vector_oss.groovy | 60 +++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java index 28efbc58f51..5afef56f085 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java @@ -192,7 +192,11 @@ public class PaimonScanNode extends FileQueryScanNode { if (optDeletionFile.isPresent()) { DeletionFile deletionFile = optDeletionFile.get(); TPaimonDeletionFileDesc tDeletionFile = new TPaimonDeletionFileDesc(); - tDeletionFile.setPath(deletionFile.path()); + // convert the deletion file uri to make sure FileReader can read it in be + LocationPath locationPath = new LocationPath(deletionFile.path(), + source.getCatalog().getProperties()); + String path = locationPath.toStorageLocation().toString(); + tDeletionFile.setPath(path); tDeletionFile.setOffset(deletionFile.offset()); tDeletionFile.setLength(deletionFile.length()); fileDesc.setDeletionFile(tDeletionFile); diff --git a/regression-test/data/external_table_p0/paimon/test_paimon_deletion_vector_oss.out b/regression-test/data/external_table_p0/paimon/test_paimon_deletion_vector_oss.out new file mode 100644 index 00000000000..f0b1e92a088 Binary files /dev/null and b/regression-test/data/external_table_p0/paimon/test_paimon_deletion_vector_oss.out differ diff --git a/regression-test/suites/external_table_p0/paimon/test_paimon_deletion_vector_oss.groovy b/regression-test/suites/external_table_p0/paimon/test_paimon_deletion_vector_oss.groovy new file mode 100644 index 00000000000..55fc903a31b --- /dev/null +++ b/regression-test/suites/external_table_p0/paimon/test_paimon_deletion_vector_oss.groovy @@ -0,0 +1,60 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +suite("test_paimon_deletion_vector_oss", "p0,external,doris,external_docker,external_docker_doris") { + + logger.info("start paimon test") + String enabled = context.config.otherConfigs.get("enablePaimonTest") + if (enabled == null || !enabled.equalsIgnoreCase("true")) { + logger.info("disabled paimon test") + return + } + + try { + String catalog_name = "test_paimon_deletion_vector_oss" + String aliYunAk = context.config.otherConfigs.get("aliYunAk") + String aliYunSk = context.config.otherConfigs.get("aliYunSk") + sql """drop catalog if exists ${catalog_name}""" + sql """create catalog if not exists ${catalog_name} properties ( + "type" = "paimon", + "paimon.catalog.type"="filesystem", + "warehouse" = "oss://doris-regression-bj/regression/paimon1", + "oss.access_key"="${aliYunAk}", + "oss.secret_key"="${aliYunSk}", + "oss.endpoint"="oss-cn-beijing.aliyuncs.com" + );""" + + sql """use `${catalog_name}`.`db1`""" + + def test_cases = { String force -> + sql """ set force_jni_scanner=${force} """ + qt_1 """select count(*) from deletion_vector_orc;""" + qt_2 """select count(*) from deletion_vector_parquet;""" + qt_3 """select count(*) from deletion_vector_orc where id > 2;""" + qt_4 """select count(*) from deletion_vector_parquet where id > 2;""" + qt_5 """select * from deletion_vector_orc where id > 2 order by id;""" + qt_6 """select * from deletion_vector_parquet where id > 2 order by id;""" + } + + test_cases("false") + test_cases("true") + + } finally { + sql """set force_jni_scanner=false""" + } + +} \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org