Skip to content

[fix](mtmv) Fix table id overturn and optimize get table qualifier method (#34768)#35381

Merged
morrySnow merged 1 commit intoapache:branch-2.1from
seawinde:fix_table_id_long_over_cherry_pick_21
May 24, 2024
Merged

[fix](mtmv) Fix table id overturn and optimize get table qualifier method (#34768)#35381
morrySnow merged 1 commit intoapache:branch-2.1from
seawinde:fix_table_id_long_over_cherry_pick_21

Conversation

@seawinde
Copy link
Member

Proposed changes

commitid: 806e241
pr: #34768

Table id may be the same but actually they are different tables. so we optimize the org.apache.doris.nereids.rules.exploration.mv.mapping.RelationMapping#getTableQualifier with following code:

Objects.hash(table.getDatabase().getCatalog().getId(), table.getDatabase().getId(), table.getId())

table id is long, we identify the table used in mv rewrite is bitSet. the bitSet can only use int, so we mapping the long id to init id in every query when mv rewrite

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

…thod (apache#34768)

Table id may be the same but actually they are different tables. so we optimize the
org.apache.doris.nereids.rules.exploration.mv.mapping.RelationMapping#getTableQualifier with following code:

Objects.hash(table.getDatabase().getCatalog().getId(), table.getDatabase().getId(), table.getId())

table id is long, we identify the table used in mv rewrite is bitSet. the bitSet can only use int, so we mapping the long id to init id in every query when mv rewrite
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@morrySnow morrySnow merged commit 9af493f into apache:branch-2.1 May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants