Class TExpression
- All Implemented Interfaces:
Visitable,Iterator<TSourceToken>
- Direct Known Subclasses:
TCollMapBase,TCollPredBase,TNamedParameter,TPositionalParameter
getExpressionType() was used to distinguish these types.
OBJECT NAME/CONSTANT/SOURCE TOKEN/FUNCTION CALL
- object name, usually this is a column reference like emp.ename
- type:
EExpressionType.simple_object_name_t - object name:
getObjectOperand() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- constant
- type:
EExpressionType.simple_constant_t - constant:
getConstantOperand() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- sourcetoken
- type:
EExpressionType.simple_source_token_t - source token:
getSourcetokenOperand() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- function call
- type:
EExpressionType.function_t - funcation call:
getFunctionCall() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- + expr1
- type:
EExpressionType.unary_plus_t - left operand: N/A
- right operand: getRightOperand
- operator:
getOperatorToken()
- type:
- - expr1
- type:
EExpressionType.unary_minus_t - left operand: N/A
- right operand: getRightOperand
- operator:
getOperatorToken()
- type:
- expr1 !
- type:
EExpressionType.unary_factorial_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken()
- type:
- ~ expr1
- type:
EExpressionType.unary_bitwise_not_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- @ expr1
- type:
EExpressionType.unary_absolutevalue_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- |/ expr1
- type:
EExpressionType.unary_squareroot_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- ||/ expr1
- type:
EExpressionType.unary_cuberoot_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- !! expr1
- type:
EExpressionType.unary_factorialprefix_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Oracle: PRIOR expr1
- type:
EExpressionType.unary_prior_t - left operand: N/A
- right operand: getRightOperand
- operator:
getOperatorToken()
- type:
- Oracle: CONNECT_BY_ROOT expr1
- type:
EExpressionType.unary_connect_by_root_t - left operand: N/A
- right operand: getRightOperand
- operator:
getOperatorToken()
- type:
- MySQL: BINARY expr1
- type:
EExpressionType.unary_prior_t - left operand: N/A
- right operand: getRightOperand
- operator:
getOperatorToken()
- type:
- Addition: expr1 + expr2
- type:
EExpressionType.arithmetic_plus_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Subtraction: expr1 - expr2
- type:
EExpressionType.arithmetic_minus_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Multiplication: expr1 * expr2
- type:
EExpressionType.arithmetic_times_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Division: expr1 / expr2
- type:
EExpressionType.arithmetic_divide_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Modula: expr1 % expr2
- type:
EExpressionType.arithmetic_modulo_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- exponentiate: expr1 ^ expr2
- type:
EExpressionType.exponentiate_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- sql server 2008 +=,-=,*=,/=,%=: expr1 [+=|-=|*=|/=|%=] expr2
- type:
EExpressionType.arithmetic_compound_operator_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 AND|&& expr2
- type:
EExpressionType.logical_and_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken() - expr1 OR | || expr2
- type:
EExpressionType.logical_or_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 XOR expr2
- type:
EExpressionType.logical_xor_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- NOT|! expr1
- type:
EExpressionType.logical_not_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- ASSIGNMENT: expr1 [:=|=] expr2
- type:
EExpressionType.assignment_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- CONCATENATE: expr1 || expr2
- type:
EExpressionType.concatenate_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 at time zone expr2
- type:
EExpressionType.at_time_zone_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator: N/A
- type:
- expr1 at local
- type:
EExpressionType.at_local_t - left operand:
getLeftOperand() - right operand: N/A
- operator: N/A
- type:
- Bitwise and : expr1 & expr2
- type:
EExpressionType.bitwise_and_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Bitwise or : expr1 | expr2
- type:
EExpressionType.bitwise_or_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Bitwise exclusive or : expr1 ^ expr2
- type:
EExpressionType.bitwise_exclusive_or_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Bitwise xor : expr1 ^ expr2
- type:
EExpressionType.bitwise_xor_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- Bitwise shift left : expr1 << expr2
- type:
EExpressionType.bitwise_shift_left_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
Bitwise shift right : expr1 >> expr2
- type:
EExpressionType.bitwise_shift_right_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- A scalar subquery expression is a subquery that returns exactly one column value from one row.
- type:
EExpressionType.subquery_t - subquery:
getSubQuery() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- ( expr1 )
- type:
EExpressionType.parenthesis_t - left operand is expr1:
getLeftOperand() - right operand: N/A
- operator: use
TParseTreeNode.getStartToken()to get ( andTParseTreeNode.getEndToken()to get )
- type:
- An expression list inside parenthesis like (expr,expr,...),
or one or more set of expressions: ((expr1,expr2,...),(expr1,expr2,...),(expr1,expr2,...)...)
- type:
EExpressionType.list_t - expr list:
getExprList(), may return null when expression list in syntax like this: () - left operand: N/A
- right operand: N/A
- operator: open parenthsis ( can be fetched via
TParseTreeNode.getStartToken(), close parenthesis ) can be fetched viaTParseTreeNode.getEndToken()
- type:
- Use a collection constructor to specify values for a collection column.
SET|MULTISET|LIST { epxr_list }
- type:
EExpressionType.collection_constructor_set_t - type:
EExpressionType.collection_constructor_multiset_t - type:
EExpressionType.collection_constructor_list_t - expr list:
getExprList(), may return null when expression list in syntax like this: () - left operand: N/A
- right operand: N/A
- type:
- A simple comparison condition specifies a comparison with expressions or subquery results.
expr1 EQUAL|NOT_EQUAL|LESS_THAN|GRREAT_THAN|LESS_EQUAL_THAN|GREATE_EQUAL_THAN expr2, or, (expr_list) EQUAL|NOT_EQUAL (subquery)- type:
EExpressionType.simple_comparison_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- A group comparison condition specifies a comparison with any or all members
in a list or subquery.
expr EQUAL|NOT_EQUAL|LESS_THAN|GRREAT_THAN|LESS_EQUAL_THAN|GREATE_EQUAL_THAN ANY|SOME|ALL (expr_list|subquery), or, (expr_list) EQUAL|NOT_EQUAL ANY|SOME|ALL (expr_list|subquery)- type:
EExpressionType.group_comparison_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken() - ANY|SOME|ALL:
getQuantifier()
- type:
- (expr|expr_list) |NOT] IN (expr_list)|(subquery)|expr
- type:
EExpressionType.in_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator is IN:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- case expression,let you use IF ... THEN ... ELSE logic in SQL statements without having to invoke procedures.
- type:
EExpressionType.case_t - case expression:
getCaseExpression()} - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- CURSOR subquery
- type:
EExpressionType.cursor_t - subquery:
getSubQuery() - left operand: N/A
- right operand: N/A
- operator: CURSOR can be fetched via
TParseTreeNode.getStartToken()
- type:
- expr1 [NOT] [LIKE|ILIKE|RLIKE|REGEXP|SIMILAR TO] [ALL|ANY|SOME]expr2 [ESCAPE expr3]
- type:
EExpressionType.pattern_matching_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - expr3:
getLikeEscapeOperand() - operator:
getOperatorToken() - NOT keyword:
getNotToken() - ALL|ANY|SOME keyword:
getQuantifier() - ESCAPE keyword: N/A
- type:
- expr ISNULL|NOTNULL|IS [NOT] NULL
- type:
EExpressionType.null_t - left operand:
getLeftOperand() - right operand: N/A
- operator is NULL:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr1 [NOT] BETWEEN expr2 AND expr3
- type:
EExpressionType.between_t - expr1:
getBetweenOperand() - expr2:
getLeftOperand() - expr3:
getRightOperand() - operator is BETWEEN:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- EXISTS (subquery)
- type:
EExpressionType.exists_t - left operand: N/A
- right operand: N/A
- subquery:
getSubQuery() - EXISTS:
TParseTreeNode.getStartToken()
- type:
- expr1 IS [NOT] UNKNOWN
- type:
EExpressionType.is_unknown_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr1 IS [NOT] TRUE
- type:
EExpressionType.is_true_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr1 IS [NOT] FALSE
- type:
EExpressionType.is_false_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr DAY [( integer )] TO SECOND [( integer )]
- type:
EExpressionType.day_to_second_t - left operand:
getLeftOperand() - right operand: N/A
- operator: N/A
- type:
- expr YEAR [( integer )] TO MONTH
- type:
EExpressionType.year_to_month_t - left operand:
getLeftOperand() - right operand: N/A
- operator: N/A
- type:
- ( date_time_expression date_time_term ) start TO end
- type:
EExpressionType.interval_t - date_time_expression:
getIntervalExpr() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- NEW function_call
- type:
EExpressionType.new_structured_type_t - function_call:
getFunctionCall() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- NEW VARIANT_TYPE ( type_argument_list )
- type:
EExpressionType.new_variant_type_t - type_argument_list:
getNewVariantTypeArgumentList() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- expr1 LDIFF|RDIFF|P_INTERSECT|P_NORMALIZE expr2
- type:
EExpressionType.new_variant_type_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 IS [NOT] UNTIL_CHANGED
- type:
EExpressionType.new_variant_type_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
expr1 << expr2
- type:
EExpressionType.left_shift_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 >> expr2
- type:
EExpressionType.right_shift_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 IS [NOT] DOCUMENT
- type:
EExpressionType.is_document_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr1 IS [NOT] DISTINCT FROM expr2
- type:
EExpressionType.is_distinct_from_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr1 *= expr2
- type:
EExpressionType.left_join_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 =* expr2
- type:
EExpressionType.right_join_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 COLLATE expr2
- type:
EExpressionType.collate_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- expr1 MEMBER OF expr2
- type:
EExpressionType.member_of_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
-
NEXT VALUE FOR <sequence name>, or NEXT <integer expression>VALUE FOR <sequence name>
- type:
EExpressionType.next_value_for_t - sequence name:
getSequenceName() - over_clause :
getOver_clause()} - left operand(integer expression):
getLeftOperand()
- expr1 => expr2
- type:
EExpressionType.ref_arrow_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr1 TYPECAST typename
- type:
EExpressionType.typecast_t - typename:
getTypeName() - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken()
- type:
- MULTISET subquery
- type:
EExpressionType.multiset_t - subquery:
getSubQuery() - left operand: N/A
- right operand: N/A
- operator: MULTISET can be fetched via
TParseTreeNode.getStartToken()
- type:
- expr is [NOT] NAN|INFINITE
- type:
EExpressionType.floating_point_t - left operand:
getLeftOperand() - right operand: N/A
- operator is IS:
getOperatorToken() - NOT keyword:
getNotToken()
- type:
- ROW ( expr_list )
- type:
EExpressionType.row_constructor_t - expr_list:
getExprList() - left operand: N/A
- right operand: N/A
- operator is ROW:
TParseTreeNode.getStartToken()
- type:
- expr is of type ( datatype,...)
- type:
EExpressionType.is_of_type_t - left operand:
getLeftOperand() - right operand: N/A
- operator: N/A
- type:
- place holder expression
- type:
EExpressionType.place_holder_t - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- [NEW] type_name( expr_list )
- type:
EExpressionType.type_constructor_t - type_name(expr_list):
getFunctionCall() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- array_name(index1)(index2)(index3)
- type:
EExpressionType.arrayaccess_t - array_name(index1)(index2)(index3):
getArrayAccess() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- objectExpr.[attributes].method()
- type:
EExpressionType.object_access_t - objectExpr.[attributes].method():
getObjectAccess() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- expr OPERATOR expr, means this expression was not recognized by SQL parser yet.
- type:
EExpressionType.unknown_t - left operand:
getLeftOperand() - right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- OPERATOR expr, means this expression was not recognized by SQL parser yet.
- type:
EExpressionType.unary_left_unknown_t - left operand: N/A
- right operand:
getRightOperand() - operator:
getOperatorToken()
- type:
- expr OPERATOR, means this expression was not recognized by SQL parser yet.
- type:
EExpressionType.unary_right_unknown_t - left operand:
getLeftOperand() - right operand: N/A
- operator:
getOperatorToken()
- type:
-
An array constructor is an expression that builds an array value using values for its member elements.
like this: ARRAY[1,2,3+4]
array element values can be accessed via
getExprList(),or
getExprList()can be null when it is: array[]It is also possible to construct an array from the results of a subquery like this:
SELECT ARRAY(SELECT oid FROM pg_proc WHERE proname LIKE 'bytea%');
thus, subquery can be access via
getSubQuery()- type:
EExpressionType.array_constructor_t - array element values:
getExprList() - subquery:
getSubQuery() - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
-
If an expression yields a value of a composite type (row type), then a specific field of the row can be extracted by writing
expression.fieldname
In general the row expression must be parenthesized, but the parentheses can be omitted
when the expression to be selected from is just a table reference or positional parameter.
For example:
mytable.mycolumn
$1.somecolumn
(rowfunction(a,b)).col3
(Thus, a qualified column reference is actually just a special case of the field selection syntax.) An important special case is extracting a field from a table column that is of a composite type:
(compositecol).somefield
(mytable.compositecol).somefield
The parentheses are required here to show that compositecol is a column name not a table name,
or that mytable is a table name not a schema name in the second case.
n a select list, you can ask for all fields of a composite value by writing .*:
(compositecol).*
When expression in following syntax, it will be marked as
fieldSelection, and checkgetFieldName()(rowfunction(a,b)).col3
(compositecol).somefield
(mytable.compositecol).somefield
(compositecol).*
Otherwise, it will be marked as
simpleObjectname:mytable.mycolumn
$1.somecolumn
- type:
EExpressionType.fieldselection_t - left operand: N/A
- right operand: N/A
- operator: N/A
- type:
- HIVE field expression syntax like fieldexpr[expr_subscript]
- type:
EExpressionType.array_access_expr_t - fieldexpr:
getLeftOperand() - expr_subscript:
getRightOperand() - operator: N/A
- type:
- HIVE field access syntax like fieldexpr.identifier.identifier...
- type:
EExpressionType.object_access_t - fieldexpr:
getLeftOperand() - identifier.identifier...:
getFieldList() - operator: N/A
- type:
- expr1 -> expr2
- type:
EExpressionType.json_get_object - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 ->> expr2
- type:
EExpressionType.json_get_text - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 #> expr2
- type:
EExpressionType.json_get_object_at_path - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 #>> expr2
- type:
EExpressionType.json_get_text_at_path - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 @> expr2
- type:
EExpressionType.json_left_contain - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 >@ expr2
- type:
EExpressionType.json_right_contain - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 ? expr2
- type:
EExpressionType.json_exist - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 ?| expr2
- type:
EExpressionType.json_any_exist - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- type:
- expr1 ?& expr2
- type:
EExpressionType.json_all_exist - left operand:
getLeftOperand() - right operand:
getLeftOperand()
- Oracle set operator: IS [NOT] A SET
- type:
EExpressionType.is_a_set_t - left operand:
getLeftOperand() - operator: N/A
- type:
- ARRAY <T>[ expr_list ], expr_list maybe empty
- type:
EExpressionType.array_t - left operand:
getExprList() getTypeName()returns the T of this Array if specified.
- type:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arrayaccess_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.array_constructor_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.assignment_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.at_local_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.at_time_zone_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.between_tstatic final intstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_and_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_exclusive_or_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_bitwise_not_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_or_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_shift_left_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_shift_right_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_xor_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.case_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.collate_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_compound_operator_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.parenthesis_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_prior_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_bitwise_not_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_minus_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_plus_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.concatenate_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_connect_by_root_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_cuberoot_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.cursor_tstatic final intDeprecated.As of v1.4.3.0static final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.day_to_second_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_divide_tstatic final intDeprecated.As of v1.4.3.0static final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.exists_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.exponentiate_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.list_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_factorial_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_factorialprefix_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.fieldselection_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.floating_point_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.function_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.group_comparison_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.in_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.group_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.interval_tstatic final intDeprecated.As of v1.4.3.0static final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.is_distinct_from_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.is_document_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.is_of_type_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.left_shift_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.left_join_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.logical_and_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.is_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.logical_not_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.logical_or_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.logical_xor_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.member_of_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_minus_tstatic final intDeprecated.As of v1.4.3.0static final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_modulo_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.multiset_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_binary_operator_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.new_structured_type_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.new_variant_type_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.next_value_for_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.null_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.object_access_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.pattern_matching_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.period_ldiff_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.period_p_intersect_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.period_p_normalize_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.period_rdiff_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.place_holder_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_plus_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.power_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.range_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.ref_arrow_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.right_shift_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.right_join_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.row_constructor_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.scope_resolution_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.simple_comparison_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.simple_constant_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.simple_object_name_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.simple_source_token_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.sqlserver_proprietary_column_alias_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_squareroot_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.subquery_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_times_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.is_true_t,EExpressionType.is_false_t,EExpressionType.is_unknown_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.typecast_tstatic final intDeprecated.As of v1.4.3.0static final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.not_initialized_yet_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unknown_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_left_unknown_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.unary_right_unknown_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.until_changed_tstatic final intDeprecated.As of v1.4.3.0, replaced byEExpressionType.year_to_month_tFields inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken -
Constructor Summary
ConstructorsConstructorDescriptionTExpression(EExpressionType pExpressionType) TExpression(EExpressionType pExpressionType, TExpression pLeft, TExpression pRight) TExpression(EExpressionType pExpressionType, TExpression pLeft, TExpression pRight, EComparisonType pComparisonType) TExpression(TConstant constantOperand) TExpression(TFunctionCall functionCall) TExpression(TObjectName objectOperand) -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept a visitorvoidAccept a visitor to iterate this class and sub-nodes of this classvoidaddANDCondition(String condition) if original expr is f > 1, and call addANDCondition("f2 > 2") expression will be: f > 1 and f2> 2voidaddORCondition(String condition) if original expr is f > 1, and call addORCondition("f2 > 2") expression will be: f > 1 or f2 >2voidcopyTo(TExpression target) static TExpressioncreateExpression(EDbVendor dbVendor, EExpressionType pExpressionType, TSourceToken pOperatorToken, TExpression pLeft, TExpression pRight) static TExpressioncreateExpression(EDbVendor dbVendor, EExpressionType pExpressionType, TSourceToken pOperatorToken, TObjectName pLeft, TConstant pRight) static TExpressioncreateExpression(EDbVendor dbVendor, EExpressionType pExpressionType, TSourceToken pOperatorToken, TObjectName pLeft, TObjectName pRight) static TExpressioncreateExpression(EDbVendor dbVendor, TConstant constantOperand) static TExpressioncreateExpression(EDbVendor dbVendor, TObjectName objectOperand) static TExpressionvoiddoParse(TCustomSqlStatement psql, ESqlClause plocation) Analyze the sub-nodes inside this node.evaluate(gudusoft.gsqlparser.compiler.IEvaluationContext context) voidevaluate(Stack<gudusoft.gsqlparser.compiler.TFrame> frameStack, TCustomSqlStatement sqlStatement) bigint(expr) in databricks, return EDataType.bigint_tstatic EComparisonTypegetComparisonType(TSourceToken comparisonOperator) gudusoft.gsqlparser.compiler.ITypeDeprecated.since v2.5.3.1, replaced bygetDataConversions()Deprecated.since v2.5.3.1, replaced bygetDataConversions()In Teradata, it is possible there is an alias for expressionchange return type from int to EExpressionType since 1.4.3.0valid whengetExpressionType()isfieldSelectionBinary tree structure representation of expression makes AND/OR expression nested deeply when there are lots of AND/OR condition is used.Deprecated.As of v1.4.3.3, replaced bygetRightOperand()Operator token used in expression such as +,-,*,/ and etcOperator token used in expression which contains multiple operator tokens such as SIMILAR TO , IS DISTINCT FROM and etc added since v3.0.8.6teradata:longlongone of the following quantifier keywords: SOME, ANY, ALLgetVal()value of this expression, valid only after evaluate this expression.voidInitialize a query tree node.voidvoidvoidinitialize a new instance of TExpression.voidTraverse expression in In Order.booleanisLeaf()expression type such as column reference is a leaf expression while subtract expression is not a leaf expression.booleanisLeafExpr(TParseTreeNode pnode) booleanbooleanDeprecated.As of v1.4.3.0, replaced bygetNotToken()booleanbooleanbooleanbooleanIf an expression yields a value of an array type, then a specific element of the array value can be extracted by writingbooleanPostgreSQL BETWEEN SYMMETRIC is the same as BETWEEN except there is no requirement that the argument to the left of AND be less than or equal to the argument on the right.booleanstatic TExpressionmergeObjectNameList(TExpression expr, TObjectNameList objectNameList) voidTraverse expression in post order.voidTraverse expression in pre Order.voidremove()voidremove2()voidremoveMe()remove this expression from it's parent expr.searchColumn(String columnName) Deprecated.As of v2.0.5.6, use class ColumnVisitor in package demos.columnInWhereClause instead.voidsetArrayAccess(TArrayAccess arrayAccess) Deprecated.As of v1.4.3.3voidsetBetweenOperand(TExpression betweenOperand) voidsetCaseExpression(TCaseExpression caseExpression) voidsetComparisonOperator(TDummy comparisonOperator) voidsetComparisonOperator(TSourceToken comparisonOperator) voidsetComparisonType(EComparisonType comparisonType) voidsetConstantOperand(TConstant constantOperand) voidsetDataConversions(ArrayList<TDataConversion> dataConversions) voidsetDataType(gudusoft.gsqlparser.compiler.IType dataType) voidsetDataTypeConversion(TExplicitDataTypeConversion dataTypeConversion) voidsetDataTypeConversionList(TPTNodeList<TExplicitDataTypeConversion> dataTypeConversionList) voidsetDatetimeExpression(TDatetimeExpression datetimeExpression) voidsetExceptReplaceClause(TExceptReplaceClause exceptReplaceClause) voidsetExecuteSqlNode(TExecuteSqlNode executeSqlNode) voidsetExprAlias(TAliasClause exprAlias) voidsetExpressionType(EExpressionType exprType) voidsetExprList(TExpressionList exprList) voidsetFieldList(TObjectNameList fieldList) voidsetFractionalSecondsPrecision(TSourceToken fractionalSecondsPrecision) voidsetFunctionCall(TFunctionCall functionCall) voidsetHive_variable(THiveVariable hive_variable) voidsetIndirection(TIndirection indirection) voidvoidsetIntervalExpr(TIntervalExpression intervalExpr) voidsetIntervalExpression(TIntervalExpression intervalExpression) voidsetLeadingPrecision(TSourceToken leadingPrecision) voidsetLeftOperand(TExpression leftOperand) voidvoidsetLikeEscapeOperand(TExpression likeEscapeOperand) voidsetNewVariantTypeArgumentList(TNewVariantTypeArgumentList newVariantTypeArgumentList) voidsetNotToken(TSourceToken notToken) voidsetObjectAccess(TObjectAccess objectAccess) voidsetObjectOperand(TObjectName objectOperand) voidsetOperatorToken(TSourceToken operatorToken) voidsetOracleOuterJoin(boolean oracleOuterJoin) voidsetOutputFormatPhraseList(TOutputFormatPhraseList outputFormatPhraseList) voidsetParentExpr(TExpression parentExpr) voidsetPlainTextColumnNo(long plainTextColumnNo) voidsetPlainTextLineNo(long plainTextLineNo) voidsetQuantifier(TSourceToken quantifier) voidsetQuantifierType(EQuantifierType quantifierType) voidsetRightOperand(TExpression rightOperand) voidvoidsetSourcetokenOperand(TSourceToken sourcetokenOperand) voidsetStringValue(String value) voidsetSubQuery(TSelectSqlStatement subQuery) voidsetSubQueryInStmt(boolean subQueryInStmt) voidsetSubQueryNode(TSelectSqlNode subQueryNode) voidsetSymmetric(boolean symmetric) voidvoidsetTypeName(TTypeName typeName) voidvoidsetVisitSubTree(boolean visitSubTree) voidsetWindowSpecification(TWindowDef windowSpecification) Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, removeAllMyTokensFromTokenList, removeTokens, removeTokensBetweenNodes, removeTokensBetweenToken, replaceWithNewNode, resetIterator, setAnchorNode, setChanged, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setEndToken, setEndTokenDirectly, setEvaluateDatatype, setEvalValue, setGsqlparser, setIncludingComment, setLocation, setNewSubNode, setNodeStatus, setNodeType, setParent, setPlainText, setStartToken, setStartToken, setStartToken, setStartToken, setStartTokenDirectly, setString, setString2, subNodeInNode, toScript, toString, toString2Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
BigAndOrNestLevel
- See Also:
-
unknown
Deprecated.As of v1.4.3.0, replaced byEExpressionType.not_initialized_yet_t- See Also:
-
PLUS
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_plus_t- See Also:
-
MINUS
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_minus_t- See Also:
-
TIMES
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_times_t- See Also:
-
DIVIDE
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_divide_t- See Also:
-
CONCATENATE
Deprecated.As of v1.4.3.0, replaced byEExpressionType.concatenate_t- See Also:
-
MODULO
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_modulo_t- See Also:
-
ASSIGNMENT
Deprecated.As of v1.4.3.0, replaced byEExpressionType.assignment_t- See Also:
-
BITWISE_AND
Deprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_and_t- See Also:
-
BITWISE_OR
Deprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_or_t- See Also:
-
BITWISE_XOR
Deprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_xor_t- See Also:
-
BITWISE_EXCLUSIVE_OR
Deprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_exclusive_or_t- See Also:
-
SCOPE_RESOLUTION
Deprecated.As of v1.4.3.0, replaced byEExpressionType.scope_resolution_t- See Also:
-
EXPONENTIATE
Deprecated.As of v1.4.3.0, replaced byEExpressionType.exponentiate_t- See Also:
-
compoundAssignment
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arithmetic_compound_operator_t- See Also:
-
simpleObjectname
Deprecated.As of v1.4.3.0, replaced byEExpressionType.simple_object_name_t- See Also:
-
simpleConstant
Deprecated.As of v1.4.3.0, replaced byEExpressionType.simple_constant_t- See Also:
-
simpleSourcetoken
Deprecated.As of v1.4.3.0, replaced byEExpressionType.simple_source_token_t- See Also:
-
compoundParenthesis
Deprecated.As of v1.4.3.0, replaced byEExpressionType.parenthesis_t- See Also:
-
compoundUnaryPlus
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_plus_t- See Also:
-
compoundUnaryMinus
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_minus_t- See Also:
-
compoundPrior
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_prior_t- See Also:
-
caseExprOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.case_t- See Also:
-
cursorExprOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.cursor_t- See Also:
-
funcationCallOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.function_t- See Also:
-
datetimeExprOperator
Deprecated.As of v1.4.3.0- See Also:
-
intervalExprOperator
Deprecated.As of v1.4.3.0- See Also:
-
modelExprOperator
Deprecated.As of v1.4.3.0- See Also:
-
subqueryExprOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.subquery_t- See Also:
-
typeconstructorExprOperator
Deprecated.As of v1.4.3.0- See Also:
-
objectaccessExprOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.object_access_t- See Also:
-
placeholderExprOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.place_holder_t- See Also:
-
in_expr
Deprecated.As of v1.4.3.0, replaced byEExpressionType.group_t- See Also:
-
expr_list
Deprecated.As of v1.4.3.0, replaced byEExpressionType.list_t- See Also:
-
dummyOperator
Deprecated.As of v1.4.3.0- See Also:
-
simple_comparison_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.simple_comparison_t- See Also:
-
group_comparison_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.group_comparison_t- See Also:
-
in_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.in_t- See Also:
-
floating_point_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.floating_point_t- See Also:
-
pattern_matching_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.pattern_matching_t- See Also:
-
null_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.null_t- See Also:
-
between_conditions
Deprecated.As of v1.4.3.0, replaced byEExpressionType.between_t- See Also:
-
exists_condition
Deprecated.As of v1.4.3.0, replaced byEExpressionType.exists_t- See Also:
-
isoftype_condition
Deprecated.As of v1.4.3.0, replaced byEExpressionType.is_of_type_t- See Also:
-
logical_conditions_and
Deprecated.As of v1.4.3.0, replaced byEExpressionType.logical_and_t- See Also:
-
logical_conditions_or
Deprecated.As of v1.4.3.0, replaced byEExpressionType.logical_or_t- See Also:
-
logical_conditions_xor
Deprecated.As of v1.4.3.0, replaced byEExpressionType.logical_xor_t- See Also:
-
logical_conditions_not
Deprecated.As of v1.4.3.0, replaced byEExpressionType.logical_not_t- See Also:
-
logical_conditions_is
Deprecated.As of v1.4.3.0, replaced byEExpressionType.is_t- See Also:
-
RANGE
Deprecated.As of v1.4.3.0, replaced byEExpressionType.range_t- See Also:
-
POWER
Deprecated.As of v1.4.3.0, replaced byEExpressionType.power_t- See Also:
-
at_time_zone
Deprecated.As of v1.4.3.0, replaced byEExpressionType.at_time_zone_t- See Also:
-
at_local
Deprecated.As of v1.4.3.0, replaced byEExpressionType.at_local_t- See Also:
-
day_to_second
Deprecated.As of v1.4.3.0, replaced byEExpressionType.day_to_second_t- See Also:
-
year_to_month
Deprecated.As of v1.4.3.0, replaced byEExpressionType.year_to_month_t- See Also:
-
interval_expression
Deprecated.As of v1.4.3.0, replaced byEExpressionType.interval_t- See Also:
-
new_structured_type
Deprecated.As of v1.4.3.0, replaced byEExpressionType.new_structured_type_t- See Also:
-
new_variant_type
Deprecated.As of v1.4.3.0, replaced byEExpressionType.new_variant_type_t- See Also:
-
period_ldiff
Deprecated.As of v1.4.3.0, replaced byEExpressionType.period_ldiff_t- See Also:
-
period_rdiff
Deprecated.As of v1.4.3.0, replaced byEExpressionType.period_rdiff_t- See Also:
-
period_p_intersect
Deprecated.As of v1.4.3.0, replaced byEExpressionType.period_p_intersect_t- See Also:
-
period_p_normalize
Deprecated.As of v1.4.3.0, replaced byEExpressionType.period_p_normalize_t- See Also:
-
until_changed
Deprecated.As of v1.4.3.0, replaced byEExpressionType.until_changed_t- See Also:
-
is_document
Deprecated.As of v1.4.3.0, replaced byEExpressionType.is_document_t- See Also:
-
is_distinct_from
Deprecated.As of v1.4.3.0, replaced byEExpressionType.is_distinct_from_t- See Also:
-
true_false_unknown
Deprecated.As of v1.4.3.0, replaced byEExpressionType.is_true_t,EExpressionType.is_false_t,EExpressionType.is_unknown_t- See Also:
-
COLLATE
Deprecated.As of v1.4.3.0, replaced byEExpressionType.collate_t- See Also:
-
LEFTJOIN_OP
Deprecated.As of v1.4.3.0, replaced byEExpressionType.left_join_t- See Also:
-
RIGHTJOIN_OP
Deprecated.As of v1.4.3.0, replaced byEExpressionType.right_join_t- See Also:
-
ref_arrow
Deprecated.As of v1.4.3.0, replaced byEExpressionType.ref_arrow_t- See Also:
-
typecast
Deprecated.As of v1.4.3.0, replaced byEExpressionType.typecast_t- See Also:
-
arrayaccess
Deprecated.As of v1.4.3.0, replaced byEExpressionType.arrayaccess_t- See Also:
-
connect_by_root
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_connect_by_root_t- See Also:
-
sqlserver_proprietary_column_alias
Deprecated.As of v1.4.3.0, replaced byEExpressionType.sqlserver_proprietary_column_alias_t- See Also:
-
mysql_binary_operator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_binary_operator_t- See Also:
-
left_shift
Deprecated.As of v1.4.3.0, replaced byEExpressionType.left_shift_t- See Also:
-
right_shift
Deprecated.As of v1.4.3.0, replaced byEExpressionType.right_shift_t- See Also:
-
multisetExprOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.multiset_t- See Also:
-
fieldSelection
Deprecated.As of v1.4.3.0, replaced byEExpressionType.fieldselection_t- See Also:
-
arrayConstructor
Deprecated.As of v1.4.3.0, replaced byEExpressionType.array_constructor_t- See Also:
-
rowConstructor
Deprecated.As of v1.4.3.0, replaced byEExpressionType.row_constructor_t- See Also:
-
factorial
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_factorial_t- See Also:
-
squareRoot
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_squareroot_t- See Also:
-
cubeRoot
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_cuberoot_t- See Also:
-
factorialPrefix
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_factorialprefix_t- See Also:
-
absoluteValue
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_absolutevalue_t- See Also:
-
BITWISE_SHIFT_LEFT
Deprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_shift_left_t- See Also:
-
BITWISE_SHIFT_RIGHT
Deprecated.As of v1.4.3.0, replaced byEExpressionType.bitwise_shift_right_t- See Also:
-
BITWISE_NOT
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_bitwise_not_t- See Also:
-
compoundUnaryBitwiseNot
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_bitwise_not_t- See Also:
-
member_of
Deprecated.As of v1.4.3.0, replaced byEExpressionType.member_of_t- See Also:
-
nextValueOf
Deprecated.As of v1.4.3.0, replaced byEExpressionType.next_value_for_t- See Also:
-
UnknownOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unknown_t- See Also:
-
UnknownUnaryOperator
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_left_unknown_t- See Also:
-
UnknownUnaryOperatorRight
Deprecated.As of v1.4.3.0, replaced byEExpressionType.unary_right_unknown_t- See Also:
-
-
Constructor Details
-
TExpression
public TExpression() -
TExpression
-
TExpression
-
TExpression
-
TExpression
-
TExpression
-
TExpression
public TExpression(EExpressionType pExpressionType, TExpression pLeft, TExpression pRight, EComparisonType pComparisonType)
-
-
Method Details
-
getColumnsInsideExpression
-
getCastDatatype
bigint(expr) in databricks, return EDataType.bigint_t- Returns:
- datatype
-
setLeftUnary
-
setRightUnary
-
setDataConversions
-
getDataConversions
-
setStringValue
-
getStringValue
-
setDataType
-
getDataType
-
getCollectionCondition
-
getCollectionArray
-
getNamedParameter
-
getPositionalParameter
-
getArrayConstruct
-
getObjectConstruct
-
evaluate
public void evaluate(Stack<gudusoft.gsqlparser.compiler.TFrame> frameStack, TCustomSqlStatement sqlStatement) -
evaluate
-
searchColumn
Deprecated.As of v2.0.5.6, use class ColumnVisitor in package demos.columnInWhereClause instead. -
getAndOrTokenBeforeExpr
- Returns:
- AND/OR token before expression when you get flattened expression using
getFlattedAndOrExprs()
-
getFlattedAndOrExprs
Binary tree structure representation of expression makes AND/OR expression nested deeply when there are lots of AND/OR condition is used. Recursively function call on those nested AND/OR expression will cause stack overflow exception. After flatten those expressions. we can iterate those expression in a linear way.- Returns:
- null if this is not AND/OR expression
-
setTokenToIdentifier
-
setComparisonType
-
getComparisonType
-
getExprAlias
In Teradata, it is possible there is an alias for expression- Returns:
- expression alias
-
setExprAlias
-
setDataTypeConversionList
public void setDataTypeConversionList(TPTNodeList<TExplicitDataTypeConversion> dataTypeConversionList) -
getDataTypeConversionList
Deprecated.since v2.5.3.1, replaced bygetDataConversions() -
setDataTypeConversion
-
getDataTypeConversion
Deprecated.since v2.5.3.1, replaced bygetDataConversions()- Returns:
- the first DataTypeConversion in
getDataTypeConversionList()
-
getSequenceName
-
getOver_clause
-
getHive_variable
-
setHive_variable
-
setSymmetric
-
isSymmetric
PostgreSQL BETWEEN SYMMETRIC is the same as BETWEEN except there is no requirement that the argument to the left of AND be less than or equal to the argument on the right. If it is not, those two arguments are automatically swapped, so that a nonempty range is always implied.- Returns:
- true if SYMMETRIC is used
-
setObjectAccess
-
getObjectAccess
-
isNotOperator
-
setNotToken
-
getNotToken
-
setPlainTextLineNo
-
setPlainTextColumnNo
-
getPlainTextLineNo
-
getPlainTextColumnNo
-
setExecuteSqlNode
-
createExpression
-
createExpression
-
createExpression
public static TExpression createExpression(EDbVendor dbVendor, EExpressionType pExpressionType, TSourceToken pOperatorToken, TObjectName pLeft, TObjectName pRight) -
createExpression
public static TExpression createExpression(EDbVendor dbVendor, EExpressionType pExpressionType, TSourceToken pOperatorToken, TObjectName pLeft, TConstant pRight) -
createExpression
public static TExpression createExpression(EDbVendor dbVendor, EExpressionType pExpressionType, TSourceToken pOperatorToken, TExpression pLeft, TExpression pRight) -
createParenthesisExpression
-
init
Description copied from class:TParseTreeNodeInitialize a query tree node. Used internally- Overrides:
initin classTParseTreeNode- Parameters:
arg1- first argument
-
setLeadingPrecision
-
setFractionalSecondsPrecision
-
getLeadingPrecision
-
getFractionalSecondsPrecision
-
init
- Overrides:
initin classTParseTreeNode
-
init
- Overrides:
initin classTParseTreeNode
-
init
initialize a new instance of TExpression.- Overrides:
initin classTParseTreeNode- Parameters:
arg1- type of this expression, a value of typeEExpressionTypearg2- operator, a value ofTSourceTokenarg3- left operand, a value ofTExpressionthe meaning of this parameter varies depends on the value of arg1.arg4- right operand, a value ofTExpression
-
setOperatorToken
-
getOperatorTokens
Operator token used in expression which contains multiple operator tokens such as SIMILAR TO , IS DISTINCT FROM and etc added since v3.0.8.6- Returns:
- operator token list
-
getOperatorToken
Operator token used in expression such as +,-,*,/ and etc- Returns:
- operator token
-
setVal
-
getVal
value of this expression, valid only after evaluate this expression.- Returns:
- a value object
-
getConstantOperand
-
setNewVariantTypeArgumentList
-
getNewVariantTypeArgumentList
-
setTypeName
-
getTypeName
-
getFieldName
valid whengetExpressionType()isfieldSelection- Returns:
- field name
-
setIndirection
-
isSubscripts
If an expression yields a value of an array type, then a specific element of the array value can be extracted by writingexpression[subscript]
or multiple adjacent elements (an "array slice") can be extracted by writing
expression[lower_subscript:upper_subscript]
In general the array expression must be parenthesized, but the parentheses can be omitted when the expression to be subscripted is just a column reference or positional parameter.
Also, multiple subscripts can be concatenated when the original array is multidimensional. For example:
when sytnax like this:
mytable.arraycolumn[4]
mytable.two_d_column[17][34]
$1[10:42]
check
getObjectOperand()for more detailed information about subscript.when syntax like this:
(arrayfunction(a,b))[42]
check
getIndirection()whenisSubscripts()is true.- Returns:
- tells whether it is an expression with subscript.
-
getJson_path
-
getIndirection
-
isNotModifier
Deprecated.As of v1.4.3.0, replaced bygetNotToken() -
setOutputFormatPhraseList
-
getOutputFormatPhraseList
teradata:column_expr (named alias_name)
- Returns:
- (named alias_name) in column_expr
-
getExprList
-
setIntervalExpr
-
getIntervalExpr
-
getExceptReplaceClause
-
setExceptReplaceClause
-
setFieldList
-
getFieldList
-
setInExpr
-
getInExpr
Deprecated.As of v1.4.3.3, replaced bygetRightOperand() -
setExprList
-
setOracleOuterJoin
-
isOracleOuterJoin
-
getParentExpr
-
setParentExpr
-
isLeftOperandOfParent
-
isRightOperandOfParent
-
setLeftOperand
-
setRightOperand
-
getRightOperand
- Returns:
- right operand of this expression which should be type of TExpression
-
getLeftOperand
- Returns:
- left operand of this expression which should be type of TExpression
-
getLikeEscapeOperand
-
getBetweenOperand
-
getArrayAccess
-
getExpressionType
change return type from int to EExpressionType since 1.4.3.0- Returns:
- a value of
EExpressionType
-
setExpressionType
- Parameters:
exprType- type to distinguish expression, change type from int to EExpressionType since 1.4.3.0
-
setObjectOperand
-
getObjectOperand
-
setConstantOperand
-
getSourcetokenOperand
-
setSourcetokenOperand
-
setCaseExpression
-
getCaseExpression
-
setArrayAccess
Deprecated.As of v1.4.3.3 -
getExecuteSqlNode
-
setSubQueryNode
-
setSubQuery
-
getSubQuery
-
setSubQueryInStmt
-
getFunctionCall
-
setFunctionCall
-
setDatetimeExpression
-
setIntervalExpression
-
setBetweenOperand
-
setLikeEscapeOperand
-
doParse
Description copied from class:TParseTreeNodeAnalyze the sub-nodes inside this node. Such as build the relationship between table and column.- Overrides:
doParsein classTParseTreeNode- Parameters:
psql- SQL statement this node belongs toplocation- SQL clause this node belongs to
-
setQuantifierType
-
getQuantifierType
-
getComparisonType
-
getQuantifier
one of the following quantifier keywords: SOME, ANY, ALL- Returns:
- SOME, ANY, ALL in group comparison condition.
-
getComparisonOperator
- Returns:
- operator used in comparison condition.
-
setComparisonOperator
-
setComparisonOperator
-
setQuantifier
-
accept
Description copied from class:TParseTreeNodeAccept a visitor- Specified by:
acceptin interfaceVisitable- Overrides:
acceptin classTParseTreeNode- Parameters:
v- visitor is a descendant class ofTParseTreeVisitor
-
acceptChildren
Description copied from class:TParseTreeNodeAccept a visitor to iterate this class and sub-nodes of this class- Specified by:
acceptChildrenin interfaceVisitable- Overrides:
acceptChildrenin classTParseTreeNode- Parameters:
v- visitor is a descendant class ofTParseTreeVisitor
-
isLeaf
expression type such as column reference is a leaf expression while subtract expression is not a leaf expression. Usually, non-leaf expression should including bothgetLeftOperand()andgetRightOperand().- Returns:
- leaf expression or not.
-
isLeafExpr
-
setVisitSubTree
-
isVisitSubTree
-
setWindowSpecification
-
preOrderTraverse
Traverse expression in pre Order.- Parameters:
ev- user defined visitor
-
inOrderTraverse
Traverse expression in In Order.- Parameters:
ev- user defined visitor
-
postOrderTraverse
Traverse expression in post order.- Parameters:
ev- user defined visitor
-
addANDCondition
if original expr is f > 1, and call addANDCondition("f2 > 2") expression will be: f > 1 and f2> 2- Parameters:
condition-
-
addORCondition
if original expr is f > 1, and call addORCondition("f2 > 2") expression will be: f > 1 or f2 >2- Parameters:
condition-
-
removeMe
remove this expression from it's parent expr. if itself is the top level expression, then remove it from parse treef1 > 1 and f2 > 2, after remove f2 > 2, parent expression will be changed to: f1 > 1
If we need to remove condition f > 1 from where clause: where f > 1, Here f > 1 is the top level expression, after remove it from where clause, only WHERE keyword left in where clause.
-
remove2
-
remove
- Specified by:
removein interfaceIterator<TSourceToken>- Overrides:
removein classTParseTreeNode
-
copyTo
-
mergeObjectNameList
-
getcolDefList
-
EExpressionType.unary_absolutevalue_t