Search in sources :

Example 6 with TableScanNode

use of com.facebook.presto.sql.planner.plan.TableScanNode in project presto by prestodb.

the class TableScanMatcher method detailMatches.

@Override
public MatchResult detailMatches(PlanNode node, Session session, Metadata metadata, SymbolAliases symbolAliases) {
    checkState(shapeMatches(node), "Plan testing framework error: shapeMatches returned false in detailMatches in %s", this.getClass().getName());
    TableScanNode tableScanNode = (TableScanNode) node;
    TableMetadata tableMetadata = metadata.getTableMetadata(session, tableScanNode.getTable());
    String actualTableName = tableMetadata.getTable().getTableName();
    return new MatchResult(expectedTableName.equalsIgnoreCase(actualTableName) && domainMatches(tableScanNode, session, metadata));
}
Also used : TableMetadata(com.facebook.presto.metadata.TableMetadata) TableScanNode(com.facebook.presto.sql.planner.plan.TableScanNode)

Aggregations

TableScanNode (com.facebook.presto.sql.planner.plan.TableScanNode)6 Symbol (com.facebook.presto.sql.planner.Symbol)3 PlanNodeId (com.facebook.presto.sql.planner.plan.PlanNodeId)3 Split (com.facebook.presto.metadata.Split)2 TableHandle (com.facebook.presto.metadata.TableHandle)2 TableMetadata (com.facebook.presto.metadata.TableMetadata)2 PartitioningScheme (com.facebook.presto.sql.planner.PartitioningScheme)2 PlanFragment (com.facebook.presto.sql.planner.PlanFragment)2 TestingColumnHandle (com.facebook.presto.sql.planner.TestingColumnHandle)2 TestingTableHandle (com.facebook.presto.sql.planner.TestingTableHandle)2 PlanFragmentId (com.facebook.presto.sql.planner.plan.PlanFragmentId)2 ScheduledSplit (com.facebook.presto.ScheduledSplit)1 TaskSource (com.facebook.presto.TaskSource)1 ConnectorId (com.facebook.presto.connector.ConnectorId)1 TaskManagerConfig (com.facebook.presto.execution.TaskManagerConfig)1 TableLayoutHandle (com.facebook.presto.metadata.TableLayoutHandle)1 Driver (com.facebook.presto.operator.Driver)1 DriverContext (com.facebook.presto.operator.DriverContext)1 DriverFactory (com.facebook.presto.operator.DriverFactory)1 LookupJoinOperators (com.facebook.presto.operator.LookupJoinOperators)1