You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "geruh (via GitHub)" <gi...@apache.org> on 2024/10/09 08:59:35 UTC

[PR] OpenAPI: Define REST Catalog models for Row-Level Updates [iceberg]

geruh opened a new pull request, #11287:
URL: https://github.com/apache/iceberg/pull/11287

   Currently, Iceberg handles data commit operations like `AppendFiles`, `DeleteFiles`, and `OverwriteFiles` with through
   separate classes. However, all of these converge in Iceberg’s snapshot creation or update logic, which is responsible for tracking changes such as adding, removing, or replacing files. This logic collects the necessary information to produce a new snapshot and append it to the table.
   
   In the previous proposal for RESTful data commits, we aimed to move this snapshot production to the server side. However, that implementation missed some key details to make this fully achievable. Now, by re-framing this implementation to focus on row level changes in the table. The new question becomes what file changes, validations, or information does the server need to effectively produce a new snapshot?
   
   This proposal unifies these operations under a single model, `OverwriteRowsUpdate`, allowing the server to manage the creation of snapshots directly.
   
   By consolidating operations (e.g., insert, remove, overwrite) into a single REST-based model, we simplify the commit process. The server will validate changes, apply them, and produce a new snapshot. With this approach we can move snapshot production to the server while ensuring the correct validations are enforced for each type of operation.
   
   
   


-- 
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] OpenAPI: Define REST Catalog models for Row-Level Updates [iceberg]

Posted by "jackye1995 (via GitHub)" <gi...@apache.org>.
jackye1995 commented on code in PR #11287:
URL: https://github.com/apache/iceberg/pull/11287#discussion_r1793872507


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3082,6 +3132,47 @@ components:
         default-sort-order-id:
           type: integer
 
+    AssertOverwriteRows:
+      description:
+        This validation helps ensure that overwrite row updates are aligned with the current state of the table.
+        It checks that no conflicting data has been added, deleted, or modified since the operation began. 
+        A conflict detection filter can be applied to identify overlapping data changes, helping to ensure
+        that the update modifies only the intended rows. This validation is optional and may not be required 
+        for certain operations, such as append only table updates
+      required:
+        - type
+      properties:
+        type:
+          type: string
+          enum: [ "assert-overwrite-rows" ]
+        conflict-detection-filter:

Review Comment:
   I think having separated requirements like AssertNoConflictWithFilter, AssertNoConflictingDeletes, etc. seems more modular and they could potentially be reused in other update types? Curious what others think. 



-- 
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] OpenAPI: Define REST Catalog models for Snapshot Production [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11287:
URL: https://github.com/apache/iceberg/pull/11287#issuecomment-2495133597

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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] OpenAPI: Define REST Catalog models for Snapshot Production [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11287:
URL: https://github.com/apache/iceberg/pull/11287#issuecomment-2508748334

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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] OpenAPI: Define REST Catalog models for Row-Level Updates [iceberg]

Posted by "geruh (via GitHub)" <gi...@apache.org>.
geruh commented on code in PR #11287:
URL: https://github.com/apache/iceberg/pull/11287#discussion_r1793870830


##########
open-api/rest-catalog-open-api.py:
##########
@@ -896,19 +896,6 @@ class SetPartitionStatisticsUpdate(BaseUpdate):
     )
 
 
-class TableRequirement(BaseModel):

Review Comment:
   It wasn't removed just moved down in the file due to `make generate`
   
   https://github.com/apache/iceberg/pull/11287/files#diff-ffc6f59bffb61af69bc4ef19c7b28c9fefe015b2716b35db1deb6a5a884ca4feR1196



-- 
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] OpenAPI: Define REST Catalog models for Row-Level Updates [iceberg]

Posted by "jackye1995 (via GitHub)" <gi...@apache.org>.
jackye1995 commented on code in PR #11287:
URL: https://github.com/apache/iceberg/pull/11287#discussion_r1793868108


##########
open-api/rest-catalog-open-api.py:
##########
@@ -896,19 +896,6 @@ class SetPartitionStatisticsUpdate(BaseUpdate):
     )
 
 
-class TableRequirement(BaseModel):

Review Comment:
   This should not be removed?



-- 
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] OpenAPI: Define REST Catalog models for Snapshot Production [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #11287: OpenAPI: Define REST Catalog models for Snapshot Production
URL: https://github.com/apache/iceberg/pull/11287


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