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

Schema does not match if explain insert statement with partial column

    XMLWordPrintableJSON

Details

    Description

      create table MyTable (a int, b int) with ('connector' = 'datagen');
      create table MySink (c int, d int) with ('connector' = 'print');
      explain plan for insert into MySink(d) select a from MyTable where a > 10;

      If execute the above statement, we will get the following exception

      org.apache.flink.table.api.ValidationException: Column types of query result and sink for registered table 'default_catalog.default_database.MySink' do not match.
      Cause: Different number of columns.

      Query schema: [a: BIGINT]
      Sink schema: [d: BIGINT, e: INT]

      Attachments

        Issue Links

          Activity

            People

              godfreyhe godfrey he
              godfreyhe godfrey he
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: