casacore
|
Abstract base class for a node in a table column expression tree. More...
#include <ExprNodeRep.h>
Public Types | |
enum | NodeDataType { NTBool , NTInt , NTDouble , NTComplex , NTString , NTRegex , NTDate , NTReal , NTDouCom , NTNumeric , NTAny } |
Define the data types of a node. More... | |
enum | ValueType { VTScalar , VTArray , VTRecord , VTSetElem , VTSet , VTIndex } |
Define the value types. More... | |
enum | OperType { OtPlus , OtMinus , OtTimes , OtDivide , OtModulo , OtBitAnd , OtBitOr , OtBitXor , OtBitNegate , OtEQ , OtGE , OtGT , OtNE , OtIN , OtAND , OtOR , OtNOT , OtMIN , OtColumn , OtField , OtLiteral , OtFunc , OtSlice , OtUndef , OtRownr , OtRandom } |
Define the operator types. More... | |
enum | ArgType { NoArr , ArrArr , ArrSca , ScaArr } |
Define the value types of the 2 arguments when arrays are involved. More... | |
enum | ExprType { Constant , Variable } |
Define (sub-)expression type. More... | |
Public Member Functions | |
TableExprNodeRep (NodeDataType, ValueType, OperType, ArgType, ExprType, Int ndim, const IPosition &shape) | |
Construct a node. | |
TableExprNodeRep (NodeDataType, ValueType, OperType, ExprType) | |
This constructor is called from the derived TableExprNodeRep. | |
TableExprNodeRep (const TableExprNodeRep &)=default | |
Copy constructor. | |
TableExprNodeRep & | operator= (const TableExprNodeRep &)=delete |
Assign to a TableExprNodeRep cannot be done. | |
virtual | ~TableExprNodeRep ()=default |
The destructor deletes all the underlying TableExprNode objects. | |
virtual Bool | isAggregate () const |
Is the node an aggegation node. | |
virtual TableExprInfo | getTableInfo () const |
Get the table info. | |
virtual void | optimize () |
Try to optimize the node (meant for the right hand of the IN operator). | |
virtual void | disableApplySelection () |
Do not apply the selection. | |
virtual void | applySelection (const Vector< rownr_t > &rownrs) |
Re-create the column object for a selection of rows. | |
virtual Double | getUnitFactor () const |
Get the unit conversion factor. | |
virtual void | flattenTree (std::vector< TableExprNodeRep * > &) |
Flatten the node tree by adding the node and its children to the vector. | |
virtual std::shared_ptr< TableExprGroupFuncBase > | makeGroupAggrFunc () |
Create the correct immediate aggregate function object. | |
virtual Bool | isLazyAggregate () const |
Is the aggregate function a lazy or an immediate one? The default implementation returns True (because all UDF aggregate functions have to be lazy). | |
virtual Bool | getBool (const TableExprId &id) |
Get a scalar value for this node in the given row. | |
virtual Int64 | getInt (const TableExprId &id) |
virtual Double | getDouble (const TableExprId &id) |
virtual DComplex | getDComplex (const TableExprId &id) |
virtual String | getString (const TableExprId &id) |
virtual TaqlRegex | getRegex (const TableExprId &id) |
virtual MVTime | getDate (const TableExprId &id) |
virtual MArray< Bool > | getArrayBool (const TableExprId &id) |
Get an array value for this node in the given row. | |
virtual MArray< Int64 > | getArrayInt (const TableExprId &id) |
virtual MArray< Double > | getArrayDouble (const TableExprId &id) |
virtual MArray< DComplex > | getArrayDComplex (const TableExprId &id) |
virtual MArray< String > | getArrayString (const TableExprId &id) |
virtual MArray< MVTime > | getArrayDate (const TableExprId &id) |
void | get (const TableExprId &id, Bool &value) |
General get functions for template purposes. | |
void | get (const TableExprId &id, Int64 &value) |
void | get (const TableExprId &id, Double &value) |
void | get (const TableExprId &id, DComplex &value) |
void | get (const TableExprId &id, MVTime &value) |
void | get (const TableExprId &id, String &value) |
void | get (const TableExprId &id, MArray< Bool > &value) |
void | get (const TableExprId &id, MArray< Int64 > &value) |
void | get (const TableExprId &id, MArray< Double > &value) |
void | get (const TableExprId &id, MArray< DComplex > &value) |
void | get (const TableExprId &id, MArray< MVTime > &value) |
void | get (const TableExprId &id, MArray< String > &value) |
MArray< Bool > | getBoolAS (const TableExprId &id) |
Get a value as an array, even it it is a scalar. | |
MArray< Int64 > | getIntAS (const TableExprId &id) |
MArray< Double > | getDoubleAS (const TableExprId &id) |
MArray< DComplex > | getDComplexAS (const TableExprId &id) |
MArray< String > | getStringAS (const TableExprId &id) |
MArray< MVTime > | getDateAS (const TableExprId &id) |
virtual Bool | contains (const TableExprId &id, Bool value) |
Does a set or array contain the value? The default implementation assumes the set is a single scalar, thus tests if it is equal to the given value. | |
virtual Bool | contains (const TableExprId &id, Int64 value) |
virtual Bool | contains (const TableExprId &id, Double value) |
virtual Bool | contains (const TableExprId &id, DComplex value) |
virtual Bool | contains (const TableExprId &id, String value) |
virtual Bool | contains (const TableExprId &id, MVTime value) |
virtual MArray< Bool > | contains (const TableExprId &id, const MArray< Bool > &value) |
virtual MArray< Bool > | contains (const TableExprId &id, const MArray< Int64 > &value) |
virtual MArray< Bool > | contains (const TableExprId &id, const MArray< Double > &value) |
virtual MArray< Bool > | contains (const TableExprId &id, const MArray< DComplex > &value) |
virtual MArray< Bool > | contains (const TableExprId &id, const MArray< String > &value) |
virtual MArray< Bool > | contains (const TableExprId &id, const MArray< MVTime > &value) |
rownr_t | nrow () |
Get the number of rows in the table associated with this expression. | |
virtual Bool | getColumnDataType (DataType &) const |
Get the data type of the column. | |
virtual Array< Bool > | getColumnBool (const Vector< rownr_t > &rownrs) |
Get the value of the expression evaluated for the entire column. | |
virtual Array< uChar > | getColumnuChar (const Vector< rownr_t > &rownrs) |
virtual Array< Short > | getColumnShort (const Vector< rownr_t > &rownrs) |
virtual Array< uShort > | getColumnuShort (const Vector< rownr_t > &rownrs) |
virtual Array< Int > | getColumnInt (const Vector< rownr_t > &rownrs) |
virtual Array< uInt > | getColumnuInt (const Vector< rownr_t > &rownrs) |
virtual Array< Int64 > | getColumnInt64 (const Vector< rownr_t > &rownrs) |
virtual Array< Float > | getColumnFloat (const Vector< rownr_t > &rownrs) |
virtual Array< Double > | getColumnDouble (const Vector< rownr_t > &rownrs) |
virtual Array< Complex > | getColumnComplex (const Vector< rownr_t > &rownrs) |
virtual Array< DComplex > | getColumnDComplex (const Vector< rownr_t > &rownrs) |
virtual Array< String > | getColumnString (const Vector< rownr_t > &rownrs) |
virtual void | ranges (Block< TableExprRange > &) |
Convert the tree to a number of range vectors which at least select the same things. | |
NodeDataType | dataType () const |
Get the data type of the derived TableExprNode object. | |
Bool | isReal () const |
Is the data type real (i.e., integer or double)? | |
ValueType | valueType () const |
Get the value type. | |
void | setValueType (ValueType vtype) |
Set the value type. | |
OperType | operType () const |
Get the operator type. | |
ExprType | exprType () const |
Get the expression type. | |
Bool | isConstant () const |
Is the expression a constant? | |
const Unit & | unit () const |
Get the unit. | |
void | setUnit (const Unit &unit) |
Set the unit. | |
const Record & | attributes () const |
Get the attributes. | |
void | setAttributes (const Record &) |
Set the attributes. | |
Int | ndim () const |
Get the fixed dimensionality (same for all rows). | |
const IPosition & | shape () const |
Get the fixed shape (same for all rows). | |
const IPosition & | shape (const TableExprId &id) |
Get the shape for the given row. | |
virtual Bool | isDefined (const TableExprId &id) |
Is the value in the given row defined? The default implementation returns True. | |
virtual void | show (ostream &, uInt indent) const |
Show the expression tree. | |
virtual void | adaptSetUnits (const Unit &) |
Let a set node convert itself to the given unit. | |
Static Public Member Functions | |
static TENShPtr | replaceConstNode (const TENShPtr &node) |
Replace a node with a constant expression by node with its value. | |
static void | createRange (Block< TableExprRange > &, TableExprNodeColumn *, Double start, Double end) |
Create a range object from a column and an interval. | |
static void | createRange (Block< TableExprRange > &) |
Create a empty range object. | |
static String | typeString (NodeDataType) |
Convert a NodeDataType to a string. | |
static String | typeString (ValueType) |
Convert a ValueType to a string. | |
Protected Member Functions | |
virtual const IPosition & | getShape (const TableExprId &id) |
Get the shape for the given row. | |
void | fillExprType (const TableExprNodeRep *node) |
Set expression type to Variable if node is Variable. | |
Static Protected Member Functions | |
static TENShPtr | convertNode (const TENShPtr &thisNode, Bool convertConstType) |
If the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object. | |
Protected Attributes | |
NodeDataType | dtype_p |
ValueType | vtype_p |
OperType | optype_p |
ArgType | argtype_p |
ExprType | exprtype_p |
Int | ndim_p |
IPosition | shape_p |
Unit | unit_p |
Record | attributes_p |
Abstract base class for a node in a table column expression tree.
Internal
TableExprNodeRep is the (abstract) REPresentation of a node in a table expression tree.
TableExprNodeRep is the base class for all nodes in a table expression tree. It is used by the handle class TableExprNode.
The objects of this class are reference-counted to make it possible that the same object is reused.
TableExprNodeRep and its derivations store a table select expression before actually evaluating it. It is also possible that the classes are used by the table expression parser defined in TableParse and TableGram.
For each operator a special derived class is implemented. Another approach could have been to store the operator as a flag and switch on that. However, that causes extra overhead and the C++ virtual function mechanism is designed for these purposes.
Definition at line 201 of file ExprNodeRep.h.
Define the value types of the 2 arguments when arrays are involved.
Enumerator | |
---|---|
NoArr | |
ArrArr | |
ArrSca | |
ScaArr |
Definition at line 240 of file ExprNodeRep.h.
Define (sub-)expression type.
Definition at line 245 of file ExprNodeRep.h.
Define the data types of a node.
Enumerator | |
---|---|
NTBool | |
NTInt | |
NTDouble | |
NTComplex | |
NTString | |
NTRegex | |
NTDate | |
NTReal | |
NTDouCom | |
NTNumeric | |
NTAny |
Definition at line 205 of file ExprNodeRep.h.
Define the operator types.
LE and LT are handled as GE and GT with swapped operands.
Definition at line 231 of file ExprNodeRep.h.
Define the value types.
Enumerator | |
---|---|
VTScalar | |
VTArray | |
VTRecord | |
VTSetElem | |
VTSet | |
VTIndex |
Definition at line 220 of file ExprNodeRep.h.
casacore::TableExprNodeRep::TableExprNodeRep | ( | NodeDataType | , |
ValueType | , | ||
OperType | , | ||
ArgType | , | ||
ExprType | , | ||
Int | ndim, | ||
const IPosition & | shape | ||
) |
Construct a node.
casacore::TableExprNodeRep::TableExprNodeRep | ( | NodeDataType | , |
ValueType | , | ||
OperType | , | ||
ExprType | |||
) |
This constructor is called from the derived TableExprNodeRep.
|
default |
Copy constructor.
|
virtualdefault |
The destructor deletes all the underlying TableExprNode objects.
|
virtual |
Let a set node convert itself to the given unit.
The default implementation does nothing.
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeSetElemBase.
Re-create the column object for a selection of rows.
The default implementation does nothing.
Reimplemented in casacore::TableExprNodeColumn, casacore::TableExprNodeRowid, casacore::TableExprNodeArrayColumn, casacore::TableExprNodeArrayColumnBool, casacore::TableExprNodeArrayColumnuChar, casacore::TableExprNodeArrayColumnShort, casacore::TableExprNodeArrayColumnuShort, casacore::TableExprNodeArrayColumnInt, casacore::TableExprNodeArrayColumnuInt, casacore::TableExprNodeArrayColumnInt64, casacore::TableExprNodeArrayColumnFloat, casacore::TableExprNodeArrayColumnDouble, casacore::TableExprNodeArrayColumnComplex, casacore::TableExprNodeArrayColumnDComplex, casacore::TableExprNodeArrayColumnString, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
|
inline |
Get the attributes.
Definition at line 751 of file ExprNodeRep.h.
References attributes_p.
Referenced by setAttributes().
|
virtual |
Does a set or array contain the value? The default implementation assumes the set is a single scalar, thus tests if it is equal to the given value.
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeSet, and casacore::TableExprNodeSetOptBase.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeSet, and casacore::TableExprNodeSetOptBase.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeSet, and casacore::TableExprNodeSetOptBase.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeSet, and casacore::TableExprNodeSetOptBase.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeSet, and casacore::TableExprNodeSetOptBase.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
|
virtual |
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeSet, and casacore::TableExprNodeSetOptBase.
|
staticprotected |
If the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object.
If not constant, it calls the virtual ConvertConstChild function which can convert a constant child if appropriate.
|
static |
Create a empty range object.
|
static |
Create a range object from a column and an interval.
|
inline |
Get the data type of the derived TableExprNode object.
This is the data type of the resulting value. E.g. a compare of 2 numeric values results in a Bool, thus the data type of, say, TableExprNodeEQ<T> is always Bool. Function getInternalDT gives the internal data type, thus in the example above the data type of T.
Definition at line 721 of file ExprNodeRep.h.
References dtype_p.
|
virtual |
Do not apply the selection.
Reimplemented in casacore::TableExprNodeColumn, casacore::TableExprNodeArrayColumn, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
|
inline |
|
protected |
Set expression type to Variable if node is Variable.
|
virtual |
Flatten the node tree by adding the node and its children to the vector.
Reimplemented in casacore::TableExprFuncNodeArray, casacore::TableExprNodeBinary, casacore::TableExprNodeMulti, casacore::TableExprNodeSet, casacore::TableExprNodeSetElemBase, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
|
inline |
General get functions for template purposes.
Definition at line 337 of file ExprNodeRep.h.
References getBool(), and casacore::value().
Referenced by casacore::TableExprGroupAggr::getArray(), and casacore::TableExprNode::getNodeRep().
|
inline |
Definition at line 343 of file ExprNodeRep.h.
References getDComplex(), and casacore::value().
|
inline |
Definition at line 341 of file ExprNodeRep.h.
References getDouble(), and casacore::value().
|
inline |
Definition at line 339 of file ExprNodeRep.h.
References getInt(), and casacore::value().
|
inline |
Definition at line 349 of file ExprNodeRep.h.
References getArrayBool(), and casacore::value().
|
inline |
Definition at line 355 of file ExprNodeRep.h.
References getArrayDComplex(), and casacore::value().
|
inline |
Definition at line 353 of file ExprNodeRep.h.
References getArrayDouble(), and casacore::value().
|
inline |
Definition at line 351 of file ExprNodeRep.h.
References getArrayInt(), and casacore::value().
|
inline |
Definition at line 357 of file ExprNodeRep.h.
References getArrayDate(), and casacore::value().
|
inline |
Definition at line 359 of file ExprNodeRep.h.
References getArrayString(), and casacore::value().
|
inline |
Definition at line 345 of file ExprNodeRep.h.
References getDate(), and casacore::value().
|
inline |
Definition at line 347 of file ExprNodeRep.h.
References getString(), and casacore::value().
|
virtual |
Get an array value for this node in the given row.
The appropriate functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprConeNodeArray, casacore::TableExprNodeArrayConstBool, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayEQBool, casacore::TableExprNodeArrayEQInt, casacore::TableExprNodeArrayEQDouble, casacore::TableExprNodeArrayEQDComplex, casacore::TableExprNodeArrayEQString, casacore::TableExprNodeArrayEQRegex, casacore::TableExprNodeArrayEQDate, casacore::TableExprNodeArrayNEBool, casacore::TableExprNodeArrayNEInt, casacore::TableExprNodeArrayNEDouble, casacore::TableExprNodeArrayNEDComplex, casacore::TableExprNodeArrayNEString, casacore::TableExprNodeArrayNERegex, casacore::TableExprNodeArrayNEDate, casacore::TableExprNodeArrayGTInt, casacore::TableExprNodeArrayGTDouble, casacore::TableExprNodeArrayGTDComplex, casacore::TableExprNodeArrayGTString, casacore::TableExprNodeArrayGTDate, casacore::TableExprNodeArrayGEInt, casacore::TableExprNodeArrayGEDouble, casacore::TableExprNodeArrayGEDComplex, casacore::TableExprNodeArrayGEString, casacore::TableExprNodeArrayGEDate, casacore::TableExprNodeArrayINDComplex, casacore::TableExprNodeArrayOR, casacore::TableExprNodeArrayAND, casacore::TableExprNodeArrayNOT, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayINInt, casacore::TableExprNodeArrayINDouble, casacore::TableExprNodeArrayINString, casacore::TableExprNodeArrayINDate, casacore::TableExprNodeArrayColumnBool, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TaQLJoinColumn.
Referenced by get().
|
virtual |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstDate, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusDate, casacore::TableExprNodeArrayMinusDate, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TaQLJoinColumn.
Referenced by get().
|
virtual |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprNodeArrayConstDouble, casacore::TableExprNodeArrayConstDComplex, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusDComplex, casacore::TableExprNodeArrayMinusDComplex, casacore::TableExprNodeArrayTimesDComplex, casacore::TableExprNodeArrayDivideDComplex, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayUnit, casacore::TableExprNodeArray, casacore::TableExprNodeArrayColumnComplex, casacore::TableExprNodeArrayColumnDComplex, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TaQLJoinColumn.
Referenced by get().
|
virtual |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprNodeArrayConstDouble, casacore::TableExprNodeArrayConstDate, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusDouble, casacore::TableExprNodeArrayPlusDate, casacore::TableExprNodeArrayMinusDouble, casacore::TableExprNodeArrayMinusDate, casacore::TableExprNodeArrayTimesDouble, casacore::TableExprNodeArrayDivideDouble, casacore::TableExprNodeArrayModuloDouble, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayUnit, casacore::TableExprNodeArray, casacore::TableExprNodeArrayColumnFloat, casacore::TableExprNodeArrayColumnDouble, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TaQLJoinColumn.
Referenced by get().
|
virtual |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprConeNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusInt, casacore::TableExprNodeArrayMinusInt, casacore::TableExprNodeArrayTimesInt, casacore::TableExprNodeArrayModuloInt, casacore::TableExprNodeArrayBitAndInt, casacore::TableExprNodeArrayBitOrInt, casacore::TableExprNodeArrayBitXorInt, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArrayBitNegate, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayColumnuChar, casacore::TableExprNodeArrayColumnShort, casacore::TableExprNodeArrayColumnuShort, casacore::TableExprNodeArrayColumnInt, casacore::TableExprNodeArrayColumnuInt, casacore::TableExprNodeArrayColumnInt64, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TaQLJoinColumn.
Referenced by get().
|
virtual |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstString, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusString, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayColumnString, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TaQLJoinColumn.
Referenced by get().
|
virtual |
Get a scalar value for this node in the given row.
The appropriate functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprConeNode, casacore::TableExprFuncNode, casacore::TableExprNodeRecordField, casacore::TableExprNodeConstBool, casacore::TableExprNodeColumn, casacore::TableExprNodeEQBool, casacore::TableExprNodeEQInt, casacore::TableExprNodeEQDouble, casacore::TableExprNodeEQDComplex, casacore::TableExprNodeEQString, casacore::TableExprNodeEQRegex, casacore::TableExprNodeEQDate, casacore::TableExprNodeNEBool, casacore::TableExprNodeNEInt, casacore::TableExprNodeNEDouble, casacore::TableExprNodeNEDComplex, casacore::TableExprNodeNEString, casacore::TableExprNodeNERegex, casacore::TableExprNodeNEDate, casacore::TableExprNodeGTInt, casacore::TableExprNodeGTDouble, casacore::TableExprNodeGTDComplex, casacore::TableExprNodeGTString, casacore::TableExprNodeGTDate, casacore::TableExprNodeGEInt, casacore::TableExprNodeGEDouble, casacore::TableExprNodeGEDComplex, casacore::TableExprNodeGEString, casacore::TableExprNodeGEDate, casacore::TableExprNodeINInt, casacore::TableExprNodeINDouble, casacore::TableExprNodeINDComplex, casacore::TableExprNodeINString, casacore::TableExprNodeINDate, casacore::TableExprNodeOR, casacore::TableExprNodeAND, casacore::TableExprNodeNOT, casacore::TableExprNodeArrayPart, casacore::TableExprUDFNode, and casacore::TaQLJoinColumnBool.
Referenced by get().
MArray< Bool > casacore::TableExprNodeRep::getBoolAS | ( | const TableExprId & | id | ) |
Get a value as an array, even it it is a scalar.
This is useful if one could give an argument as scalar or array.
|
virtual |
Get the value of the expression evaluated for the entire column.
The data of function called should match the data type as returned by function getColumnDataType
.
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Get the data type of the column.
It returns True when it could set the data type (which it can if the expression is a scalar column or a constant array column pixel). Otherwise it returns False.
Reimplemented in casacore::TableExprNodeColumn, casacore::TableExprNodeArrayColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
|
virtual |
MArray< MVTime > casacore::TableExprNodeRep::getDateAS | ( | const TableExprId & | id | ) |
|
virtual |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprFuncNode, casacore::TableExprNodePlusInt, casacore::TableExprNodePlusDouble, casacore::TableExprNodePlusDComplex, casacore::TableExprNodeMinusInt, casacore::TableExprNodeMinusDouble, casacore::TableExprNodeMinusDComplex, casacore::TableExprNodeTimesInt, casacore::TableExprNodeTimesDouble, casacore::TableExprNodeTimesDComplex, casacore::TableExprNodeDivideDouble, casacore::TableExprNodeDivideDComplex, casacore::TableExprNodeModuloInt, casacore::TableExprNodeModuloDouble, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeMIN, casacore::TableExprNodeBitNegate, casacore::TableExprNodeRecordField, casacore::TableExprNodeUnit, casacore::TableExprNodeConstInt, casacore::TableExprNodeConstDouble, casacore::TableExprNodeConstDComplex, casacore::TableExprNodeColumn, casacore::TableExprNodeArrayPart, casacore::TableExprUDFNode, and casacore::TaQLJoinColumnDComplex.
Referenced by get().
MArray< DComplex > casacore::TableExprNodeRep::getDComplexAS | ( | const TableExprId & | id | ) |
|
virtual |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprFuncNode, casacore::TableExprNodePlusInt, casacore::TableExprNodePlusDouble, casacore::TableExprNodePlusDate, casacore::TableExprNodeMinusInt, casacore::TableExprNodeMinusDouble, casacore::TableExprNodeMinusDate, casacore::TableExprNodeTimesInt, casacore::TableExprNodeTimesDouble, casacore::TableExprNodeDivideDouble, casacore::TableExprNodeModuloInt, casacore::TableExprNodeModuloDouble, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeMIN, casacore::TableExprNodeBitNegate, casacore::TableExprNodeRecordField, casacore::TableExprNodeUnit, casacore::TableExprNodeConstInt, casacore::TableExprNodeConstDouble, casacore::TableExprNodeConstDate, casacore::TableExprNodeColumn, casacore::TableExprNodeRandom, casacore::TableExprNodeArrayPart, casacore::TableExprUDFNode, and casacore::TaQLJoinColumnDouble.
Referenced by get().
MArray< Double > casacore::TableExprNodeRep::getDoubleAS | ( | const TableExprId & | id | ) |
|
virtual |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprConeNode, casacore::TableExprFuncNode, casacore::TableExprNodePlusInt, casacore::TableExprNodeMinusInt, casacore::TableExprNodeTimesInt, casacore::TableExprNodeModuloInt, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeMIN, casacore::TableExprNodeBitNegate, casacore::TableExprNodeRecordField, casacore::TableExprNodeConstInt, casacore::TableExprNodeColumn, casacore::TableExprNodeRownr, casacore::TableExprNodeRowid, casacore::TableExprNodeArrayPart, casacore::TableExprUDFNode, casacore::TaQLJoinColumnInt, and casacore::TaQLJoinRowid.
Referenced by get().
MArray< Int64 > casacore::TableExprNodeRep::getIntAS | ( | const TableExprId & | id | ) |
|
virtual |
Reimplemented in casacore::TableExprFuncNode, casacore::TableExprNodeConstRegex, and casacore::TableExprUDFNode.
|
protectedvirtual |
Get the shape for the given row.
Reimplemented in casacore::TableExprNodeRecordField, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArray, and casacore::TableExprNodeArrayColumn.
|
virtual |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprFuncNode, casacore::TableExprNodePlusString, casacore::TableExprNodeRecordField, casacore::TableExprNodeConstString, casacore::TableExprNodeColumn, casacore::TableExprNodeArrayPart, casacore::TableExprUDFNode, and casacore::TaQLJoinColumnString.
Referenced by get().
MArray< String > casacore::TableExprNodeRep::getStringAS | ( | const TableExprId & | id | ) |
|
virtual |
Get the table info.
The default implementation returns an info object with a null table.
Reimplemented in casacore::TableExprNodeColumn, casacore::TableExprNodeRownr, casacore::TableExprNodeRowid, casacore::TableExprNodeRandom, casacore::TableExprNodeArrayColumn, casacore::TableExprUDFNode, casacore::TableExprUDFNodeArray, casacore::TaQLJoinColumn, and casacore::TaQLJoinRowid.
|
virtual |
Get the unit conversion factor.
Default 1 is returned.
Reimplemented in casacore::TableExprNodeUnit, and casacore::TableExprNodeArrayUnit.
|
virtual |
Is the node an aggegation node.
The default implementation returns False.
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprAggrNodeArray, and casacore::TableExprUDFNode.
|
inline |
Is the expression a constant?
Definition at line 744 of file ExprNodeRep.h.
References Constant, and exprtype_p.
Referenced by casacore::TableExprNodeIndex::getSlicer().
|
virtual |
Is the value in the given row defined? The default implementation returns True.
Reimplemented in casacore::TableExprNodeRecordField, casacore::TableExprNodeRecordFieldArray, and casacore::TableExprNodeArrayColumn.
|
virtual |
Is the aggregate function a lazy or an immediate one? The default implementation returns True (because all UDF aggregate functions have to be lazy).
Reimplemented in casacore::TableExprAggrNode, and casacore::TableExprAggrNodeArray.
|
inline |
Is the data type real (i.e., integer or double)?
Definition at line 724 of file ExprNodeRep.h.
|
virtual |
Create the correct immediate aggregate function object.
The default implementation throws an exception, because it should only be called for TableExprAggrNode(Array).
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprAggrNodeArray, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
|
inline |
Get the fixed dimensionality (same for all rows).
Definition at line 758 of file ExprNodeRep.h.
References ndim_p.
rownr_t casacore::TableExprNodeRep::nrow | ( | ) |
Get the number of rows in the table associated with this expression.
One is returned if the expression is a constant or no table is associated with it.
|
delete |
Assign to a TableExprNodeRep cannot be done.
|
inline |
|
virtual |
Try to optimize the node (meant for the right hand of the IN operator).
The default implementation does nothing.
Reimplemented in casacore::TableExprNodeINInt, casacore::TableExprNodeINDouble, casacore::TableExprNodeINString, casacore::TableExprNodeINDate, casacore::TableExprNodeArrayINInt, casacore::TableExprNodeArrayINDouble, casacore::TableExprNodeArrayINString, and casacore::TableExprNodeArrayINDate.
|
virtual |
Convert the tree to a number of range vectors which at least select the same things.
This function is very useful to convert the expression to some intervals covering the select expression. This can be used to do a rough fast selection via an index and do the the slower final selection on that much smaller subset. The function can only convert direct comparisons of columns with constants (via ==, !=, >, >=, < or <=) and their combinations using && or ||.
Reimplemented in casacore::TableExprNodeEQDouble, casacore::TableExprNodeGTDouble, casacore::TableExprNodeGEDouble, casacore::TableExprNodeOR, and casacore::TableExprNodeAND.
Replace a node with a constant expression by node with its value.
|
inline |
Set the attributes.
Definition at line 754 of file ExprNodeRep.h.
References attributes(), and attributes_p.
void casacore::TableExprNodeRep::setUnit | ( | const Unit & | unit | ) |
Set the unit.
It also sets the datatype to NTDouble if it is NTInt.
|
inline |
|
inline |
Get the fixed shape (same for all rows).
Definition at line 762 of file ExprNodeRep.h.
References shape_p.
const IPosition & casacore::TableExprNodeRep::shape | ( | const TableExprId & | id | ) |
Get the shape for the given row.
It returns the fixed shape if defined, otherwise getShape(id).
|
virtual |
Show the expression tree.
Reimplemented in casacore::TableExprNodeBinary, casacore::TableExprNodeMulti, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, casacore::TableExprNodeSetElemBase, casacore::TableExprNodeSetElem, casacore::TableExprNodeSetOptUSet< T >, casacore::TableExprNodeSetOptContSetBase< T >, casacore::TableExprNodeSetOptContSetMixOC< T >, and casacore::TableExprNodeSetOptContSet< T, LeftComp, RightComp >.
|
static |
Convert a NodeDataType to a string.
Convert a ValueType to a string.
|
inline |
|
inline |
Get the value type.
Definition at line 728 of file ExprNodeRep.h.
References vtype_p.
Referenced by casacore::TableExprGroupAggr::getArray(), and casacore::TableExprNodeSet::toArray().
|
protected |
Definition at line 518 of file ExprNodeRep.h.
|
protected |
Definition at line 524 of file ExprNodeRep.h.
Referenced by attributes(), and setAttributes().
|
protected |
Definition at line 515 of file ExprNodeRep.h.
Referenced by dataType(), and isReal().
|
protected |
Definition at line 519 of file ExprNodeRep.h.
Referenced by exprType(), and isConstant().
|
protected |
Definition at line 520 of file ExprNodeRep.h.
Referenced by ndim().
|
protected |
Definition at line 517 of file ExprNodeRep.h.
Referenced by operType().
|
protected |
Definition at line 522 of file ExprNodeRep.h.
Referenced by shape().
|
protected |
Definition at line 523 of file ExprNodeRep.h.
Referenced by unit().
|
protected |
Definition at line 516 of file ExprNodeRep.h.
Referenced by setValueType(), and valueType().