github-actions[bot] commented on code in PR #68142: URL: https://github.com/apache/doris/pull/68142#discussion_r4038273698
########## regression-test/suites/external_table_p0/iceberg/test_iceberg_missing_data_file.groovy: ########## @@ -0,0 +1,87 @@ +// 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. + +import com.amazonaws.auth.AWSStaticCredentialsProvider +import com.amazonaws.auth.BasicAWSCredentials +import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration +import com.amazonaws.services.s3.AmazonS3ClientBuilder + +suite("test_iceberg_missing_data_file", + "p0,external,iceberg,external_docker,external_docker_iceberg,nonConcurrent") { + if (!"true".equalsIgnoreCase(context.config.otherConfigs.get("enableIcebergTest"))) { + logger.info("disable iceberg test") + return + } + String host = context.config.otherConfigs.get("externalEnvIp") + String restPort = context.config.otherConfigs.get("iceberg_rest_uri_port") + String minioPort = context.config.otherConfigs.get("iceberg_minio_port") + String endpoint = "http://${host}:${minioPort}" + + sql "drop catalog if exists test_iceberg_missing_data_file" + sql """create catalog test_iceberg_missing_data_file properties ( + "type" = "iceberg", + "iceberg.catalog.type" = "rest", + "uri" = "http://${host}:${restPort}", + "s3.endpoint" = "${endpoint}", + "s3.access_key" = "admin", + "s3.secret_key" = "password", + "s3.region" = "us-east-1" + )""" + sql "switch test_iceberg_missing_data_file" + sql "create database if not exists missing_data_file_db" + sql "use missing_data_file_db" + sql "drop table if exists missing_data_file" + sql """create table missing_data_file (id int, payload string) + properties ("format-version" = "2", "write.format.default" = "parquet")""" + sql "insert into missing_data_file values (1, 'first-file')" + sql "insert into missing_data_file values (2, 'second-file')" + + // Inspect manifests only: reading table rows here could cache the object that will be removed. + def files = sql "select file_path from missing_data_file\$files where content = 0" + assertTrue(files.size() >= 2, "The snapshot must contain multiple data files") + URI missingFile = new URI(files[0][0].toString()) + assertEquals("s3", missingFile.scheme) Review Comment: [P1] Accept the fixture's s3a data-file URI This fixture configures the REST warehouse as `s3a://warehouse/wh/`, and the write path deliberately commits the preserved raw output path. Consequently `$files` returns an `s3a://...` URI here, so this assertion fails before `deleteObject` or any V1/V2/configuration case runs. Please accept `s3a` (or remove the scheme assertion) while retaining the host/path checks used for MinIO deletion. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
