You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "liyubin117 (via GitHub)" <gi...@apache.org> on 2025/03/03 08:30:53 UTC

[PR] [core] Support cross-partition for fallback branch feature [paimon]

liyubin117 opened a new pull request, #5198:
URL: https://github.com/apache/paimon/pull/5198

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   Support cross-partition for fallback branch feature.
   Currently, once writing into a cross-partition table which fallback branch feature enabled, 
   ```
   Flink SQL> create table part1(id int primary key not enforced, name string, dt string) partitioned by (dt);
   Flink SQL> call sys.create_branch('branch.part1', 'stream');
   Flink SQL> alter table part1 set ('scan.fallback-branch'='stream');
   Flink SQL> insert into part1 values (1,'anew','20250301'),(20, 'from stream', '20250303');
   ```
   throws exception as follow, it is caused by FallbackReadFileStoreTable#newScan return a DataTableScan instance, we should use `InnerTableScan` instead of `AbstractDataTableScan` in IndexBootstrap#bootstrap.
   ```
   Caused by: java.lang.ClassCastException: org.apache.paimon.table.FallbackReadFileStoreTable$Scan cannot be cast to org.apache.paimon.table.source.AbstractDataTableScan
   	at org.apache.paimon.crosspartition.IndexBootstrap.bootstrap(IndexBootstrap.java:87)
   	at org.apache.paimon.crosspartition.IndexBootstrap.bootstrap(IndexBootstrap.java:69)
   	at org.apache.paimon.flink.sink.index.IndexBootstrapOperator.initializeState(IndexBootstrapOperator.java:60)
   	at org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.initializeOperatorState(StreamOperatorStateHandler.java:147)
   	at org.apache.flink.streaming.api.operators.AbstractStreamOperator.initializeState(AbstractStreamOperator.java:294)
   ```
   
   <!-- Linking this pull request to the issue -->
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


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


Re: [PR] [core] Support cross-partition for fallback branch feature [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #5198:
URL: https://github.com/apache/paimon/pull/5198


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