Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7177

DataSetAggregateWithNullValuesRule fails creating null literal for non-nullable type

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.2, 1.4.0
    • Component/s: Table API & SQL
    • Labels:
      None

      Description

      For example:

      flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/sql/AggregationsITCase.scala
      @Test
        def testTableAggregationWithMultipleTableAPI(): Unit = {
          val env = ExecutionEnvironment.getExecutionEnvironment
          val tEnv = TableEnvironment.getTableEnvironment(env, config)
      
          val inputTable = CollectionDataSets.getSmallNestedTupleDataSet(env).toTable(tEnv, 'a, 'b)
          tEnv.registerDataSet("MyTable", inputTable)
      
          val result = tEnv.scan("MyTable")
            .where('a.get("_1") > 0)
            .select('a.get("_1").avg, 'a.get("_2").sum, 'b.count)
      
          val expected = "2,6,3"
          val results = result.toDataSet[Row].collect()
          TestBaseUtils.compareResultAsText(results.asJava, expected)
        }
      

        Attachments

          Activity

            People

            • Assignee:
              twalthr Timo Walther
              Reporter:
              walterddr Rong Rong
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: