Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ WHERE NOT array_contains(col, 99999)
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ WHERE col != 'ABCD'
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand All @@ -584,7 +584,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ WHERE col != 'ABCD'
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand All @@ -580,7 +580,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down Expand Up @@ -442,7 +442,7 @@ WHERE NOT array_contains(col, 99999)
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand All @@ -462,7 +462,7 @@ WHERE NOT array_contains(col, 99999)
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down Expand Up @@ -442,7 +442,7 @@ WHERE NOT array_contains(col, 99999)
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down Expand Up @@ -563,7 +563,7 @@ WHERE col != 'ABCD'
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand All @@ -584,7 +584,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down Expand Up @@ -438,7 +438,7 @@ WHERE NOT array_contains(col, 99999)
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down Expand Up @@ -559,7 +559,7 @@ WHERE col != 'ABCD'
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand All @@ -580,7 +580,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 2 |
| 3 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ WHERE col != 99999
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down Expand Up @@ -438,7 +438,7 @@ WHERE NOT array_contains(col, 99999)
+-----+
| cnt |
+-----+
| 0 |
| 1 |
+-----+
(1 row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static class ArrayConcatAggFunction extends SqlAggFunction
NAME,
null,
SqlKind.OTHER_FUNCTION,
ReturnTypes.ARG0,
ReturnTypes.ARG0_FORCE_NULLABLE,
InferTypes.ANY_NULLABLE,
OperandTypes.or(
OperandTypes.ARRAY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.collect.ImmutableSet;
import org.apache.calcite.rel.core.AggregateCall;
import org.apache.calcite.rel.type.RelDataType;
import org.apache.calcite.rel.type.RelDataTypeFactory;
import org.apache.calcite.rex.RexLiteral;
import org.apache.calcite.rex.RexNode;
import org.apache.calcite.sql.SqlAggFunction;
Expand Down Expand Up @@ -159,11 +160,9 @@ static class ArrayAggReturnTypeInference implements SqlReturnTypeInference
@Override
public RelDataType inferReturnType(SqlOperatorBinding sqlOperatorBinding)
{
RelDataType type = sqlOperatorBinding.getOperandType(0);
return sqlOperatorBinding.getTypeFactory().createArrayType(
type,
-1
);
final RelDataType type = sqlOperatorBinding.getOperandType(0);
final RelDataTypeFactory typeFactory = sqlOperatorBinding.getTypeFactory();
return typeFactory.createTypeWithNullability(typeFactory.createArrayType(type, -1), true);
}
}

Expand Down