Colin Williams created FLINK-30746:
--------------------------------------

             Summary: Flink Table / SQL Column types of query result and sink 
for do not match, but should
                 Key: FLINK-30746
                 URL: https://issues.apache.org/jira/browse/FLINK-30746
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
    Affects Versions: 1.16.0
            Reporter: Colin Williams


For the branch `table-example` in the `table-example` directory 
[https://github.com/apple-corps/recipes/tree/table-example/table-example] we 
provide a test job 
[https://github.com/apple-corps/recipes/blob/table-example/table-example/src/test/java/TableJobTest.java]

When we run the job, for example with `mvn install` we get:

```

org.apache.flink.table.api.ValidationException: 
Column types of query result and sink for 
'temporaryCatalog.default.enrichmentOut' do not match.
Cause: Incompatible types for sink column 'enrichment' at position 2.

Query schema: [id: STRING NOT NULL, status: STRING NOT NULL, ts: TIMESTAMP(3) 
*ROWTIME*, enrichment: STRING NOT NULL]
Sink schema:  [id: STRING, status: STRING, enrichment: STRING, ts: TIMESTAMP(3)]
    at TableJobTest.testExecuteSQL(TableJobTest.java:83)
```

However by the schemas the sink schema should be showing compatible types. 
[https://github.com/apple-corps/recipes/blob/table-example/table-example/src/main/java/com/immerok/cookbook/schemas/Schemas.java]

One curiousity is the *{*}ROWTIME*{*} which we see in the Query Schema but not 
in the Sink schema.

This issue has been discussed in 
https://apache-flink.slack.com/archives/C03G7LJTS2G/p1673979671298779



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to