You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by open <ex...@huawei.com> on 2021/08/24 08:52:57 UTC

derive the table structurt

Helloļ¼š

I want to derive the table structure from the insert statement.
For example,
insert into table2 select field1, field2 from table1;
Derive the table structure of table2 from table1.
The performUnconditionalRewrites method in SqlValidatorImpl can obtain the table structure from the insert statement when verifying SQL statements. However, the method is a private method. Therefore, I have to obtain the table structure through reflection. Is there a more convenient way to do that?


I had record this at jira
    [ https://issues.apache.org/jira/browse/CALCITE-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402978#comment-17402978 ]