ZENOTME commented on code in PR #924:
URL: https://github.com/apache/iceberg-rust/pull/924#discussion_r1946198059


##########
crates/integration_tests/tests/shared_tests/mod.rs:
##########
@@ -0,0 +1,65 @@
+// 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.
+
+use std::collections::HashMap;
+
+use iceberg::spec::{NestedField, PrimitiveType, Schema, Type};
+use iceberg::{Catalog, Namespace, NamespaceIdent};
+use iceberg_catalog_rest::RestCatalog;
+
+use crate::get_shared_containers;
+
+mod append_data_file_test;
+mod append_partition_data_file_test;
+mod conflict_commit_test;
+mod datafusion;
+mod read_evolved_schema;
+mod read_positional_deletes;
+mod scan_all_type;
+
+pub async fn random_ns() -> Namespace {
+    let fixture = get_shared_containers();
+    let rest_catalog = RestCatalog::new(fixture.catalog_config.clone());
+
+    let ns = Namespace::with_properties(
+        NamespaceIdent::from_strs([uuid::Uuid::new_v4().to_string()]).unwrap(),
+        HashMap::from([
+            ("owner".to_string(), "ray".to_string()),
+            ("community".to_string(), "apache".to_string()),
+        ]),
+    );
+
+    rest_catalog
+        .create_namespace(ns.name(), ns.properties().clone())
+        .await
+        .unwrap();
+
+    ns
+}
+
+fn test_schema() -> Schema {

Review Comment:
   > I figured it made sense to extract it simply for de-duplication (and 
allowing any future tests where schema isn't that important to re-use it as 
well).
   
   Both way looks good to me. I'm fine to keep it now for reuse by 3 case and 
we can remove them when need to evolve schema indenpently.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to