You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "thexiay (via GitHub)" <gi...@apache.org> on 2023/05/31 02:58:34 UTC

[GitHub] [incubator-paimon] thexiay opened a new issue, #1267: [Feature] Support for schema evolution commit snapshot

thexiay opened a new issue, #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/incubator-paimon/issues) and found nothing similar.
   
   
   ### Motivation
   
   Currently paimon does not support the snapshot submission of the schema evolution type. There may be some problems with this. Currently, before the snapshot is submitted, the latest file under the schema is searched, and then it is used as the schema id of this snapshot.
   
   Maybe the instant of committing schema changes is not the time when you really want to make schema changes. This situation is especially obvious during the process of database table synchronization. for example:
   ```
   schema:
   (
       id int,
       name string,
       age int
   )
   ->
   (
       id int,
       name string
   )
   ```
   
   ```
   input data:
   (1, 'xixi', 20),
   (2, 'haha', 21),
   (3, 'ooo')
   ```
   In fact, schema evolution occurs between the second piece of data and the third piece of data, but the snapshot commit may occur at the end of the third piece of data, then the age field may have been able to be queried, but because the latest snapshot is used when submitting schema file, so the age field is hidden and cannot be queried.
   
   ### Solution
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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@paimon.apache.org.apache.org

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


[GitHub] [incubator-paimon] JingsongLi commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569789616

   > > Can you just create two commits for this case?
   > 
   > input datas:
   > 
   > ```
   > (1, 'xixi', 20),
   > (2, 'haha', 21),
   > (schema change: id, name, age -> id, name)
   > (3, 'ooo')
   > ```
   > 
   > schema has two:
   > 
   > ```
   > schema-1:
   > (id int, name string, age int)
   > schema-2:
   > (id int, name string)
   > ```
   > 
   > currenttly snapshot commited now maybe:
   > 
   > ```
   > snapshot-1(with schema-2)(CommitKind.APPEND)
   > ```
   > 
   > so if you query snapshot-1, you will found age disapper.
   > 
   > but if with `schema evolution` snapshot , it maybe look like:
   > 
   > ```
   > snapshot-1(with schema-1)(CommitKind.APPEND)
   > snapshot-2(with schema-2)(CommitKind.SCHEMA_CHANGE)
   > snapshot-3(with schema-2)(CommitKind.APPEND)
   > ```
   
   Paimon just control schema separately. You can take a look to: https://paimon.apache.org/docs/master/concepts/file-operations/
   
   So here we can just create two commits:
   snapshot-1(with schema-1)
   snapshot-2(with schema-2)
   


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] JingsongLi closed issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed issue #1267: [Feature] Support for schema evolution commit snapshot
URL: https://github.com/apache/incubator-paimon/issues/1267


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] thexiay commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "thexiay (via GitHub)" <gi...@apache.org>.
thexiay commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569773202

   > What is the behavior of `schema evolution` snapshot?
   
   The behavior of `schema evolution` snapshot is just modify the schema.And the data, manifest  all of those do not change.


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] JingsongLi commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569760717

   Can you just create two commits for this case? 


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] thexiay commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "thexiay (via GitHub)" <gi...@apache.org>.
thexiay commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569805484

   > Paimon just control schema separately. You can take a look to: https://paimon.apache.org/docs/master/concepts/file-operations/
   > 
   > So here we can just create two commits: snapshot-1(with schema-1) snapshot-2(with schema-2)
   
   Do you mean that a new snapshot will be forced to be committed after the schema file generated? I'm going to try this case.
   
   


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] JingsongLi commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569809289

   Yes


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] JingsongLi commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569756927

   What is the behavior of `schema evolution` snapshot?


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] thexiay commented on issue #1267: [Feature] Support for schema evolution commit snapshot

Posted by "thexiay (via GitHub)" <gi...@apache.org>.
thexiay commented on issue #1267:
URL: https://github.com/apache/incubator-paimon/issues/1267#issuecomment-1569782342

   > Can you just create two commits for this case?
   
   input datas:
   ```
   (1, 'xixi', 20),
   (2, 'haha', 21),
   (schema change: id, name, age -> id, name)
   (3, 'ooo')
   ```
   
   schema has two:
   ```
   schema-1:
   (id int, name string, age int)
   schema-2:
   (id int, name string)
   ```
   
   currenttly snapshot commited now maybe:
   ```
   snapshot-1(with schema-2)(CommitKind.APPEND)
   ```
   
   so if you query snapshot-1, you will found age disapper.
   
   but if with `schema evolution` snapshot , it maybe look like:
   ```
   snapshot-1(with schema-1)(CommitKind.APPEND)
   snapshot-2(with schema-2)(CommitKind.SCHEMA_CHANGE)
   snapshot-3(with schema-2)(CommitKind.APPEND)
   ```


-- 
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@paimon.apache.org

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