SteveYurongSu commented on a change in pull request #4453:
URL: https://github.com/apache/iotdb/pull/4453#discussion_r767362301
##########
File path: server/src/main/java/org/apache/iotdb/db/qp/sql/IoTDBSqlVisitor.java
##########
@@ -2651,7 +2651,8 @@ private boolean hasDecidedQueryType() {
|| queryOp instanceof FillQueryOperator
|| queryOp instanceof LastQueryOperator
|| queryOp instanceof AggregationQueryOperator
- || queryOp instanceof UDFQueryOperator;
+ || queryOp instanceof UDFQueryOperator
Review comment:
```suggestion
|| queryOp instanceof UDTFQueryOperator
```
We can rename `UDFQueryOperator` to `UDTFQueryOperator`, which is clearer.
##########
File path:
server/src/main/java/org/apache/iotdb/db/query/expression/unary/FunctionExpression.java
##########
@@ -56,6 +56,9 @@
public class FunctionExpression extends Expression {
+ private final String WRONG_TYPE_MESSAGE =
Review comment:
Remove it :D
##########
File path:
server/src/main/java/org/apache/iotdb/db/query/expression/unary/TimeSeriesOperand.java
##########
@@ -41,6 +41,8 @@
import java.util.Set;
public class TimeSeriesOperand extends Expression {
+ private final String WRONG_OPERAND_MESSAGE =
Review comment:
Remove it.
##########
File path:
server/src/main/java/org/apache/iotdb/db/query/expression/unary/NegationExpression.java
##########
@@ -67,12 +67,13 @@ public boolean isConstantOperandInternal() {
@Override
public boolean isTimeSeriesGeneratingFunctionExpression() {
- return true;
+ return !isUserDefinedAggregationExpression();
}
@Override
- public boolean isUDAFExpression() {
- return expression.isUDAFExpression() ||
expression.isAggregationFunctionExpression();
+ public boolean isUserDefinedAggregationExpression() {
+ return expression.isUserDefinedAggregationExpression()
+ || expression.isPlainAggregationFunctionExpression();
Review comment:
```suggestion
|| expression.isPlainAggregationExpression();
```
##########
File path:
server/src/main/java/org/apache/iotdb/db/query/expression/unary/ConstantOperand.java
##########
@@ -41,6 +41,8 @@
/** Constant operand */
public class ConstantOperand extends Expression {
+ private final String WRONG_TYPE_MESSAGE =
Review comment:
Remove it since it is useless :D
##########
File path:
tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/QueryDataSet.java
##########
@@ -102,7 +102,11 @@ protected void initQueryDataSetFields(
this.columnNum = 0;
if (paths != null) {
for (Path p : paths) {
- columnNum += p.getColumnNum();
+ // Path could be null in certain kinds of plans such as UDAFPlan, thus
`p != null` is
Review comment:
Could we remove the judgment?
--
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]