-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Conversation
* If the db or table could not be found, the Broker load job will be cancelled. | ||
*/ | ||
@Override | ||
public void analyze() { |
There was a problem hiding this comment.
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?
fe/src/main/java/org/apache/doris/analysis/DataDescription.java
Outdated
Show resolved
Hide resolved
fe/src/main/java/org/apache/doris/analysis/DataDescription.java
Outdated
Show resolved
Hide resolved
fe/src/main/java/org/apache/doris/analysis/DataDescription.java
Outdated
Show resolved
Hide resolved
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
fe/src/main/java/org/apache/doris/analysis/DataDescription.java
Outdated
Show resolved
Hide resolved
} | ||
ImportColumnDesc importColumnDesc = new ImportColumnDesc(column, child1); | ||
parsedColumnExprList.add(importColumnDesc); | ||
analyzeColumnToFunction(column, child1); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
fe/src/main/java/org/apache/doris/analysis/DataDescription.java
Outdated
Show resolved
Hide resolved
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>
c990f45
to
73e7737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…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>
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.