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

org.apache.lens.cube.metadata
Class ExprColumn

java.lang.Object
  extended by org.apache.lens.cube.metadata.CubeColumn
      extended by org.apache.lens.cube.metadata.ExprColumn
All Implemented Interfaces:
Named

public class ExprColumn
extends CubeColumn


Field Summary
static char EXPRESSION_DELIMITER
           
 
Constructor Summary
ExprColumn(org.apache.hadoop.hive.metastore.api.FieldSchema column, String displayString, String... expressions)
           
ExprColumn(String name, Map<String,String> props)
           
 
Method Summary
 void addExpression(String expression)
          Add an expression to existing set of expressions for this column
 void addProperties(Map<String,String> props)
           
 boolean equals(Object obj)
           
 org.apache.hadoop.hive.ql.parse.ASTNode getAst()
          Get the AST corresponding to the expression
 String getExpr()
           
 List<org.apache.hadoop.hive.ql.parse.ASTNode> getExpressionASTList()
           
 Collection<String> getExpressions()
          Get immutable view of this column's expressions
 String getType()
           
 int hashCode()
           
 boolean removeExpression(String expression)
          Remove an expression from the set of expressions of this column
 String toString()
           
 
Methods inherited from class org.apache.lens.cube.metadata.CubeColumn
getCost, getDescription, getDisplayString, getEndTime, getName, getStartTime
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPRESSION_DELIMITER

public static final char EXPRESSION_DELIMITER
See Also:
Constant Field Values
Constructor Detail

ExprColumn

public ExprColumn(org.apache.hadoop.hive.metastore.api.FieldSchema column,
                  String displayString,
                  String... expressions)
           throws org.apache.hadoop.hive.ql.parse.ParseException
Throws:
org.apache.hadoop.hive.ql.parse.ParseException

ExprColumn

public ExprColumn(String name,
                  Map<String,String> props)
Method Detail

getExpr

public String getExpr()
Returns:
the expression

getType

public String getType()

addProperties

public void addProperties(Map<String,String> props)
Overrides:
addProperties in class CubeColumn

hashCode

public int hashCode()
Overrides:
hashCode in class CubeColumn

equals

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

toString

public String toString()
Overrides:
toString in class CubeColumn

getAst

public org.apache.hadoop.hive.ql.parse.ASTNode getAst()
                                               throws org.apache.hadoop.hive.ql.parse.ParseException
Get the AST corresponding to the expression

Returns:
the ast
Throws:
org.apache.hadoop.hive.ql.parse.ParseException

getExpressionASTList

public List<org.apache.hadoop.hive.ql.parse.ASTNode> getExpressionASTList()

getExpressions

public Collection<String> getExpressions()
Get immutable view of this column's expressions

Returns:

addExpression

public void addExpression(String expression)
                   throws org.apache.hadoop.hive.ql.parse.ParseException
Add an expression to existing set of expressions for this column

Parameters:
expression -
Throws:
org.apache.hadoop.hive.ql.parse.ParseException

removeExpression

public boolean removeExpression(String expression)
Remove an expression from the set of expressions of this column

Parameters:
expression -
Returns:


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