morningman commented on a change in pull request #7255:
URL: https://github.com/apache/incubator-doris/pull/7255#discussion_r767164027
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/analysis/LateralViewRef.java
##########
@@ -77,32 +77,31 @@ public void analyze(Analyzer analyzer) throws UserException
{
if (!(expr instanceof FunctionCallExpr)) {
throw new AnalysisException("Only support function call expr in
lateral view");
}
+
+ analyzeFunctionExpr(analyzer);
+
+ // analyze lateral view
+ desc = analyzer.registerTableRef(this);
+ explodeSlotRef = new SlotRef(new TableName(null, viewName),
columnName);
+ explodeSlotRef.analyze(analyzer);
+ isAnalyzed = true; // true now that we have assigned desc
+ }
+
+ private void analyzeFunctionExpr(Analyzer analyzer) throws
AnalysisException {
fnExpr = (FunctionCallExpr) expr;
fnExpr.setTableFnCall(true);
checkAndSupplyDefaultTableName(fnExpr);
fnExpr.analyze(analyzer);
- if
(!fnExpr.getFnName().getFunction().equals(FunctionSet.EXPLODE_SPLIT)) {
- throw new AnalysisException("Only support explode function in
lateral view");
- }
checkScalarFunction(fnExpr.getChild(0));
- if (!(fnExpr.getChild(1) instanceof StringLiteral)) {
Review comment:
> The child(1) of explode_split must be a string literal.
No, the child(1) maybe a SlotRef.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]