A test to reproduce the problem:
@Test public void testJdbcAdapterInsert() {
CalciteAssert.model(JdbcTest.FOODMART_MODEL)
.enable(CalciteAssert.DB == POSTGRESQL)
.query("INSERT INTO \"foodmart\".\"expense_fact\"(\n" +
" \"store_id\", \"account_id\", \"exp_date\",
\"time_id\"," +
" \"category_id\", \"currency_id\", \"amount\")\n" +
" VALUES (666, 666, TIMESTAMP '1997-01-01 00:00:00', 666, '666',
666, 666)")
.runs();
}
Run with -Dcalcite.test.db=postgresql
On 30 November 2016 at 15:37, Christian Tzolov <[email protected]> wrote:
> Hi,
>
> The insert statement via the JdbcAdapter fails with
> "rel#78:Subset#1.ENUMERABLE.[]] could not be implemented;"
>
> I'm testing SQL inserts using the foodmart dataset and postgresql
> configured as a backend.
>
> Following insert works find on postgresql but fails when run through the
> jdbc adapter:
>
> "INSERT INTO "foodmart"."expense_fact"("store_id", "account_id",
> "exp_date", "time_id", "category_id", "currency_id", "amount") VALUES (666,
> 666, TIMESTAMP '1997-01-01 00:00:00', 666, '666', 666, 666);
>
> The jdbc-adapter error:
>
> Error: Error while executing SQL "INSERT INTO
> "foodmart"."expense_fact"("store_id",
> "account_id", "exp_date", "time_id", "category_id", "currency_id",
> "amount") VALUES (666, 666, TIMESTAMP '1997-01-01 00:00:00', 666, '666',
> 666, 666)": Node [rel#78:Subset#1.ENUMERABLE.[]] could not be
> implemented; planner state:
>
> It looks like error occurs before the JdbcTableModificationRule#covert is
> reached.
>
> Is this a limitation or bug?
>
> Thanks,
> Christian
>
>
> --
> Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution
> Architect, EMEA Practice Team | Pivotal <http://pivotal.io/>
> [email protected]|+31610285517
>
--
Christian Tzolov <http://www.linkedin.com/in/tzolov> | Solution Architect,
EMEA Practice Team | Pivotal <http://pivotal.io/>
[email protected]|+31610285517