calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garcia, Sonia" <>
Subject DML operations in csv-optiq
Date Tue, 30 Sep 2014 20:28:41 GMT
Dear Julian,

I am trying to add DML operations support to the csv-optiq project, but so far I couldn't
make it work. In a previous  Mongo-optiq post I saw your suggestion about implementing ModifiableTable.
So This is exactly what I am doing in the  CsvTable class.

However, when I am trying to run this query:

0: jdbc:optiq:model=target/test-classes/model> insert into "DEPTS" ("DEPTNO", "N
AME") values(19, 'test');

I keep getting a bunch  of errors (see below). Is there anything else I should do? I couldn't
find any examples using this ModifiableTable, so if you could point me to any, it  would be
very helpful.

Thanks in advance,


Error: while executing SQL: insert into "DEPTS" ("DEPTNO", "NAME") values(19, 'test') (state=,code=0)
java.sql.SQLException: while executing SQL: insert into "DEPTS" ("DEPTNO", "NAME
") values(19, 'test')
        at net.hydromatic.avatica.Helper.createException(
        at net.hydromatic.avatica.AvaticaStatement.execute(
        at sqlline.Commands.execute(
        at sqlline.Commands.sql(
        at sqlline.SqlLine.dispatch(
        at sqlline.SqlLine.begin(
        at sqlline.SqlLine.start(
        at sqlline.SqlLine.main(
Caused by: org.eigenbase.relopt.RelOptPlanner$CannotPlanException: Node [rel#227
:Subset#1.ENUMERABLE.[]] could not be implemented; planner state:

Root: rel#227:Subset#1.ENUMERABLE.[]
Original rel:
EnumerableTableModificationRel(subset=[rel#227:Subset#1.ENUMERABLE.[]], table=[[
SALES, DEPTS]], operation=[INSERT], updateColumnList=[[]], flattened=[true]): ro
wcount = 1.0, cumulative cost = {1.0 rows, 0.0 cpu, 0.0 io}, id = 226
  ValuesRel(subset=[rel#225:Subset#0.NONE.[]], tuples=[[{ 19, 'test' }]]): rowc
ount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 223

        rel#225:Subset#0.NONE.[], best=null, importance=0.9
                rel#223:ValuesRel.NONE.[](type=RecordType(INTEGER DEPTNO, VARCHA
R NAME),tuples=[{ 19, 'test' }]), rowcount=1.0, cumulative cost={inf}
        rel#230:Subset#0.ENUMERABLE.[], best=rel#229, importance=0.45
ONE.[],convention=ENUMERABLE,sort=[]), rowcount=1.0, cumulative cost={inf}
R DEPTNO, VARCHAR NAME),tuples=[{ 19, 'test' }]), rowcount=1.0, cumulative cost
={1.0 rows, 1.0 cpu, 0.0 io}
Set#1, type: RecordType(BIGINT ROWCOUNT)
        rel#227:Subset#1.ENUMERABLE.[], best=null, importance=1.0
25:Subset#0.NONE.[],table=[SALES, DEPTS],operation=INSERT,updateColumnList=[],fl
attened=true), rowcount=1.0, cumulative cost={inf}

        at org.eigenbase.relopt.volcano.RelSubset$CheapestPlanReplacer.visit(Rel
        at org.eigenbase.relopt.volcano.RelSubset.buildCheapestPlan(RelSubset.ja
        at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanne
CONFIDENTIAL: This e-mail has been sent to you by one of the BGC entities (collectively BGC)
listed at the following link
The link contains company and FCA registration numbers. This e-mail, including its contents
attachments, if any, are confidential. If you are not the named recipient please notify the
sender and
immediately delete it. You may not disseminate, distribute, or forward this e-mail message
or disclose
its contents to anybody else. Copyright and any other intellectual property rights in its
contents are the
sole property of BGC and its affiliates. E-mail transmission cannot be guaranteed to be secure
or error-free.
The sender therefore does not accept liability for any errors or omissions in the contents
of this
message which arise as a result of e-mail transmission.  If verification is required please
request a
hard-copy version. Although we routinely screen for viruses, addressees should check this
e-mail and any
attachments for viruses. We make no representation or warranty as to the absence of viruses
in this
e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection
of our
customers and business, we may monitor and read e-mails sent to and from our server(s). 
The registered offices of the BGC entities are at 1 Churchill Place, London, E14 5RD.  
For any issues arising from this email please reply to the sender. 
The FCA register appears at  
The FCA regulates the financial services industry in the United Kingdom and is located at

25 The North Colonnade, Canary Wharf, London, E14 5HS.
BGC Financial LP CFTC Rule 1.55(K) Firm Specific Disclosure Statement:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message