[
https://issues.apache.org/jira/browse/CALCITE-5972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17761252#comment-17761252
]
Alessandro Solimando commented on CALCITE-5972:
-----------------------------------------------
[~moccy] this seems more a question for the dev list rather than a Jira ticket,
I suggest to write to [[email protected]|mailto:[email protected]]
to get some input
> cannot execute a sql like 'insert into A select * from B'
> ---------------------------------------------------------
>
> Key: CALCITE-5972
> URL: https://issues.apache.org/jira/browse/CALCITE-5972
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.35.0
> Reporter: Moccy.T
> Priority: Blocker
>
> I have put the
> {code:java}
> org.apache.calcite.adapter.csv.CsvScannableTable{code}
> and its related classes (Factory, Reader......, etc.) into my test project.
> When I tried to execute a sql like
> {code:java}
> insert into mysql.calcite_test (select * from csv) {code}
> an NPE was thrown. where `mysql` is recognised by JdbcSchema#Factory. When I
> debugged, I found that the bind method of the dynamically generated Bindable
> code called the JdbcTable's getModifiableCollection() method, which returned
> null directly. the bind method's subsequent call to collection.size() threw
> an NPE. this code is identified by the This code is generated by
> EnumerableTableModify.class.
> After that, I tried to execute
> {code:java}
> insert into mysql.calcite(select * from mysql2.calcite2){code}
> There are two JdbcSchema#Factory recognised data sources here, but I found
> that the code that was eventually generated by
> JdbcToEnumerableConverter.class executed
> {code:java}
> insert into calcite(select * from mysql2.calcite){code}
> in `mysql2` without performing the insert in the `mysql` library.
> Are these issues intentional with calcite or are they bugs?
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)