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 same number of RelNodes. You could write a
rule which converts a TableScan into the tree of operators you showed
and then write further rules which manipulate the physical operators.
--
Michael Mior
[email protected]

Le jeu. 26 nov. 2020 à 16:53, Bhavya Aggarwal <[email protected]> a écrit :
>
> 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
> rechunk it. However, I am able to create 1:1 conversion. Please let me know
> how to proceed. Any help will be much appreciated.
>
> select id from users where id = 5;
> AddToNetworkQueue 1
>   Rechunk 2
>     ReorderInput 3
>         ReorderInput 4
>               Filter 5
>                  Rechunk 6
>                       Decompress 7
>                            ReadTable 8
>
> Thanks and regards
> Bhavya
> --
> *Bhavya Aggarwal*
> CTO & Partner
> Knoldus Inc. <http://www.knoldus.com/>
> +91-9910483067
> Canada - USA - India - Singapore
> <https://in.linkedin.com/company/knoldus> <https://twitter.com/Knolspeak>
> <https://www.facebook.com/KnoldusSoftware/> <https://blog.knoldus.com/>
>
> --
> Your feedback matters - At Knoldus we aim to be very professional in our
> quality of work, commitment to results, and proactive communication. If you
> feel otherwise please share your feedback
> <https://forms.gle/Ax1Te1DDpirAQuQ8A> and we would work on it.

Reply via email to