com.mckoi.database
Class QueryPlan.SubsetNode

java.lang.Object
  extended by com.mckoi.database.QueryPlan.SingleQueryPlanNode
      extended by com.mckoi.database.QueryPlan.SubsetNode
All Implemented Interfaces:
QueryPlanNode, java.io.Serializable, java.lang.Cloneable
Enclosing class:
QueryPlan

public static class QueryPlan.SubsetNode
extends QueryPlan.SingleQueryPlanNode

The node for finding a subset and renaming the columns of the results in the child node.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mckoi.database.QueryPlan.SingleQueryPlanNode
child
 
Constructor Summary
QueryPlan.SubsetNode(QueryPlanNode child, Variable[] original_columns, Variable[] new_column_names)
           
 
Method Summary
 java.lang.Object clone()
          Deep clone.
 Table evaluate(QueryContext context)
          Evaluates the node and returns the result as a Table.
 Variable[] getNewColumnNames()
          Returns the list of new column names that represent the new columns in this subset.
 Variable[] getOriginalColumns()
          Returns the list of original columns that represent the mappings from the columns in this subset.
 void setGivenName(TableName name)
          Sets the given table name of the resultant table.
 java.lang.String titleString()
           
 
Methods inherited from class com.mckoi.database.QueryPlan.SingleQueryPlanNode
child, debugString, discoverCorrelatedVariables, discoverTableNames
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryPlan.SubsetNode

public QueryPlan.SubsetNode(QueryPlanNode child,
                            Variable[] original_columns,
                            Variable[] new_column_names)
Method Detail

evaluate

public Table evaluate(QueryContext context)
Description copied from interface: QueryPlanNode
Evaluates the node and returns the result as a Table. The VariableResolver resolves any outer variables


setGivenName

public void setGivenName(TableName name)
Sets the given table name of the resultant table. This is intended if we want to create a sub-query that has an aliased table name.


getOriginalColumns

public Variable[] getOriginalColumns()
Returns the list of original columns that represent the mappings from the columns in this subset.


getNewColumnNames

public Variable[] getNewColumnNames()
Returns the list of new column names that represent the new columns in this subset.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: QueryPlan.SingleQueryPlanNode
Deep clone.

Specified by:
clone in interface QueryPlanNode
Overrides:
clone in class QueryPlan.SingleQueryPlanNode
Throws:
java.lang.CloneNotSupportedException

titleString

public java.lang.String titleString()
Overrides:
titleString in class QueryPlan.SingleQueryPlanNode