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

DataSetAggregateWithNullValuesRule fails creating null literal for non-nullable type

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.1
    • 1.3.2, 1.4.0
    • Table SQL / API
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            twalthr Timo Walther
            rongr Rong Rong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment