Re: How to convert a logical operator into multiple physical operators

2020-12-07 Thread Bhavya Aggarwal
Thanks for the reply, so I looked at the example and created a Nested RelNode for my TableScanOperator as shown below override def onMatch(call: RelOptRuleCall): Unit = { val tableScan : LogicalTableScan = call.rel[LogicalTableScan](0); val builder = call.builder() val newOp = new

Re: How to convert a logical operator into multiple physical operators

2020-11-26 Thread Chunwei Lei
Hi, Bhavya. I think all you need to do is to create the node correctly. You can refer to how the EnumerableMergeJoin is created[1]. [1] https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableJoinRule.java#L86 Best, Chunwei On Fri, Nov

Re: How to convert a logical operator into multiple physical operators

2020-11-26 Thread Michael Mior
Do you need to use CBO for the physical operators as well? If not, you could certainly just keep the single TableScan and perform whatever operations you want at query execution time. If you want to use CBO with your physical operators, there is no requirement that an optimizer rule produce the

How to convert a logical operator into multiple physical operators

2020-11-26 Thread Bhavya Aggarwal
Hi All, We are trying to use Apache Calcite as and CBO for our homegrown DB and there one Logical operator will translate into multiple Physical Operations at our database e.g. a simple TableScan will convert into the given structure. In the example above we have to decompress the data, then