Transforms SELECTS of literals under UNION ALL into inline table scans.
This rule processes plain projects and inline tables below UNION ALL nodes.
SELECT 1
UNION ALL
SELECT 2
UNION ALL
[...]
HiveUnion(all=true)
HiveProject(_o__c0=[1])
HiveTableScan(table=[[_dummy_database, _dummy_table]], table:alias=[_dummy_table])
HiveProject(_o__c0=[2])
HiveTableScan(table=[[_dummy_database, _dummy_table]], table:alias=[_dummy_table])
[...]
will be transformed into
HiveUnion(all=true)
HiveProject(EXPR$0=[$0])
HiveTableFunctionScan(invocation=[inline(ARRAY(ROW(1), ROW(2)))], rowType=[RecordType(INTEGER EXPR$0)])
HiveTableScan(table=[[_dummy_database, _dummy_table]], table:alias=[_dummy_table])
[...]