Skip to content

[fix](planner)fix 'char' function's toSql implementation is wrong - #23860

Merged
xiaokang merged 2 commits into
apache:masterfrom
starocean999:master_bug_0824
Sep 6, 2023
Merged

[fix](planner)fix 'char' function's toSql implementation is wrong#23860
xiaokang merged 2 commits into
apache:masterfrom
starocean999:master_bug_0824

Conversation

@starocean999

Copy link
Copy Markdown
Contributor

Proposed changes

create view vv1 as select char(k2) from t2;

The create view sql should be:

CREATE VIEW vv1 COMMENT 'VIEW' AS SELECT char(k2 using utf8) AS char(``k2`` using utf8) FROM default_cluster:tt.t2;

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

@starocean999

Copy link
Copy Markdown
ContributorAuthor

run buildall

}
}
sb.append(" using ");
sb.append(children.get(0).toSql().replace("'", "")).append(")");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should use substr() to remove the first and the last character. replace will generate wrong sql, think about 'ab\'c'

@starocean999

Copy link
Copy Markdown
ContributorAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 48.42 seconds
stream load tsv: 529 seconds loaded 74807831229 Bytes, about 134 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 64 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162002195 Bytes

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Sep 6, 2023

@xiaokangxiaokang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@xiaokang
xiaokang merged commit cb9acf4 into apache:masterSep 6, 2023
@xiaokangxiaokang mentioned this pull request Sep 28, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/2.0.2-mergedp0_wreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@starocean999@doris-robot@xiaokang@morrySnow