slinkydeveloper commented on a change in pull request #19113:
URL: https://github.com/apache/flink/pull/19113#discussion_r829789101



##########
File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/AggregateUtil.scala
##########
@@ -712,16 +712,14 @@ object AggregateUtil extends Enumeration {
     }
 
     // count(*) not exist in aggregateCalls, insert a count(*) in it.
-    val typeFactory = new FlinkTypeFactory(new FlinkTypeSystem)
     if (indexOfCountStar.isEmpty) {
-
       val count1 = AggregateCall.create(
         SqlStdOperatorTable.COUNT,
         false,
         false,
         new util.ArrayList[Integer](),
         -1,
-        typeFactory.createFieldTypeFromLogicalType(new BigIntType()),
+        new BasicSqlType(FlinkTypeSystem.INSTANCE, SqlTypeName.BIGINT),

Review comment:
       Are you sure? I just tried this on the debugger:
   
   ```
   new BasicSqlType(FlinkTypeSystem.INSTANCE(), SqlTypeName.BIGINT)
     .equals(flinkTypeFactory.createFieldTypeFromLogicalType(new 
BigIntType().copy(false))
   ```
   
   And It's true. 
   
   I also debugged `canonize` and that function for `BasicSqlType` is always 
no-op, the `canonize` function is doing something only for `ObjectSqlType`




-- 
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]


Reply via email to