Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix](planner)fix incorrect nullable in ctas. #22770

Merged
merged 11 commits into from
Aug 21, 2023

Conversation

sohardforaname
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

ctas with outer join like

create table a (
        id int not null,
        name varchar(20) not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

create table b (
        id int not null,
        age int not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

insert into a values(1, 'ww'), (2, 'zs');
insert into b values(1, 22);

create table c properties("replication_num"="1") as select a.id, a.name, b.age from a left join b on a.id = b.id;

the column 'age' in c is not null, but nullable is expected, we fix it by use the nullable mode of the outputs of root plan fragment.

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

@sohardforaname
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.28 seconds
stream load tsv: 507 seconds loaded 74807831229 Bytes, about 140 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 66 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.4 seconds inserted 10000000 Rows, about 340K ops/s
storage size: 17162483244 Bytes

@sohardforaname
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47.57 seconds
stream load tsv: 511 seconds loaded 74807831229 Bytes, about 139 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.3 seconds inserted 10000000 Rows, about 341K ops/s
storage size: 17162540139 Bytes

@sohardforaname
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.42 seconds
stream load tsv: 510 seconds loaded 74807831229 Bytes, about 139 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162199590 Bytes

@sohardforaname
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.99 seconds
stream load tsv: 511 seconds loaded 74807831229 Bytes, about 139 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.2 seconds inserted 10000000 Rows, about 342K ops/s
storage size: 17161891481 Bytes

@sohardforaname
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.56 seconds
stream load tsv: 510 seconds loaded 74807831229 Bytes, about 139 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 68 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.4 seconds inserted 10000000 Rows, about 340K ops/s
storage size: 17162142474 Bytes

@sohardforaname
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.28 seconds
stream load tsv: 545 seconds loaded 74807831229 Bytes, about 130 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 100.0 seconds inserted 10000000 Rows, about 100K ops/s
storage size: 17162138601 Bytes

@morrySnow morrySnow added usercase Important user case type label dev/1.2.7 dev/2.0.2 labels Aug 16, 2023
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Aug 16, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morrySnow morrySnow merged commit db5a622 into apache:master Aug 21, 2023
18 of 20 checks passed
xiaokang pushed a commit that referenced this pull request Aug 21, 2023
ctas with outer join like
```sql
create table a (
        id int not null,
        name varchar(20) not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

create table b (
        id int not null,
        age int not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

insert into a values(1, 'ww'), (2, 'zs');
insert into b values(1, 22);

create table c properties("replication_num"="1") as select a.id, a.name, b.age from a left join b on a.id = b.id;
```
the column 'age' in c is not null, but nullable is expected, we fix it by use the nullable mode of the outputs of root plan fragment.
morningman pushed a commit that referenced this pull request Aug 27, 2023
ctas with outer join like
```sql
create table a (
        id int not null,
        name varchar(20) not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

create table b (
        id int not null,
        age int not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

insert into a values(1, 'ww'), (2, 'zs');
insert into b values(1, 22);

create table c properties("replication_num"="1") as select a.id, a.name, b.age from a left join b on a.id = b.id;
```
the column 'age' in c is not null, but nullable is expected, we fix it by use the nullable mode of the outputs of root plan fragment.
GoGoWen pushed a commit to GoGoWen/incubator-doris that referenced this pull request Sep 7, 2023
ctas with outer join like
```sql
create table a (
        id int not null,
        name varchar(20) not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

create table b (
        id int not null,
        age int not null
)
distributed by hash(id) buckets 4
properties (
        "replication_num"="1"
);

insert into a values(1, 'ww'), (2, 'zs');
insert into b values(1, 22);

create table c properties("replication_num"="1") as select a.id, a.name, b.age from a left join b on a.id = b.id;
```
the column 'age' in c is not null, but nullable is expected, we fix it by use the nullable mode of the outputs of root plan fragment.
GoGoWen pushed a commit to GoGoWen/incubator-doris that referenced this pull request Sep 7, 2023
morrySnow added a commit to morrySnow/incubator-doris that referenced this pull request Sep 22, 2023
if previous PR apache#22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
morrySnow added a commit that referenced this pull request Sep 22, 2023
…ble (#24767)

if previous PR #22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
xiaokang pushed a commit that referenced this pull request Sep 22, 2023
…ble (#24767)

if previous PR #22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
xiaokang pushed a commit that referenced this pull request Sep 23, 2023
…ble (#24767)

if previous PR #22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
morningman pushed a commit that referenced this pull request Sep 23, 2023
…ble (#24767)

if previous PR #22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
htyoung pushed a commit to htyoung/doris that referenced this pull request Nov 11, 2023
…ble (apache#24767)

if previous PR apache#22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
GoGoWen pushed a commit to GoGoWen/incubator-doris that referenced this pull request Dec 11, 2023
…ble (apache#24767)

if previous PR apache#22770. we try to fix incorrect nullable in target table.
However we changed nullable info of column in source table unexpectly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/1.2.7-merged dev/2.0.1-merged reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants