ExprNode.h

Classes

Global Functions -- (full description)
TableExprNode -- Handle class for a table column expression tree (full description)

Global Functions (source)

Interface

TableExprNode operator+ (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator- (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator* (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator/ (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator% (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator== (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator!= (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator>= (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator> (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator<= (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator< (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator&& (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator|| (const TableExprNode& left, const TableExprNode& right)
TableExprNode near (const TableExprNode& left, const TableExprNode& right)
TableExprNode near (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right)
TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& cones)
TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& cones)
TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& cones)
TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
TableExprNode sin (const TableExprNode& node)
TableExprNode sinh (const TableExprNode& node)
TableExprNode cos (const TableExprNode& node)
TableExprNode cosh (const TableExprNode& node)
TableExprNode exp (const TableExprNode& node)
TableExprNode log (const TableExprNode& node)
TableExprNode log10 (const TableExprNode& node)
TableExprNode pow (const TableExprNode& x, const TableExprNode& y)
TableExprNode square (const TableExprNode& node)
TableExprNode sqrt (const TableExprNode& node)
TableExprNode norm (const TableExprNode& node)
TableExprNode asin (const TableExprNode& node)
TableExprNode acos (const TableExprNode& node)
TableExprNode atan (const TableExprNode& node)
TableExprNode atan2 (const TableExprNode& y, const TableExprNode& x)
TableExprNode tan (const TableExprNode& node)
TableExprNode tanh (const TableExprNode& node)
TableExprNode sign (const TableExprNode& node)
TableExprNode round (const TableExprNode& node)
TableExprNode ceil (const TableExprNode& node)
TableExprNode abs (const TableExprNode& node)
TableExprNode floor (const TableExprNode& node)
TableExprNode fmod (const TableExprNode& x, const TableExprNode& y)
TableExprNode strlength (const TableExprNode& node)
TableExprNode upcase (const TableExprNode& node)
TableExprNode downcase (const TableExprNode& node)
TableExprNode trim (const TableExprNode& node)
TableExprNode regex (const TableExprNode& node)
TableExprNode pattern (const TableExprNode& node)
TableExprNode sqlpattern (const TableExprNode& node)
TableExprNode datetime (const TableExprNode& node)
TableExprNode mjdtodate (const TableExprNode& node)
TableExprNode mjd (const TableExprNode& node)
TableExprNode date (const TableExprNode& node)
TableExprNode year (const TableExprNode& node)
TableExprNode month (const TableExprNode& node)
TableExprNode day (const TableExprNode& node)
TableExprNode cmonth (const TableExprNode& node)
TableExprNode weekday (const TableExprNode& node)
TableExprNode cdow (const TableExprNode& node)
TableExprNode week (const TableExprNode& node)
TableExprNode time (const TableExprNode& node)
TableExprNode isNaN (const TableExprNode& node)
TableExprNode min (const TableExprNode& a, const TableExprNode& b)
TableExprNode max (const TableExprNode& a, const TableExprNode& b)
TableExprNode conj (const TableExprNode& node)
TableExprNode real (const TableExprNode& node)
TableExprNode imag (const TableExprNode& node)
TableExprNode amplitude (const TableExprNode& node)
TableExprNode phase (const TableExprNode& node)
TableExprNode arg (const TableExprNode& node)
TableExprNode formComplex (const TableExprNode& real, const TableExprNode& imag)
TableExprNode sum (const TableExprNode& array)
TableExprNode product (const TableExprNode& array)
TableExprNode sumSquare (const TableExprNode& array)
TableExprNode min (const TableExprNode& array)
TableExprNode max (const TableExprNode& array)
TableExprNode mean (const TableExprNode& array)
TableExprNode variance (const TableExprNode& array)
TableExprNode stddev (const TableExprNode& array)
TableExprNode avdev (const TableExprNode& array)
TableExprNode median (const TableExprNode& array)
TableExprNode fractile (const TableExprNode& array, const TableExprNode& fraction)
TableExprNode any (const TableExprNode& array)
TableExprNode all (const TableExprNode& array)
TableExprNode ntrue (const TableExprNode& array)
TableExprNode nfalse (const TableExprNode& array)
TableExprNode sums (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode products (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode sumSquares (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode mins (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode maxs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode means (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode variances (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode stddevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode avdevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode medians (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode fractiles (const TableExprNode& array, const TableExprNode& fraction, const TableExprNodeSet& collapseAxes)
TableExprNode anys (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode alls (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode ntrues (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode nfalses (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode array (const TableExprNode& values, const TableExprNodeSet& shape)
TableExprNode isdefined (const TableExprNode& array)
TableExprNode nelements (const TableExprNode& array)
TableExprNode ndim (const TableExprNode& array)
TableExprNode shape (const TableExprNode& array)
TableExprNode iif (const TableExprNode& condition, const TableExprNode& arg1, const TableExprNode& arg2)

Description

Define all global functions operating on a TableExprNode.

Member Description

TableExprNode operator+ (const TableExprNode& left, const TableExprNode& right)

Arithmetic operators for numeric TableExprNode's.

+ is also defined for strings (means concatenation).

TableExprNode operator- (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator* (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator/ (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator% (const TableExprNode& left, const TableExprNode& right)

Arithmetic operators for numeric TableExprNode's.

TableExprNode operator== (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator!= (const TableExprNode& left, const TableExprNode& right)

Comparison operators.

TableExprNode operator>= (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator> (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator<= (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator< (const TableExprNode& left, const TableExprNode& right)

Not defined for Bool.

TableExprNode operator&& (const TableExprNode& left, const TableExprNode& right)
TableExprNode operator|| (const TableExprNode& left, const TableExprNode& right)

Logical operators to combine boolean TableExprNode's.

TableExprNode near (const TableExprNode& left, const TableExprNode& right)
TableExprNode near (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right)
TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)

Functions to return whether a value is "relatively" near another. Returns tol > abs(val2 - val1)/max(abs(val1),(val2)). If tol <= 0, returns val1 == val2. If either val is 0.0, takes care of area around the minimum number that can be represented.
The nearAbs functions return whether a value is "absolutely" near another. Returns tol > abs(val2 - val1). Default tolerance is 1.0e-13. They operate on scalars and arrays.

TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& cones)

Cone search; test if the position of a source is inside a cone.
Argument sourcePos must be a double array containing two values (ra and dec of source) in radians.
Argument cones must be a double array specifying the position of the cone centers and radii in radians. So the array must contain three values (ra,dec,radius) or a multiple of it.

The result is always a Bool scalar telling if any cone contains the source.

TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& cones)

Cone search; test if the position of a source is inside a cone.
Argument sourcePos must be a double array containing two values (ra and dec of source) in radians.
Argument cones must be a double array specifying the position of the cone centers and radii in radians. So the array must contain three values (ra,dec,radius) or a multiple of it.

The sourcePos can contain multiple sources. The result is a double array giving the index of the first cone containing the corresponding source. If there is one source, the result is a double scalar.

TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& cones)

Cone search; test if the position of a source is inside a cone.
Argument sourcePos must be a double array containing two values (ra and dec of source) in radians.
Argument cones must be a double array specifying the position of the cone centers and radii in radians. So the array must contain three values (ra,dec,radius) or a multiple of it.

TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)

Cone search as above. However, the cone positions and radii are specified separately and (virtually) a larger array containing every combination of position/radius is formed.

TableExprNode sin (const TableExprNode& node)
TableExprNode sinh (const TableExprNode& node)
TableExprNode cos (const TableExprNode& node)
TableExprNode cosh (const TableExprNode& node)
TableExprNode exp (const TableExprNode& node)
TableExprNode log (const TableExprNode& node)
TableExprNode log10 (const TableExprNode& node)
TableExprNode pow (const TableExprNode& x, const TableExprNode& y)
TableExprNode square (const TableExprNode& node)
TableExprNode sqrt (const TableExprNode& node)
TableExprNode norm (const TableExprNode& node)

Transcendental functions that can be applied to essentially all numeric nodes containing scalars or arrays.

TableExprNode asin (const TableExprNode& node)
TableExprNode acos (const TableExprNode& node)
TableExprNode atan (const TableExprNode& node)
TableExprNode atan2 (const TableExprNode& y, const TableExprNode& x)
TableExprNode tan (const TableExprNode& node)
TableExprNode tanh (const TableExprNode& node)
TableExprNode sign (const TableExprNode& node)
TableExprNode round (const TableExprNode& node)
TableExprNode ceil (const TableExprNode& node)
TableExprNode abs (const TableExprNode& node)
TableExprNode floor (const TableExprNode& node)
TableExprNode fmod (const TableExprNode& x, const TableExprNode& y)

Transcendental functions applied to to nodes containing scalars or arrays with double values. They are invalid for Complex nodes.

TableExprNode strlength (const TableExprNode& node)
TableExprNode upcase (const TableExprNode& node)
TableExprNode downcase (const TableExprNode& node)
TableExprNode trim (const TableExprNode& node)

String functions on scalars or arrays.

TableExprNode regex (const TableExprNode& node)
TableExprNode pattern (const TableExprNode& node)
TableExprNode sqlpattern (const TableExprNode& node)

Functions for regular expression matching and pattern matching. Defined for scalars and arrays.
pattern is for a file name like pattern.
sqlpattern is for an SQL like pattern.

TableExprNode datetime (const TableExprNode& node)
TableExprNode mjdtodate (const TableExprNode& node)
TableExprNode mjd (const TableExprNode& node)
TableExprNode date (const TableExprNode& node)
TableExprNode year (const TableExprNode& node)
TableExprNode month (const TableExprNode& node)
TableExprNode day (const TableExprNode& node)
TableExprNode cmonth (const TableExprNode& node)
TableExprNode weekday (const TableExprNode& node)
TableExprNode cdow (const TableExprNode& node)
TableExprNode week (const TableExprNode& node)
TableExprNode time (const TableExprNode& node)

Functions for date-values. Defined for scalars and arrays.

TableExprNode isNaN (const TableExprNode& node)

Function to test if a scalar or array is NaN (not-a-number). It results in a Bool scalar or array.

TableExprNode min (const TableExprNode& a, const TableExprNode& b)
TableExprNode max (const TableExprNode& a, const TableExprNode& b)

Minimum or maximum of 2 nodes. Makes sense for numeric and String values. For Complex values the norm is compared. One or both arguments can be scalar or array.

TableExprNode conj (const TableExprNode& node)

The complex conjugate of a complex node. Defined for scalars and arrays.

TableExprNode real (const TableExprNode& node)

The real part of a complex node. Defined for scalars and arrays.

TableExprNode imag (const TableExprNode& node)

The imaginary part of a complex node. Defined for scalars and arrays.

TableExprNode amplitude (const TableExprNode& node)

The amplitude (i.e. sqrt(re*re + im*im)) of a complex node. This is a synonym for function abs. Defined for scalars and arrays.

TableExprNode phase (const TableExprNode& node)

The phase (i.e. atan2(im, re)) of a complex node. This is a synonym for function arg. Defined for scalars and arrays.

TableExprNode arg (const TableExprNode& node)

The arg (i.e. atan2(im, re)) of a complex node. Defined for scalars and arrays.

TableExprNode formComplex (const TableExprNode& real, const TableExprNode& imag)

Form a complex number from two Doubles. One or both arguments can be scalar or array.

TableExprNode sum (const TableExprNode& array)
TableExprNode product (const TableExprNode& array)
TableExprNode sumSquare (const TableExprNode& array)

Functions operating on a Double or Complex scalar or array resulting in a scalar with the same data type.

TableExprNode min (const TableExprNode& array)
TableExprNode max (const TableExprNode& array)
TableExprNode mean (const TableExprNode& array)
TableExprNode variance (const TableExprNode& array)
TableExprNode stddev (const TableExprNode& array)
TableExprNode avdev (const TableExprNode& array)
TableExprNode median (const TableExprNode& array)
TableExprNode fractile (const TableExprNode& array, const TableExprNode& fraction)

Functions operating on a Double scalar or array resulting in a Double scalar.

TableExprNode any (const TableExprNode& array)
TableExprNode all (const TableExprNode& array)
TableExprNode ntrue (const TableExprNode& array)
TableExprNode nfalse (const TableExprNode& array)

TableExprNode sums (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode products (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode sumSquares (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode mins (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode maxs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode means (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode variances (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode stddevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode avdevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode medians (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode fractiles (const TableExprNode& array, const TableExprNode& fraction, const TableExprNodeSet& collapseAxes)
TableExprNode anys (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode alls (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode ntrues (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
TableExprNode nfalses (const TableExprNode& array, const TableExprNodeSet& collapseAxes)

The partial version of the functions above. They are applied to the array subsets defined by the axes in the set using the partialXXX functions in ArrayMath. The axes must be 0-relative.

TableExprNode array (const TableExprNode& values, const TableExprNodeSet& shape)

Create an array of the given shape and fill it with the values. The values array is rewound as needed.

TableExprNode isdefined (const TableExprNode& array)

Function operating on a field resulting in a bool scalar. It can be used to test if a column has an array in the current row. It can also be used to test if a record contains a field.

TableExprNode nelements (const TableExprNode& array)
TableExprNode ndim (const TableExprNode& array)

Functions operating on any scalar or array resulting in a Double scalar. A scalar has 1 element and dimensionality 1.

TableExprNode shape (const TableExprNode& array)

Function operating on any scalar or array resulting in a Double array containing the shape. A scalar has shape [1].

TableExprNode iif (const TableExprNode& condition, const TableExprNode& arg1, const TableExprNode& arg2)

Function resembling the ternary ?: construct in C++. The argument "condition" has to be a Bool value. If an element in "condition" is True, the corresponding element from "arg1" is taken, otherwise it is taken from "arg2". The arguments can be scalars or array or any combination.


class TableExprNode

Interface

friend TableExprNode operator+ (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator- (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator* (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator/ (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator% (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator== (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator!= (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator>= (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator> (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator<= (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator< (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator&& (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator|| (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode near (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode near (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
friend TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
friend TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& cones)
friend TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& cones)
friend TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& cones)
friend TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
friend TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
friend TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
friend TableExprNode sin (const TableExprNode& node)
friend TableExprNode sinh (const TableExprNode& node)
friend TableExprNode cos (const TableExprNode& node)
friend TableExprNode cosh (const TableExprNode& node)
friend TableExprNode exp (const TableExprNode& node)
friend TableExprNode log (const TableExprNode& node)
friend TableExprNode log10 (const TableExprNode& node)
friend TableExprNode pow (const TableExprNode& x, const TableExprNode& y)
friend TableExprNode square (const TableExprNode& node)
friend TableExprNode sqrt (const TableExprNode& node)
friend TableExprNode norm (const TableExprNode& node)
friend TableExprNode asin (const TableExprNode& node)
friend TableExprNode acos (const TableExprNode& node)
friend TableExprNode atan (const TableExprNode& node)
friend TableExprNode atan2 (const TableExprNode& y, const TableExprNode& x)
friend TableExprNode tan (const TableExprNode& node)
friend TableExprNode tanh (const TableExprNode& node)
friend TableExprNode sign (const TableExprNode& node)
friend TableExprNode round (const TableExprNode& node)
friend TableExprNode ceil (const TableExprNode& node)
friend TableExprNode abs (const TableExprNode& node)
friend TableExprNode floor (const TableExprNode& node)
friend TableExprNode fmod (const TableExprNode& x, const TableExprNode& y)
friend TableExprNode strlength (const TableExprNode& node)
friend TableExprNode upcase (const TableExprNode& node)
friend TableExprNode downcase (const TableExprNode& node)
friend TableExprNode trim (const TableExprNode& node)
friend TableExprNode regex (const TableExprNode& node)
friend TableExprNode pattern (const TableExprNode& node)
friend TableExprNode sqlpattern (const TableExprNode& node)
friend TableExprNode datetime (const TableExprNode& node)
friend TableExprNode mjdtodate (const TableExprNode& node)
friend TableExprNode mjd (const TableExprNode& node)
friend TableExprNode date (const TableExprNode& node)
friend TableExprNode year (const TableExprNode& node)
friend TableExprNode month (const TableExprNode& node)
friend TableExprNode day (const TableExprNode& node)
friend TableExprNode cmonth (const TableExprNode& node)
friend TableExprNode weekday (const TableExprNode& node)
friend TableExprNode cdow (const TableExprNode& node)
friend TableExprNode week (const TableExprNode& node)
friend TableExprNode time (const TableExprNode& node)
friend TableExprNode isNaN (const TableExprNode& node)
friend TableExprNode min (const TableExprNode& a, const TableExprNode& b)
friend TableExprNode max (const TableExprNode& a, const TableExprNode& b)
friend TableExprNode conj (const TableExprNode& node)
friend TableExprNode real (const TableExprNode& node)
friend TableExprNode imag (const TableExprNode& node)
friend TableExprNode amplitude (const TableExprNode& node)
friend TableExprNode phase (const TableExprNode& node)
friend TableExprNode arg (const TableExprNode& node)
friend TableExprNode formComplex (const TableExprNode& real, const TableExprNode& imag)
friend TableExprNode sum (const TableExprNode& array)
friend TableExprNode product (const TableExprNode& array)
friend TableExprNode sumSquare (const TableExprNode& array)
friend TableExprNode min (const TableExprNode& array)
friend TableExprNode max (const TableExprNode& array)
friend TableExprNode mean (const TableExprNode& array)
friend TableExprNode variance (const TableExprNode& array)
friend TableExprNode stddev (const TableExprNode& array)
friend TableExprNode avdev (const TableExprNode& array)
friend TableExprNode median (const TableExprNode& array)
friend TableExprNode fractile (const TableExprNode& array, const TableExprNode& fraction)
friend TableExprNode any (const TableExprNode& array)
friend TableExprNode all (const TableExprNode& array)
friend TableExprNode ntrue (const TableExprNode& array)
friend TableExprNode nfalse (const TableExprNode& array)
friend TableExprNode sums (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode products (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode sumSquares (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode mins (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode maxs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode means (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode variances (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode stddevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode avdevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode medians (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode fractiles (const TableExprNode& array, const TableExprNode& fraction, const TableExprNodeSet& collapseAxes)
friend TableExprNode anys (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode alls (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode ntrues (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode nfalses (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode array (const TableExprNode& values, const TableExprNodeSet& shape)
friend TableExprNode isdefined (const TableExprNode& array)
friend TableExprNode nelements (const TableExprNode& array)
friend TableExprNode ndim (const TableExprNode& array)
friend TableExprNode shape (const TableExprNode& array)
friend TableExprNode iif (const TableExprNode& condition, const TableExprNode& arg1, const TableExprNode& arg2)
Public Members
TableExprNode ()
TableExprNode operator+ () const
TableExprNode operator- () const
TableExprNode operator! () const
TableExprNode operator() (const TableExprNodeSet& indices)
TableExprNode in (const TableExprNode& array) const
TableExprNode in (const TableExprNodeSet& set) const
TableExprNode (const Bool& value)
TableExprNode (const Int& value)
TableExprNode (const Double& value)
TableExprNode (const Complex& value)
TableExprNode (const DComplex& value)
TableExprNode (const String& value)
TableExprNode (const char*)
TableExprNode (const Regex& value)
TableExprNode (const MVTime& value)
TableExprNode (const Array<Bool>& value)
TableExprNode (const Array<uChar>& value)
TableExprNode (const Array<Short>& value)
TableExprNode (const Array<uShort>& value)
TableExprNode (const Array<Int>& value)
TableExprNode (const Array<uInt>& value)
TableExprNode (const Array<Float>& value)
TableExprNode (const Array<Double>& value)
TableExprNode (const Array<Complex>& value)
TableExprNode (const Array<DComplex>& value)
TableExprNode (const Array<String>& value)
TableExprNode (const Array<MVTime>& value)
TableExprNode (TableExprNodeRep*)
TableExprNode (const TableExprNode&)
TableExprNode& operator= (const TableExprNode&)
~TableExprNode ()
Bool isNull() const
DataType dataType() const
Bool isScalar() const
uInt nrow() const
void get (const TableExprId& id, Bool& value) const
void get (const TableExprId& id, Double& value) const
void get (const TableExprId& id, DComplex& value) const
void get (const TableExprId& id, String& value) const
void get (const TableExprId& id, Regex& value) const
void get (const TableExprId& id, MVTime& value) const
void get (const TableExprId& id, Array<Bool>& value) const
void get (const TableExprId& id, Array<Double>& value) const
void get (const TableExprId& id, Array<DComplex>& value) const
void get (const TableExprId& id, Array<String>& value) const
void get (const TableExprId& id, Array<MVTime>& value) const
Bool getBool (const TableExprId& id) const
Double getDouble (const TableExprId& id) const
DComplex getDComplex (const TableExprId& id) const
String getString (const TableExprId& id) const
Array<Bool> getArrayBool (const TableExprId& id) const
Array<Double> getArrayDouble (const TableExprId& id) const
Array<DComplex> getArrayDComplex (const TableExprId& id) const
Array<String> getArrayString (const TableExprId& id) const
DataType getColumnDataType() const
Array<Bool> getColumnBool() const
Array<uChar> getColumnuChar() const
Array<Short> getColumnShort() const
Array<uShort> getColumnuShort() const
Array<Int> getColumnInt() const
Array<uInt> getColumnuInt() const
Array<Float> getColumnFloat() const
Array<Double> getColumnDouble() const
Array<Complex> getColumnComplex() const
Array<DComplex> getColumnDComplex() const
Array<String> getColumnString() const
void show (ostream&) const
void ranges (Block<TableExprRange>&)
Bool checkTable (const Table& table) const
Bool checkReplaceTable (const Table& table, Bool canBeConst=False) const
const Table& table() const
static TableExprNode newColumnNode (const Table& tab, const Table& name, const String<Table>& fieldNames)
static TableExprNode newKeyConst (const TableRecord&, const TableRecord<Vector>& fieldNames)
static void throwInvDT()
static void throwInvDT (const String& message)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNodeSet& set, const FunctionType& table, uInt origin = 0)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& node)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2, const TableExprNode& node3)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& array, const TableExprNodeSet& axes)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& array, const TableExprNode& node, const TableExprNodeSet& axes)
static TableExprNode newConeNode (TableExprFuncNode::FunctionType, const TableExprNodeSet& set, uInt origin = 0)
static TableExprNode newConeNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2)
static TableExprNode newConeNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2, const TableExprNode& node3)
static TableExprNode newRownrNode (const Table& table, uInt origin)
static TableExprNode newRowidNode (const Table& table)
static TableExprNode newRandomNode (const Table& table)
static TableExprNode newArrayPartNode (const TableExprNode& arrayNode, const TableExprNodeSet& indices, uInt origin)
const TableExprNodeRep* getNodeRep() const
Private Members
TableExprNodeRep* getRep()
static PtrBlock<TableExprNodeRep*> convertBlockTEN (Block<TableExprNode>& nodes)
TableExprNodeRep* newPlus (TableExprNodeRep* right) const
TableExprNodeRep* newMinus (TableExprNodeRep* right) const
TableExprNodeRep* newTimes (TableExprNodeRep* right) const
TableExprNodeRep* newDivide (TableExprNodeRep* right) const
TableExprNodeRep* newModulo (TableExprNodeRep* right) const
TableExprNodeRep* newEQ (TableExprNodeRep* right) const
TableExprNodeRep* newNE (TableExprNodeRep* right) const
TableExprNodeRep* newGE (TableExprNodeRep* right) const
TableExprNodeRep* newGT (TableExprNodeRep* right) const
TableExprNodeRep* newIN (TableExprNodeRep* right) const
TableExprNodeRep* newOR (TableExprNodeRep* right) const
TableExprNodeRep* newAND (TableExprNodeRep* right) const

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Etymology

TableExprNode represents a node in the tree reflecting a table select expression.

Synopsis

TableExprNode is the class to store a table select expression, which allows to select rows from the table. The selected rows form a table which is a view of the original table.

TableExprNode is a handle class for the counted referenced class TableExprNodeRep. Classes (like TableExprNodePlusXX) derived from TableExprNodeRep hold the individual nodes in the expression, i.e. the operators and operands. The nodes form a binary tree reflecting the expression. E.g. the expression 2*COLUMN results in the node TableExprNodeTimes with its children TableExprNodeConst and TableExprNodeColumn. Constant subexpressions (like 2*3) are evaluated immediately and only the result is stored as a node.

There are a few TableExprNode constructors taking a constant scalar or array. In this way constant value are automatically converted to the appropriate TableExprNodeConst object.

The derived classes also reflect the data type of the node. Data types Bool, Double, DComplex and String are used. Char, uChar, Short, uShort, Int, uInt and float are converted to Double and Complex to DComplex. Binary operators +, -, *, /, ==, >=, >, <, <= and != are recognized. Also &&, ||, parentheses and unary +, - and ! are recognized. For strings the binary operator + can also be used. The operators have the normal C++ precedence. Furthermore functions (like sin, max, ceil) can be used in an expression.
Operator() can be used to take a slice from an array.

The Table function col has to be used to create a TableExprNode object for a column in the table. The Table operator() can be used the do the actual selection from the top TableExprNode object.

Example

   // Select from table X all rows where column RA<5 and where column
   // SWITCH is true.
   Table table("X");
   Table subtable = table(table.col("RA") < 5 && table.col("SWITCH"));

   // Select from that result all rows where the concatenation of
   // the strings in columns STR1 and STR2 is equal to the string
   // in keyword STRKEY.
   Table subsub = subtable(subtable.col("STR1") + subtable.col("STR2")
                           == subtable.key("STRKEY"));

Motivation

Having TableExprNode as a handle class makes it possible to handle temporary objects created by the compiler in a smooth way. TableExprNode and its derivations allow to store an expression before actually evaluating it. This also allows the classes to be 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 the designed for these purposes.

To Do

Member Description

friend TableExprNode operator+ (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator- (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator* (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator/ (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator% (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator== (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator!= (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator>= (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator> (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator<= (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator< (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator&& (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode operator|| (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode near (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode near (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
friend TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right)
friend TableExprNode nearAbs (const TableExprNode& left, const TableExprNode& right, const TableExprNode& tolerance)
friend TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& cones)
friend TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& cones)
friend TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& cones)
friend TableExprNode cones (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
friend TableExprNode anyCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
friend TableExprNode findCone (const TableExprNode& sourcePos, const TableExprNode& conePos, const TableExprNode& radii)
friend TableExprNode sin (const TableExprNode& node)
friend TableExprNode sinh (const TableExprNode& node)
friend TableExprNode cos (const TableExprNode& node)
friend TableExprNode cosh (const TableExprNode& node)
friend TableExprNode exp (const TableExprNode& node)
friend TableExprNode log (const TableExprNode& node)
friend TableExprNode log10 (const TableExprNode& node)
friend TableExprNode pow (const TableExprNode& x, const TableExprNode& y)
friend TableExprNode square (const TableExprNode& node)
friend TableExprNode sqrt (const TableExprNode& node)
friend TableExprNode norm (const TableExprNode& node)
friend TableExprNode asin (const TableExprNode& node)
friend TableExprNode acos (const TableExprNode& node)
friend TableExprNode atan (const TableExprNode& node)
friend TableExprNode atan2 (const TableExprNode& y, const TableExprNode& x)
friend TableExprNode tan (const TableExprNode& node)
friend TableExprNode tanh (const TableExprNode& node)
friend TableExprNode sign (const TableExprNode& node)
friend TableExprNode round (const TableExprNode& node)
friend TableExprNode ceil (const TableExprNode& node)
friend TableExprNode abs (const TableExprNode& node)
friend TableExprNode floor (const TableExprNode& node)
friend TableExprNode fmod (const TableExprNode& x, const TableExprNode& y)
friend TableExprNode strlength (const TableExprNode& node)
friend TableExprNode upcase (const TableExprNode& node)
friend TableExprNode downcase (const TableExprNode& node)
friend TableExprNode trim (const TableExprNode& node)
friend TableExprNode regex (const TableExprNode& node)
friend TableExprNode pattern (const TableExprNode& node)
friend TableExprNode sqlpattern (const TableExprNode& node)
friend TableExprNode datetime (const TableExprNode& node)
friend TableExprNode mjdtodate (const TableExprNode& node)
friend TableExprNode mjd (const TableExprNode& node)
friend TableExprNode date (const TableExprNode& node)
friend TableExprNode year (const TableExprNode& node)
friend TableExprNode month (const TableExprNode& node)
friend TableExprNode day (const TableExprNode& node)
friend TableExprNode cmonth (const TableExprNode& node)
friend TableExprNode weekday (const TableExprNode& node)
friend TableExprNode cdow (const TableExprNode& node)
friend TableExprNode week (const TableExprNode& node)
friend TableExprNode time (const TableExprNode& node)
friend TableExprNode isNaN (const TableExprNode& node)
friend TableExprNode min (const TableExprNode& a, const TableExprNode& b)
friend TableExprNode max (const TableExprNode& a, const TableExprNode& b)
friend TableExprNode conj (const TableExprNode& node)
friend TableExprNode real (const TableExprNode& node)
friend TableExprNode imag (const TableExprNode& node)
friend TableExprNode amplitude (const TableExprNode& node)
friend TableExprNode phase (const TableExprNode& node)
friend TableExprNode arg (const TableExprNode& node)
friend TableExprNode formComplex (const TableExprNode& real, const TableExprNode& imag)
friend TableExprNode sum (const TableExprNode& array)
friend TableExprNode product (const TableExprNode& array)
friend TableExprNode sumSquare (const TableExprNode& array)
friend TableExprNode min (const TableExprNode& array)
friend TableExprNode max (const TableExprNode& array)
friend TableExprNode mean (const TableExprNode& array)
friend TableExprNode variance (const TableExprNode& array)
friend TableExprNode stddev (const TableExprNode& array)
friend TableExprNode avdev (const TableExprNode& array)
friend TableExprNode median (const TableExprNode& array)
friend TableExprNode fractile (const TableExprNode& array, const TableExprNode& fraction)
friend TableExprNode any (const TableExprNode& array)
friend TableExprNode all (const TableExprNode& array)
friend TableExprNode ntrue (const TableExprNode& array)
friend TableExprNode nfalse (const TableExprNode& array)
friend TableExprNode sums (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode products (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode sumSquares (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode mins (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode maxs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode means (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode variances (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode stddevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode avdevs (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode medians (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode fractiles (const TableExprNode& array, const TableExprNode& fraction, const TableExprNodeSet& collapseAxes)
friend TableExprNode anys (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode alls (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode ntrues (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode nfalses (const TableExprNode& array, const TableExprNodeSet& collapseAxes)
friend TableExprNode array (const TableExprNode& values, const TableExprNodeSet& shape)
friend TableExprNode isdefined (const TableExprNode& array)
friend TableExprNode nelements (const TableExprNode& array)
friend TableExprNode ndim (const TableExprNode& array)
friend TableExprNode shape (const TableExprNode& array)
friend TableExprNode iif (const TableExprNode& condition, const TableExprNode& arg1, const TableExprNode& arg2)

Define all global functions as friends.

TableExprNode ()

TableExprNode operator+ () const
TableExprNode operator- () const

Unary operators on numeric TableExprNode's.

TableExprNode operator! () const

Unary NOT-operator on boolean TableExprNode's.

TableExprNode operator() (const TableExprNodeSet& indices)

Slicing in a node containing an array. It is possible to address a single pixel or an n-dimensional subarray. In case of a single pixel the result is a scalar node. Otherwise the result is an array node with the same dimensionality as the source.
Note that there exist TableExprNodeSet constructors to convert an IPosition or Slicer object automatically to a . An IPosition<src> addresses a single element and results in a scalar node, while a <src>Slicer can address multiple elements and always results in an array node.

TableExprNode in (const TableExprNode& array) const
TableExprNode in (const TableExprNodeSet& set) const

The IN operator to test if a value is contained in an array or set. The array can also be a scalar.

TableExprNode (const Bool& value)
TableExprNode (const Int& value)
TableExprNode (const Double& value)
TableExprNode (const Complex& value)
TableExprNode (const DComplex& value)
TableExprNode (const String& value)
TableExprNode (const char*)
TableExprNode (const Regex& value)
TableExprNode (const MVTime& value)
TableExprNode (const Array<Bool>& value)
TableExprNode (const Array<uChar>& value)
TableExprNode (const Array<Short>& value)
TableExprNode (const Array<uShort>& value)
TableExprNode (const Array<Int>& value)
TableExprNode (const Array<uInt>& value)
TableExprNode (const Array<Float>& value)
TableExprNode (const Array<Double>& value)
TableExprNode (const Array<Complex>& value)
TableExprNode (const Array<DComplex>& value)
TableExprNode (const Array<String>& value)
TableExprNode (const Array<MVTime>& value)

Constructors to convert a constant value to a TableExprNode. The constructor for char* is also supported to convert a character-array to a string, since a two step conversion is not done automatically.

TableExprNode (TableExprNodeRep*)

Construct a node from a node representation.

TableExprNode (const TableExprNode&)

copy constructor (reference semantics).

TableExprNode& operator= (const TableExprNode&)

Assignment (reference semantics).

~TableExprNode ()

The destructor deletes all the underlying TableExprNode objects,

Bool isNull() const

Does the node contain no actual node?

DataType dataType() const

Get the data type of the expression. Currently the only possible values are TpBool, TpDouble, TpDComplex and TpString. An expression is thrown if the result is not a scalar of one of those types.

Bool isScalar() const

Is the expression a scalar?

uInt nrow() const

Get the number of rows in the table associated with this expression. One is returned if the expression is a constant. Zero is returned if no table is associated with it.

void get (const TableExprId& id, Bool& value) const
void get (const TableExprId& id, Double& value) const
void get (const TableExprId& id, DComplex& value) const
void get (const TableExprId& id, String& value) const
void get (const TableExprId& id, Regex& value) const
void get (const TableExprId& id, MVTime& value) const
void get (const TableExprId& id, Array<Bool>& value) const
void get (const TableExprId& id, Array<Double>& value) const
void get (const TableExprId& id, Array<DComplex>& value) const
void get (const TableExprId& id, Array<String>& value) const
void get (const TableExprId& id, Array<MVTime>& value) const
Bool getBool (const TableExprId& id) const
Double getDouble (const TableExprId& id) const
DComplex getDComplex (const TableExprId& id) const
String getString (const TableExprId& id) const
Array<Bool> getArrayBool (const TableExprId& id) const
Array<Double> getArrayDouble (const TableExprId& id) const
Array<DComplex> getArrayDComplex (const TableExprId& id) const
Array<String> getArrayString (const TableExprId& id) const

Get a value for this node in the given row. These functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.

DataType getColumnDataType() const

Get the data type for doing a getColumn on the expression. This is the data type of the column when the expression consists of a single column only. Otherwise it is the expression data type as returned by function dataType.

Array<Bool> getColumnBool() const
Array<uChar> getColumnuChar() const
Array<Short> getColumnShort() const
Array<uShort> getColumnuShort() const
Array<Int> getColumnInt() const
Array<uInt> getColumnuInt() const
Array<Float> getColumnFloat() const
Array<Double> getColumnDouble() const
Array<Complex> getColumnComplex() const
Array<DComplex> getColumnDComplex() const
Array<String> getColumnString() const

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.

void show (ostream&) const

Show the tree.

void ranges (Block<TableExprRange>&)

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 ||.

Bool checkTable (const Table& table) const

Check if the table used in the expression matches the given Table. This is used by the Table selection to check if it is correct.

Bool checkReplaceTable (const Table& table, Bool canBeConst=False) const

Same as checkTable, but the given table only needs to have the same description as the table in the expression. This is used by sorting/updating which parse the expression with the original table, but have to operate on the output of the selection process. If the tables are different, the table pointers in the expression are replaced. If canbeConst==True, the expression can be constant, thus does not need a table column in it.

const Table& table() const

Get table. This gets the Table object to which a TableExprNode belongs. A TableExprNode belongs to the Table to which the column(s) used in an expression belong. Note that all columns in an expression have to belong to the same table.

static TableExprNode newColumnNode (const Table& tab, const Table& name, const String<Table>& fieldNames)

Create a column node on behalf of the Table class. For builtin data types another type of node is created than for other data types. isArray indicates if the column should be an array column.

static TableExprNode newKeyConst (const TableRecord&, const TableRecord<Vector>& fieldNames)

Create a TableExprNodeConst for a table keyword (which is handled as a constant).

static void throwInvDT()
static void throwInvDT (const String& message)

Throw invalid data type exception.

static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNodeSet& set, const FunctionType& table, uInt origin = 0)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& node)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2, const TableExprNode& node3)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& array, const TableExprNodeSet& axes)
static TableExprNode newFunctionNode (TableExprFuncNode::FunctionType, const TableExprNode& array, const TableExprNode& node, const TableExprNodeSet& axes)

Create function node of the given type with the given arguments.

static TableExprNode newConeNode (TableExprFuncNode::FunctionType, const TableExprNodeSet& set, uInt origin = 0)
static TableExprNode newConeNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2)
static TableExprNode newConeNode (TableExprFuncNode::FunctionType, const TableExprNode& node1, const TableExprNode& node2, const TableExprNode& node3)

Create cone function node of the given type with the given arguments.

static TableExprNode newRownrNode (const Table& table, uInt origin)

Create rownumber() function node. Origin indicates whether the first row should be zero (for C++ binding) or an other value (one for TaQL binding).

static TableExprNode newRowidNode (const Table& table)

Create rowid() function node. Origin is always 0.

static TableExprNode newRandomNode (const Table& table)

Create rand() function node.

static TableExprNode newArrayPartNode (const TableExprNode& arrayNode, const TableExprNodeSet& indices, uInt origin)

Create ArrayElement node for the given array with the given index. The origin is 0 for C++ and 1 for TaQL.

const TableExprNodeRep* getNodeRep() const

returns pointer to the representation-object of it

TableExprNodeRep* getRep()

returns pointer to the representation-object of it

static PtrBlock<TableExprNodeRep*> convertBlockTEN (Block<TableExprNode>& nodes)

convert Block of TableExprNode to PtrBlock of TableExprNodeRep*.

TableExprNodeRep* newPlus (TableExprNodeRep* right) const
TableExprNodeRep* newMinus (TableExprNodeRep* right) const
TableExprNodeRep* newTimes (TableExprNodeRep* right) const
TableExprNodeRep* newDivide (TableExprNodeRep* right) const
TableExprNodeRep* newModulo (TableExprNodeRep* right) const
TableExprNodeRep* newEQ (TableExprNodeRep* right) const
TableExprNodeRep* newNE (TableExprNodeRep* right) const
TableExprNodeRep* newGE (TableExprNodeRep* right) const
TableExprNodeRep* newGT (TableExprNodeRep* right) const
TableExprNodeRep* newIN (TableExprNodeRep* right) const
TableExprNodeRep* newOR (TableExprNodeRep* right) const
TableExprNodeRep* newAND (TableExprNodeRep* right) const

Construct a new node for the given operation.