This project has retired. For details please refer to its Attic page.
CandidateFact (Lens 2.1.0-beta-incubating API)

org.apache.lens.cube.parse
Class CandidateFact

java.lang.Object
  extended by org.apache.lens.cube.parse.CandidateFact
All Implemented Interfaces:
CandidateTable

public class CandidateFact
extends Object
implements CandidateTable

Holds context of a candidate fact table.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Method Summary
 void copyASTs(CubeQueryContext cubeql)
           
 boolean equals(Object obj)
           
 AbstractCubeTable getBaseTable()
          Get base table of the candidate table
 Collection<String> getColumns()
          Get columns of candidate table
 List<Integer> getDimFieldIndices()
           
 org.apache.hadoop.hive.ql.parse.ASTNode getGroupByAST()
           
 String getGroupbyTree()
           
 String getGroupByTree()
           
 org.apache.hadoop.hive.ql.parse.ASTNode getHavingAST()
           
 String getHavingTree()
           
 String getName()
          Get name of the candidate table
 org.apache.hadoop.hive.ql.parse.ASTNode getSelectAST()
           
 List<Integer> getSelectIndices()
           
 String getSelectTree()
           
 String getStorageString(String alias)
          Get storage string of the base table alias passed
 CubeFactTable getTable()
          Get candidate table
 Set<String> getTimePartCols(CubeQueryContext query)
           
 org.apache.hadoop.hive.ql.parse.ASTNode getWhereAST()
           
 String getWhereTree()
           
 int hashCode()
           
 void setHavingAST(org.apache.hadoop.hive.ql.parse.ASTNode havingAST)
           
 void setSelectAST(org.apache.hadoop.hive.ql.parse.ASTNode selectAST)
           
 void setWhereAST(org.apache.hadoop.hive.ql.parse.ASTNode whereAST)
           
 String toString()
           
 void updateASTs(CubeQueryContext cubeql)
          Update the ASTs to include only the fields queried from this fact, in all the expressions
 void updateTimeranges(CubeQueryContext cubeql)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.lens.cube.parse.CandidateTable
getPartsQueried, getStorageTables
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getColumns

public Collection<String> getColumns()
Description copied from interface: CandidateTable
Get columns of candidate table

Specified by:
getColumns in interface CandidateTable
Returns:
set or list of columns

copyASTs

public void copyASTs(CubeQueryContext cubeql)
              throws org.apache.hadoop.hive.ql.parse.SemanticException
Throws:
org.apache.hadoop.hive.ql.parse.SemanticException

updateTimeranges

public void updateTimeranges(CubeQueryContext cubeql)
                      throws org.apache.hadoop.hive.ql.parse.SemanticException
Throws:
org.apache.hadoop.hive.ql.parse.SemanticException

updateASTs

public void updateASTs(CubeQueryContext cubeql)
                throws org.apache.hadoop.hive.ql.parse.SemanticException
Update the ASTs to include only the fields queried from this fact, in all the expressions

Parameters:
cubeql -
Throws:
org.apache.hadoop.hive.ql.parse.SemanticException

getStorageString

public String getStorageString(String alias)
Description copied from interface: CandidateTable
Get storage string of the base table alias passed

Specified by:
getStorageString in interface CandidateTable
Returns:
storage string

getBaseTable

public AbstractCubeTable getBaseTable()
Description copied from interface: CandidateTable
Get base table of the candidate table

Specified by:
getBaseTable in interface CandidateTable
Returns:
Cube or DerivedCube or Dimesions

getTable

public CubeFactTable getTable()
Description copied from interface: CandidateTable
Get candidate table

Specified by:
getTable in interface CandidateTable
Returns:
Candidate fact or dim table

getName

public String getName()
Description copied from interface: CandidateTable
Get name of the candidate table

Specified by:
getName in interface CandidateTable
Returns:
name

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getSelectTree

public String getSelectTree()

getWhereTree

public String getWhereTree()

getHavingTree

public String getHavingTree()

getGroupbyTree

public String getGroupbyTree()

getSelectAST

public org.apache.hadoop.hive.ql.parse.ASTNode getSelectAST()
Returns:
the selectAST

setSelectAST

public void setSelectAST(org.apache.hadoop.hive.ql.parse.ASTNode selectAST)
Parameters:
selectAST - the selectAST to set

getWhereAST

public org.apache.hadoop.hive.ql.parse.ASTNode getWhereAST()
Returns:
the whereAST

setWhereAST

public void setWhereAST(org.apache.hadoop.hive.ql.parse.ASTNode whereAST)
Parameters:
whereAST - the whereAST to set

getHavingAST

public org.apache.hadoop.hive.ql.parse.ASTNode getHavingAST()
Returns:
the havingAST

setHavingAST

public void setHavingAST(org.apache.hadoop.hive.ql.parse.ASTNode havingAST)
Parameters:
havingAST - the havingAST to set

getSelectIndices

public List<Integer> getSelectIndices()
Returns:
the selectIndices

getDimFieldIndices

public List<Integer> getDimFieldIndices()
Returns:
the groupbyIndices

getGroupByAST

public org.apache.hadoop.hive.ql.parse.ASTNode getGroupByAST()

getGroupByTree

public String getGroupByTree()

getTimePartCols

public Set<String> getTimePartCols(CubeQueryContext query)
                            throws org.apache.hadoop.hive.ql.parse.SemanticException
Throws:
org.apache.hadoop.hive.ql.parse.SemanticException


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.