You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JackeyLee007 (via GitHub)" <gi...@apache.org> on 2024/10/25 11:30:47 UTC
[I] [Bug] fall-back branch does not work [paimon]
JackeyLee007 opened a new issue, #4384:
URL: https://github.com/apache/paimon/issues/4384
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Paimon version
1.0-SNAPSHOT
### Compute Engine
flink 1.18.1
### Minimal reproduce step
Just as the steps described in [doc](https://paimon.apache.org/docs/master/maintenance/manage-branches/)
```-- create Paimon table
CREATE TABLE T (
dt STRING NOT NULL,
name STRING NOT NULL,
amount BIGINT
) PARTITIONED BY (dt);
-- create a branch for streaming job
CALL sys.create_branch('default.T', 'test');
-- set primary key and bucket number for the branch
ALTER TABLE `T$branch_test` SET (
'primary-key' = 'dt,name',
'bucket' = '2',
'changelog-producer' = 'lookup'
);
-- set fallback branch
ALTER TABLE T SET (
'scan.fallback-branch' = 'test'
);
-- write records into the streaming branch
INSERT INTO `T$branch_test` VALUES ('20240725', 'apple', 4), ('20240725', 'peach', 10), ('20240726', 'cherry', 3), ('20240726', 'pear', 6);
-- write records into the default branch
INSERT INTO T VALUES ('20240725', 'apple', 5), ('20240725', 'banana', 7);
SELECT * FROM T;
### What doesn't meet your expectations?
Expect union result from both T and T$branch_test, like the following:
/*
+------------------+------------------+--------+
| dt | name | amount |
+------------------+------------------+--------+
| 20240725 | apple | 5 |
| 20240725 | peach| 10|
| 20240725 | banana | 7 |
| 20240726 | cherry | 3 |
| 20240726 | pear | 6 |
+------------------+------------------+--------+
*/
But only got data from T,
/*
+------------------+------------------+--------+
| dt | name | amount |
+------------------+------------------+--------+
| 20240725 | apple | 5 |
| 20240725 | banana | 7 |
+------------------+------------------+--------+
*/
### Anything else?
Only got union result after fast-forward:
CALL sys.fast_forward('default.T', 'test');
### 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
Re: [I] [Bug] fall-back branch does not work [paimon]
Posted by "JackeyLee007 (via GitHub)" <gi...@apache.org>.
JackeyLee007 closed issue #4384: [Bug] fall-back branch does not work
URL: https://github.com/apache/paimon/issues/4384
--
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: [I] [Bug] fall-back branch does not work [paimon]
Posted by "gmdfalk (via GitHub)" <gi...@apache.org>.
gmdfalk commented on issue #4384:
URL: https://github.com/apache/paimon/issues/4384#issuecomment-2446359853
isn't that expected behaviour?
until you do a `fast_forward` the main branch `T` will be completely separate from `T$branch_test` and thus selecting from it will not show any union of the 2 separate branches.
--
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: [I] [Bug] fall-back branch does not work [paimon]
Posted by "JackeyLee007 (via GitHub)" <gi...@apache.org>.
JackeyLee007 commented on issue #4384:
URL: https://github.com/apache/paimon/issues/4384#issuecomment-2452095337
It's Not Expected according to the document.
It should union the found partition with the fallback branch, that's the reason why invent fallback branch.
--
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: [I] [Bug] fall-back branch does not work [paimon]
Posted by "JackeyLee007 (via GitHub)" <gi...@apache.org>.
JackeyLee007 commented on issue #4384:
URL: https://github.com/apache/paimon/issues/4384#issuecomment-2466770631
Sorry for the missleading. It's my fault.
The fallback query should be executed in batch mode, not streaming mode.
--
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