This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch iotdb-1022-v2
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/iotdb-1022-v2 by this push:
new 2a57059 fix align by device tests
2a57059 is described below
commit 2a57059c5d1c0f43cba64858ca9b580610dcacc0
Author: SteveYurongSu <[email protected]>
AuthorDate: Tue May 18 14:02:13 2021 +0800
fix align by device tests
---
.../java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java
b/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java
index a699788..4c260b9 100644
---
a/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java
+++
b/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java
@@ -112,11 +112,15 @@ public final class SelectOperator extends Operator {
}
public List<String> getAggregationFunctions() {
+ if (!hasAggregationFunction()) {
+ return null;
+ }
if (aggregationFunctionsCache == null) {
aggregationFunctionsCache = new ArrayList<>();
for (ResultColumn resultColumn : resultColumns) {
+ Expression expression = resultColumn.getExpression();
aggregationFunctionsCache.add(
- hasAggregationFunction()
+ expression instanceof FunctionExpression
? ((FunctionExpression)
resultColumn.getExpression()).getFunctionName()
: null);
}