discivigour commented on code in PR #160:
URL: https://github.com/apache/paimon-rust/pull/160#discussion_r3016260263


##########
crates/integration_tests/Cargo.toml:
##########
@@ -28,3 +28,7 @@ paimon = { path = "../paimon" }
 arrow-array = { workspace = true }
 tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
 futures = "0.3"
+serde_json = "1"

Review Comment:
   No, 'mod mock_server' needs it.



##########
crates/paimon/examples/rest_catalog_example.rs:
##########
@@ -0,0 +1,177 @@
+// 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.
+
+//! Example: REST Catalog Operations
+//!
+//! This example demonstrates how to use `RESTCatalog` for database and table 
operations
+//! via the Paimon REST catalog API.
+//!
+//! # Usage
+//! ```bash
+//! # With DLF authentication:
+//! DLF_ACCESS_KEY_ID=xxx DLF_ACCESS_KEY_SECRET=yyy \
+//!   cargo run -p paimon --example rest_catalog_example
+//!
+//! # With Bearer token authentication:
+//! PAIMON_REST_TOKEN=zzz \
+//!   cargo run -p paimon --example rest_catalog_example
+//! ```
+
+use std::collections::HashMap;
+
+use paimon::catalog::{Catalog, Identifier, RESTCatalog};
+use paimon::common::{CatalogOptions, Options};
+use paimon::spec::{DataType, IntType, Schema, VarCharType};
+
+/// Create a simple test schema with `id` (INT) and `name` (VARCHAR) columns.
+fn create_test_schema() -> Schema {
+    Schema::builder()
+        .column("id", DataType::Int(IntType::new()))
+        .column("name", DataType::VarChar(VarCharType::new(255).unwrap()))
+        .build()
+        .expect("Failed to build schema")
+}
+
+#[tokio::main]
+async fn main() {

Review Comment:
   Got it.



-- 
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]

Reply via email to