You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2023/09/01 09:36:00 UTC
[jira] [Commented] (CALCITE-5972) cannot execute a sql like 'insert into A select * from B'
[ 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 [dev@calcite.apache.org|mailto:dev@calcite.apache.org] 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)