git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Delete and Update projecting unnecessary columns


Hi,

Before I start just want to say thanks again for Calcite,  such a useful piece of software.

We are getting RA from calcite for a query engine.  We are using the Planner interface.

When we generate UPDATE or DELETE queries we get a lot of unnecessary columns included, it basically project every column in the table.

example

|CREATE TABLE CUSTOMER ( i1 INTEGER, i2 INTEGER) |

with delete

|delete from CUSTOMER |

result remainded the same with extra projection

|{ "rels": [ { "id": "0", "relOp": "EnumerableTableScan", "fieldNames": [ "i1", "i2", "rowid" ], "table": [ "mapd", "CUSTOMER" ], "inputs": [] }, { "id": "1", "relOp": "LogicalProject", "fields": [ "i1", "i2", "rowid" ], "exprs": [ { "input": 0 }, { "input": 1 }, { "input": 2 } ] }, { "id": "2", "relOp": "LogicalTableModify", "table": [ "mapd", "CUSTOMER" ], "operation": "DELETE", "flattened": true } ] } |


Note: We tried adding

|.withTrimUnusedFields(true) |

in the Planner but it did not seem to make any difference.

Is there some easy way to remove these extra project columns with calcite or do we have to do it after we get the relational algebra.

Regards




( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-calcite-development/msg03401.html on line 115
Call Stack
#TimeMemoryFunctionLocation
10.0007364696{main}( ).../msg03401.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-calcite-development/msg03401.html on line 115
Call Stack
#TimeMemoryFunctionLocation
10.0007364696{main}( ).../msg03401.html:0