// Expand table macro if possible. It's more efficient than
// TableFunctionRel.
if (operator instanceof SqlUserDefinedTableMacro) {
final SqlUserDefinedTableMacro udf =
(SqlUserDefinedTableMacro) operator;
final TranslatableTable table = udf.getTable(typeFactory,
call.getOperandList());
final RelDataType rowType = table.getRowType(typeFactory);
RelOptTable relOptTable =
RelOptTableImpl.create(null, rowType, (TranslatableTable) table);
RelNode converted = toRel(relOptTable);
bb.setRoot(converted, true);
return;