liyubin117 commented on PR #21182:
URL: https://github.com/apache/flink/pull/21182#issuecomment-1343775931

   @godfreyhe Thanks for your excelent review! I have refactored toSchema() as 
you figured.  
   Question: `can we improve the conversion logic of ResolvedSchema to 
TableSchema ?`
   Answer: I used to remove `rowtime` attri during the  conversion from 
`ResolvedSchema` to `Schema`, but this will make about fifty test cases trigger 
the Calcite exception as follow:
   ```
   Cannot add expression of different type to set:
   set type is RecordType(INTEGER amount, VARCHAR(2147483647) CHARACTER SET 
"UTF-16LE" currency, TIMESTAMP(3) *ROWTIME* rowtime, TIMESTAMP_LTZ(3) 
*PROCTIME* NOT NULL proctime, VARCHAR(2147483647) CHARACTER SET "UTF-16LE" NOT 
NULL currency0, INTEGER rate, TIMESTAMP(3) rowtime0) NOT NULL
   expression type is RecordType(INTEGER amount, VARCHAR(2147483647) CHARACTER 
SET "UTF-16LE" currency, TIMESTAMP(3) *ROWTIME* rowtime, TIMESTAMP_LTZ(3) 
*PROCTIME* NOT NULL proctime, VARCHAR(2147483647) CHARACTER SET "UTF-16LE" NOT 
NULL currency0, INTEGER rate, TIMESTAMP(3) *ROWTIME* rowtime0) NOT NULL
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to