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

Broker load supports function #1592

Merged
merged 12 commits into from
Aug 9, 2019

Conversation

EmmyMiao87
Copy link
Contributor

The commit support the column function in broker load.
The grammar of LoadStmt has not been changed.
Example:
columns terminated by ',' (tmp_c1, tmp_c2) set (c1=tmp_c1+tmp_c2)

Also, the old function is compatible such as default_value, strftime etc.
After this commit, there are no difference in column function between stream load and broker load except old function.

fe/src/main/cup/sql_parser.cup Outdated Show resolved Hide resolved
fe/src/main/java/org/apache/doris/analysis/Expr.java Outdated Show resolved Hide resolved
* If the db or table could not be found, the Broker load job will be cancelled.
*/
@Override
public void analyze() {
Copy link
Contributor

Choose a reason for hiding this comment

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

how about old persisted Job? Analyze failed?

private List<String> fileFieldNames;
private List<String> filePaths;

// This column need expression to get column
// this is a compatible param which only happens before the function of broker has been supported.
private Map<String, Expr> exprColumnMap;
Copy link
Contributor

Choose a reason for hiding this comment

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

exprColumnMap does not use anymore?
If yes, delete it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it is used for previous load job.

}
ImportColumnDesc importColumnDesc = new ImportColumnDesc(column, child1);
parsedColumnExprList.add(importColumnDesc);
analyzeColumnToFunction(column, child1);
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is not a hadoop load, do we need to call this function ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the columnToFunction is also used by the check function.
The check function is mainly used for checking the correctness of column expr.
Example: the column which is not defined in columns and column mapping has default value or not.
So maybe the columnToFunction still has been used in hadoop and broker load.
The annotation of columnToFunction need to be changed.

EmmyMiao87 and others added 9 commits August 8, 2019 20:52
The commit support the column function in broker load.
The grammar of LoadStmt has not been changed.
Example:
columns terminated by ',' (tmp_c1, tmp_c2) set (c1=tmp_c1+tmp_c2)

Also, the old function is compatible such as default_value, strftime etc.
After this commit, there are no difference in column function between stream load and broker load except old function.
Co-Authored-By: Mingyu Chen <morningman@163.com>
imay
imay previously approved these changes Aug 8, 2019
Copy link
Contributor

@imay imay left a comment

Choose a reason for hiding this comment

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

LGTM

morningman
morningman previously approved these changes Aug 8, 2019
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@EmmyMiao87 EmmyMiao87 dismissed stale reviews from morningman and imay via 21024d6 August 9, 2019 02:40
@morningman morningman closed this Aug 9, 2019
@morningman morningman reopened this Aug 9, 2019
@EmmyMiao87 EmmyMiao87 closed this Aug 9, 2019
@EmmyMiao87 EmmyMiao87 reopened this Aug 9, 2019
@morningman morningman merged commit add6266 into apache:master Aug 9, 2019
@imay imay mentioned this pull request Sep 26, 2019
SWJTU-ZhangLei pushed a commit to SWJTU-ZhangLei/incubator-doris that referenced this pull request Jul 25, 2023
…pache#17815)" (apache#1592)

fix failed to create view when use window function because the view string contains slot id and which cannot be parsed.

Co-authored-by: mch_ucchi <41606806+sohardforaname@users.noreply.github.com>
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