You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "my-vegetable-has-exploded (via GitHub)" <gi...@apache.org> on 2023/11/26 04:10:27 UTC
[PR] feat: support UnboundPartitionSpec [iceberg-rust]
my-vegetable-has-exploded opened a new pull request, #106:
URL: https://github.com/apache/iceberg-rust/pull/106
close #98
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "my-vegetable-has-exploded (via GitHub)" <gi...@apache.org>.
my-vegetable-has-exploded commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1410082084
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,6 +62,99 @@ impl PartitionSpec {
}
}
+static PARTITION_DATA_ID_START: i32 = 1000;
+
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
Review Comment:
I don't find a neat way to add ``` #[builder(setter(each(name = "with_partition_field")))]``` in TypedBuilder.
Accoding to [this](https://github.com/idanarye/rust-typed-builder/blob/168e076bae35399040a1c973901161023e48e13b/src/lib.rs#L218C19-L218C27), it may need to use mutators?
Maybe we can try later?
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#issuecomment-1839889064
cc @Fokko PTAL, I think this is ready for review
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "my-vegetable-has-exploded (via GitHub)" <gi...@apache.org>.
my-vegetable-has-exploded commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1410103369
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,6 +60,44 @@ impl PartitionSpec {
}
}
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ #[builder(default, setter(strip_option))]
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
+#[serde(rename_all = "kebab-case")]
+#[builder(setter(prefix = "with"))]
+/// Unbound partition spec can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionSpec {
Review Comment:
Sure!
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#issuecomment-1845257956
Thanks @my-vegetable-has-exploded for working on this, and @liurenjie1024 and @Xuanwo for reviewing this 👍
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1418814937
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
I think this `field_id` in request is optional?
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1419858086
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
Thanks for the reference, I saw the comments now. But I think in the rest api request, it's reasonable to make it optional, and ask the server to assign a meaningful field id to 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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1410088445
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,6 +60,44 @@ impl PartitionSpec {
}
}
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ #[builder(default, setter(strip_option))]
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
+#[serde(rename_all = "kebab-case")]
+#[builder(setter(prefix = "with"))]
+/// Unbound partition spec can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionSpec {
Review Comment:
Could you add a test of ser/de from json for this?
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1414797588
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,13 +60,51 @@ impl PartitionSpec {
}
}
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ #[builder(default, setter(strip_option))]
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
+#[serde(rename_all = "kebab-case")]
+#[builder(setter(prefix = "with"))]
+/// Unbound partition spec can be built without a schema and later bound to a schema.
Review Comment:
ditto.
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,13 +60,51 @@ impl PartitionSpec {
}
}
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
Review Comment:
Pleae add comments before `derive` for better reading:
```rust
/// Unbound partition field can be built without a schema and later bound to a schema.
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)]
#[serde(rename_all = "kebab-case")]
pub struct UnboundPartitionField { ...
```
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "my-vegetable-has-exploded (via GitHub)" <gi...@apache.org>.
my-vegetable-has-exploded commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1410083813
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,6 +62,99 @@ impl PartitionSpec {
}
}
+static PARTITION_DATA_ID_START: i32 = 1000;
+
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
+#[serde(rename_all = "kebab-case")]
+#[builder(setter(prefix = "with"))]
+/// Unbound partition spec can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionSpec {
+ /// Identifier for PartitionSpec
+ pub spec_id: Option<i32>,
+ /// Details of the partition spec
+ #[builder(setter(each(name = "with_unbound_partition_field")))]
+ pub fields: Vec<UnboundPartitionField>,
+}
+
+impl UnboundPartitionSpec {
+ /// last assigned id for partitioned field
+ pub fn unpartitioned_last_assigned_id() -> i32 {
+ PARTITION_DATA_ID_START - 1
+ }
+
+ /// Create unbound partition spec builer
+ pub fn builder() -> UnboundPartitionSpecBuilder {
+ UnboundPartitionSpecBuilder::default()
+ }
+
+ /// Bind unbound partition spec to a schema
+ pub fn bind(&self, schema: SchemaRef) -> Result<PartitionSpec> {
Review Comment:
I'm also a little confused about the process. If there's a need, I can try it then. Thanks @liurenjie1024.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1405573783
##########
crates/iceberg/src/error.rs:
##########
@@ -33,6 +33,8 @@ pub enum ErrorKind {
/// service error.
Unexpected,
+ /// Iceberg finds some conflict when checking.
+ Conflict,
Review Comment:
I think this is same as `InvalidData`?
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,6 +62,99 @@ impl PartitionSpec {
}
}
+static PARTITION_DATA_ID_START: i32 = 1000;
+
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
Review Comment:
Use `TypedBuilder`?
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,6 +62,99 @@ impl PartitionSpec {
}
}
+static PARTITION_DATA_ID_START: i32 = 1000;
+
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionField {
+ /// A source column id from the table’s schema
+ pub source_id: i32,
+ /// A partition field id that is used to identify a partition field and is unique within a partition spec.
+ /// In v2 table metadata, it is unique across all partition specs.
+ pub partition_id: Option<i32>,
+ /// A partition name.
+ pub name: String,
+ /// A transform that is applied to the source column to produce a partition value.
+ pub transform: Transform,
+}
+
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Default, Builder)]
+#[serde(rename_all = "kebab-case")]
+#[builder(setter(prefix = "with"))]
+/// Unbound partition spec can be built without a schema and later bound to a schema.
+pub struct UnboundPartitionSpec {
+ /// Identifier for PartitionSpec
+ pub spec_id: Option<i32>,
+ /// Details of the partition spec
+ #[builder(setter(each(name = "with_unbound_partition_field")))]
+ pub fields: Vec<UnboundPartitionField>,
+}
+
+impl UnboundPartitionSpec {
+ /// last assigned id for partitioned field
+ pub fn unpartitioned_last_assigned_id() -> i32 {
+ PARTITION_DATA_ID_START - 1
+ }
+
+ /// Create unbound partition spec builer
+ pub fn builder() -> UnboundPartitionSpecBuilder {
+ UnboundPartitionSpecBuilder::default()
+ }
+
+ /// Bind unbound partition spec to a schema
+ pub fn bind(&self, schema: SchemaRef) -> Result<PartitionSpec> {
Review Comment:
In fact, I'm hesitating to implement `bind` method for now since I don't know if it's really useful, maybe we should implement it later when necessary?
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1418802658
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
Why remove these? They are part of the `PartitionField`: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.py#L131-L135
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1418824322
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
It looks like it is for historical reasons. For old specs they can be missing, and they'll just auto-increment.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1418820203
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
The open-api spec is a bit unclear, but it isn't right now:
https://github.com/apache/iceberg/blob/af9522ac7e8e25dc044622c566b66301b6df9581/open-api/rest-catalog-open-api.py#L283-L284
References:
https://github.com/apache/iceberg/blob/af9522ac7e8e25dc044622c566b66301b6df9581/open-api/rest-catalog-open-api.py#L138-L140
References:
https://github.com/apache/iceberg/blob/af9522ac7e8e25dc044622c566b66301b6df9581/open-api/rest-catalog-open-api.py#L131-L135
And there it is non-optional.
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1418823234
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
On Java:
https://github.com/apache/iceberg/blob/af9522ac7e8e25dc044622c566b66301b6df9581/core/src/main/java/org/apache/iceberg/MetadataUpdateParser.java#L447-L451
And there it is optional:
https://github.com/apache/iceberg/blob/af9522ac7e8e25dc044622c566b66301b6df9581/core/src/main/java/org/apache/iceberg/PartitionSpecParser.java#L128-L145
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1418888983
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -758,23 +760,19 @@ mod tests {
{
"action": "add-spec",
"spec": {
- "spec-id": 1,
"fields": [
{
"source-id": 4,
- "field-id": 1000,
Review Comment:
BTW, cleaned up the spec a bit: https://github.com/apache/iceberg/pull/9240
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: support UnboundPartitionSpec [iceberg-rust]
Posted by "my-vegetable-has-exploded (via GitHub)" <gi...@apache.org>.
my-vegetable-has-exploded commented on code in PR #106:
URL: https://github.com/apache/iceberg-rust/pull/106#discussion_r1414825717
##########
crates/iceberg/src/spec/partition.rs:
##########
@@ -60,13 +60,51 @@ impl PartitionSpec {
}
}
+/// Reference to [`UnboundPartitionSpec`].
+pub type UnboundPartitionSpecRef = Arc<UnboundPartitionSpec>;
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, TypedBuilder)]
+#[serde(rename_all = "kebab-case")]
+/// Unbound partition field can be built without a schema and later bound to a schema.
Review Comment:
get 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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org