WL#4537: QFPD: Virtual Tables

Affects: Server-7.x   —   Status: Un-Assigned

================================================================================
WORK IN PROGRESS
================================================================================

The result of a query fragment is a table. What is specific for this table
is that its result is not necessarily stored, but is computed in some way
by a storage engine. Generally, a Virtual Table is a table whose result is
computed in some way.

Once a query is decomposed into some query fragments (to be pushed to some SE),
and a reduced query, the query fragments must be substituted in the reduced query
with Virtual Tables.

Virtual Table is a very generic concept that can be used not only for query
fragment pushdown, but also to implement table functions. However, the goal of
this task is to implement Virtual Tables specifically to be used for query
fragment pushdown.

Informally a virtual table should provide:
* a way to specify its input (bound), output (unbound) and don't care columns,
* a minimal iterator interface to retrieve the data in the table, e.g. only
  the rnd_[init, next, close] methods of the handler interface,
* what else?

A limitation we accept in this task is that Virtual Tables are non-updateable.

The majority of the functionality (if not all) seems to be implemented by
WL#3288: "Multiple cursors per TABLE".