xanderbailey commented on code in PR #3042:
URL: https://github.com/apache/iceberg-rust/pull/3042#discussion_r3829643737
##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -879,6 +895,86 @@ impl RestSessionCatalog {
Ok(file_io)
}
+
+ async fn create_table_internal(
+ &self,
+ namespace: &NamespaceIdent,
+ creation: TableCreation,
+ stage_create: bool,
+ ) -> Result<Table> {
+ let client = self.client().await?;
+ let table_ident = TableIdent::new(namespace.clone(),
creation.name.clone());
+ let mut properties = creation.properties;
+ properties.insert(
+
iceberg::spec::TableProperties::PROPERTY_FORMAT_VERSION.to_string(),
+ (creation.format_version as u8).to_string(),
+ );
+ let request = HttpRequest::build(
+ client
+ .http_client
+ .request(Method::POST,
client.config.tables_endpoint(namespace))
+ .json(&CreateTableRequest {
+ name: creation.name,
+ location: creation.location,
+ schema: creation.schema,
+ partition_spec: creation.partition_spec,
+ write_order: creation.sort_order,
+ stage_create: Some(stage_create),
Review Comment:
Only change compared to the old method
--
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]