You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/18 08:36:15 UTC

[GitHub] [flink] slinkydeveloper commented on a change in pull request #19113: [FLINK-26519][table] Remove FlinkTypeFactory singleton

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org