public class TSelectSqlStatement extends TCustomSqlStatement
TSelectSqlStatement represents query specification, query expression and select statement.
getResultColumnList(boolean)TCustomSqlStatement.joinsTCustomSqlStatement.getWhereClause()getGroupByClause()getGroupByClause()getOrderbyClause()getOffsetClause()getComputeClause()getForUpdateClause()TCustomSqlStatement.getCteList()isCombinedQuery() to check whether UNION, EXCEPT and INTERSECT operators is used.
If returns true, use getLeftStmt() and getRightStmt() to get query expression.
You need to check isCombinedQuery() recursively, all clauses of TSelectSqlStatement
only available when this function returns false.TCustomSqlStatement.SqlNormalizationProfile| Modifier and Type | Field and Description |
|---|---|
static int |
SET_OPERATOR_EXCEPTDISTINCT |
static int |
SET_OPERATOR_INTERSECTDISTINCT |
static int |
SET_OPERATOR_MINUSDISTINCT |
static int |
SET_OPERATOR_NONE |
static int |
SET_OPERATOR_UNIONDISTINCT |
static int |
setOperator_except |
static int |
setOperator_exceptall |
static int |
setOperator_intersect |
static int |
setOperator_intersectall |
static int |
setOperator_minus |
static int |
setOperator_minusall |
static int |
setOperator_union |
static int |
setOperator_unionall |
dummytag, fromClause, fromSourceJoin, fromSourceTable, isctequery, isparsed, joins, parser, plsqlparser, rootNode, semicolonended, sourcetokenlist, sqlstatementtype, stmtScope, tablesdbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken| Constructor and Description |
|---|
TSelectSqlStatement(EDbVendor dbvendor) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(TParseTreeVisitor v)
Accept a visitor
|
void |
acceptChildren(TParseTreeVisitor v)
Accept visitor to visit this class.
|
void |
addColumnInSelectListToSQLEnv(TSQLTable sqlTable) |
TWhereClause |
addCondition(String condition)
this function is alias of addWhereClause
|
TWhereClause |
addConditionOR(String condition) |
TOrderBy |
addOrderBy(String orderByStr)
Add an order by clause to this class.
|
TWhereClause |
addWhereClause(String condition) |
TWhereClause |
addWhereClauseOR(String condition) |
protected TWhereClause |
doAddWhereClause(String condition,
boolean isAnd) |
int |
doParseStatement(TCustomSqlStatement psql)
This function is used internal.
|
TResultColumn |
findEnclosingAliasDefinition(TObjectName reference,
TSQLEnv sqlEnv)
The SELECT-list alias of an ENCLOSING SELECT block that
reference, an unqualified name of this block,
stands for in SAP IQ and SQL Anywhere (Mantis 4752). |
ArrayList<TAttributeNode> |
getAttributes()
在 sql script 中,和该 relation 关联的 attribute。
select a from t;
attribute a 就是 relation t 的 referenceAttribute, 如果没有 metadata and ddl,
relation t 的 getAttributes() 应该可以推断出包含 a, 但 t 是否还包含其他的 attribute 就无从得知。
|
TClusterBy |
getClusterBy() |
ArrayList<String> |
getColumnsInFromClause() |
TComputeClause |
getComputeClause() |
TDistributeBy |
getDistributeBy() |
TSourceToken |
getEndToken()
The last token of the node
|
TreeMap<String,TResultColumn> |
getExpandedResultColumns() |
TExpandOnClause |
getExpandOnClause() |
TSelectSqlStatement |
getFarLeftStmt() |
TFetchFirstClause |
getFetchFirstClause()
Fetch first/next clause
|
ArrayList<TSelectSqlStatement> |
getFlattenedSelects() |
TForUpdate |
getForUpdateClause() |
TFromClause |
getFromClause() |
TGroupBy |
getGroupByClause() |
THierarchical |
getHierarchicalClause()
Oracle hierarchical_query_clause
|
String |
getHint()
Hint for Oracle and MySQL
|
THintClause |
getHintClause() |
TStatementList |
getHiveBodyList()
Deprecated.
since 2.6.3.5, please use
getMultiSelectStatements() to retrieve
multimple select statement in Hive from query ... select, select, ... |
THiveHintClause |
getHiveHintClause() |
TIntoClause |
getIntoClause() |
TIntoTableClause |
getIntoTableClause() |
TIsolationClause |
getIsolationClause() |
TSelectSqlStatement |
getLeftStmt()
Valid when
getSetOperator() is not setOperator_none. |
TLimitClause |
getLimitClause()
MySQL,PostgreSQL limit clause
|
TPTNodeList<TLockingClause> |
getLockingClauses()
PostgreSQL, for update of, for read only.
|
ArrayList<TSelectSqlStatement> |
getMultiSelectStatements()
Hive, from ...
|
TOffsetClause |
getOffsetClause()
Offset clause.
|
TOptionClause |
getOptionClause() |
String |
getOracleHint()
Deprecated.
As of 2.0.4.5, replaced by
getHint() |
TOrderBy |
getOrderbyClause() |
int |
getParenthesisCount() |
int |
getParenthesisCountBeforeOrder() |
TPTNodeList<TParseTreeNode> |
getPipeOperators()
Get the list of pipe operators for StarRocks pipe query syntax.
|
TQualifyClause |
getQualifyClause() |
TResultColumnList |
getResultColumnList()
In select statement, this method returns Items in select_list.
|
TResultColumnList |
getResultColumnList(boolean useColumnsFromLeftmost) |
TSelectSqlStatement |
getRightStmt()
Valid when
getSetOperator() is not setOperator_none. |
TSampleClause |
getSampleClause() |
TSelectDistinct |
getSelectDistinct() |
ArrayList<TSelectModifier> |
getSelectModifiers() |
TSourceToken |
getSelectToken() |
int |
getSetOperator()
Deprecated.
As of v1.6.4.2, use
getSetOperatorType() and isAll() instead. |
ESetOperatorType |
getSetOperatorType() |
TSortBy |
getSortBy() |
TTeradataWithClause |
getTeradataWithClause() |
TTimeTravel |
getTimeTravel() |
THiveTransformClause |
getTransformClause() |
TValueClause |
getValueClause()
DB2 value clause
|
TWindowClause |
getWindowClause() |
TStatementListSqlNode |
getWithPlsqlItems()
Get the inline PL/SQL function/procedure definitions from WITH clause.
|
boolean |
isAll() |
boolean |
isChildOfCombinedQuery() |
boolean |
isCombinedQuery()
Determine whether The UNION, EXCEPT and INTERSECT operators were used.
|
boolean |
isConsume() |
boolean |
isPipeQuery()
Check if this is a StarRocks pipe query.
|
boolean |
isQueryOfCTE() |
boolean |
isSetOpDistinct() |
boolean |
isStarColumnPushedDown() |
boolean |
isSubQueryInFromClauseCanUseParentSelectAsEnclosingScope() |
boolean |
isTableQuery()
Whether this query was written as
TABLE t, the SQL-standard
shorthand for SELECT * FROM t. |
boolean |
isValueClause() |
boolean |
mayExposeColumn(String columnName,
TSQLEnv sqlEnv)
Whether this block may have a column
columnName of its own: some table it reads may have it (a derived
table, a CTE, a table function, a table whose columns the catalog does not all know, or knows to include it). |
static TTable |
outerCorrelationTable(TObjectName name,
TSelectSqlStatement subquery,
TSQLEnv sqlEnv)
The table of an enclosing query that the unqualified
name in subquery reads, or null when the name
is the subquery's own (Mantis 4797). |
boolean |
searchColumnInResultSet(TObjectName pColumn,
boolean pMustIn)
search column in the select list
Internal function, DON'T call it explicitly.
|
void |
setAll(boolean all) |
void |
setChildOfCombinedQuery(boolean childOfCombinedQuery) |
void |
setClusterBy(TClusterBy clusterBy) |
void |
setComputeClause(TComputeClause computeClause) |
void |
setConsume(boolean consume) |
void |
setDistributeBy(TDistributeBy distributeBy) |
void |
setExpandOnClause(TExpandOnClause expandOnClause) |
void |
setFetchFirstClause(TFetchFirstClause fetchFirstClause) |
void |
setForUpdateClause(TForUpdate forUpdateClause) |
void |
setGroupByClause(TGroupBy groupByClause) |
void |
setHierarchicalClause(THierarchical hierarchicalClause) |
void |
setHintClause(THintClause hintClause) |
void |
setHiveHintClause(THiveHintClause hiveHintClause) |
void |
setIntoClause(TIntoClause intoClause) |
void |
setIntoTableClause(TIntoTableClause intoTableClause) |
void |
setIsolationClause(TIsolationClause isolationClause) |
void |
setIsPipeQuery(boolean isPipeQuery)
Set whether this is a pipe query.
|
void |
setLeftStmt(TSelectSqlStatement leftStmt) |
void |
setLimitClause(TLimitClause limitClause) |
void |
setLockingClauses(TPTNodeList<TLockingClause> lockingClauses) |
void |
setOffsetClause(TOffsetClause offsetClause) |
void |
setOptionClause(TOptionClause optionClause) |
void |
setOracleHint(String oracleHint) |
void |
setOrderbyClause(TOrderBy newOrderbyClause) |
void |
setParenthesisCount(int parenthesisCount) |
void |
setParenthesisCountBeforeOrder(int parenthesisCountBeforeOrder) |
void |
setPipeOperators(TPTNodeList<TParseTreeNode> pipeOperators)
Set the pipe operators list.
|
void |
setQualifyClause(TQualifyClause qualifyClause) |
void |
setQueryOfCTE(boolean queryOfCTE) |
void |
setRightStmt(TSelectSqlStatement rightStmt) |
void |
setSampleClause(TSampleClause sampleClause) |
void |
setSelectDistinct(TSelectDistinct selectDistinct) |
void |
setSelectModifiers(ArrayList<TSelectModifier> selectModifiers) |
void |
setSelectToken(TSourceToken selectToken) |
void |
setSetOperator(int setOperator) |
void |
setSetOperatorType(ESetOperatorType setOperatorType) |
void |
setSortBy(TSortBy sortBy) |
void |
setStarColumnPushedDown(boolean starColumnPushedDown) |
void |
setSubQueryInFromClauseCanUseParentSelectAsEnclosingScope(boolean subQueryInFromClauseCanUseParentSelectAsEnclosingScope) |
void |
setTeradataWithClause(TTeradataWithClause teradataWithClause) |
void |
setTimeTravel(TTimeTravel timeTravel) |
void |
setTransformClause(THiveTransformClause transformClause) |
void |
setValueClause(TValueClause valueClause) |
void |
setWindowClause(TWindowClause windowClause) |
void |
setWithPlsqlItems(TStatementListSqlNode withPlsqlItems)
Set the inline PL/SQL function/procedure definitions.
|
static boolean |
unnestHasStructField(TTable unnest,
String columnName)
Whether an UNNEST relation provably has a column
columnName as a field of the STRUCTs its array holds:
UNNEST([STRUCT(0 AS a, 1 AS b)]), or a CTE or derived column defined so, has the columns a and b. |
static List<String> |
unnestStructFieldNames(TTable unnest)
The field names of the STRUCTs an UNNEST reads, which are its columns, or null when they are not known or an
alias column list names its columns instead.
|
addToTables, analyzeFromTable, analyzeFromTable, analyzeJoin, analyzeTablename, analyzeTableOrJoin, asCanonical, checkNonQualifiedColumnReferenceInSubQueryOfUplevelStmt, clearError, computeSqlHash, dochecksyntax, findTable, fireOnMetaDatabaseTableColumn, getAncestorStmt, getColumnsInTable, getColumnsInTable, getCteIncludeThisStmt, getCteList, getDaxFunctionStack, getEndlabelName, getErrorCount, getErrormessage, getFirstPhysicalTable, getFrameStack, getFromSourceJoin, getFromSourceTable, getGlobalScope, getIndexColumns, getJoins, getLabelName, getOrphanColumns, getOutputClause, getParentObjectName, getParentStmt, getQueryId, getRelationName, getRelations, getReturningClause, getSqlEnv, getSqlHash, getSqlHash, getStatements, getStmtScope, getSymbolTable, getSyntaxErrors, getSyntaxHints, getTables, getTargetTable, getTokenList, getTopClause, getTopStatement, getUsingVariableList, getVariableStack, getWhereClause, isathenaplsql, isBigQueryplsql, isdatabricksplsql, isGaussDBStoredProcedure, isgreeplumplsql, isMySQLDialect, isMySQLDialect, isnzplsql, isoracleplsql, isOraclePseudoColumnReference, isOracleSequencePseudoColumnReference, ispgplsql, isprestoplsql, issnowflakeplsql, isTableACTE, isverticaplsql, linkColumnReferenceToTable, linkColumnToTable, linkToFirstTable, locateVariableOrParameter, locateVariableOrParameter, OracleStatementCanBeSeparatedByBeginEndPair, parseerrormessagehandle, parsestatement, parsestatement, searchCTEList, searchDaxVariableInStack, searchFunctionInSQLEnv, setAlreadyAddToParent, setCteIncludeThisStmt, setCteList, setEndlabelName, setFrameStack, setFromClause, setLabelName, setOutputClause, setParentStmt, setParentStmtToNull, setQueryId, setResultColumnList, setReturningClause, setSqlHash, setStmtScope, setTargetTable, setTopClause, setUsingVariableList, setVariableStack, setWhereClause, size, toNormalizedSql, toScript, unbindCteTarget, VerticaStatementCanBeSeparatedByBeginEndPairaddAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, commentBlockAfter, commentBlockEndAfter, doAppendNewNode, doParse, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCommentBeforeNode, getCommentBeforeNode, getCompactString, getDummyTag, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getPlainText, getStartToken, getTokenCount, hasNext, init, init, init, init, init, init, init, init, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, remove, 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, toString, toString2clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingpublic static final int SET_OPERATOR_NONE
public static final int setOperator_union
public static final int setOperator_unionall
public static final int SET_OPERATOR_UNIONDISTINCT
public static final int setOperator_intersect
public static final int setOperator_intersectall
public static final int SET_OPERATOR_INTERSECTDISTINCT
public static final int setOperator_minus
public static final int setOperator_minusall
public static final int SET_OPERATOR_MINUSDISTINCT
public static final int setOperator_except
public static final int setOperator_exceptall
public static final int SET_OPERATOR_EXCEPTDISTINCT
public TSelectSqlStatement(EDbVendor dbvendor)
public TSourceToken getEndToken()
TParseTreeNodegetEndToken in class TParseTreeNodepublic void setSubQueryInFromClauseCanUseParentSelectAsEnclosingScope(boolean subQueryInFromClauseCanUseParentSelectAsEnclosingScope)
public boolean isSubQueryInFromClauseCanUseParentSelectAsEnclosingScope()
public boolean isStarColumnPushedDown()
public void setStarColumnPushedDown(boolean starColumnPushedDown)
public TStatementListSqlNode getWithPlsqlItems()
public void setWithPlsqlItems(TStatementListSqlNode withPlsqlItems)
withPlsqlItems - list of inline function/procedure definitionspublic TPTNodeList<TParseTreeNode> getPipeOperators()
public void setPipeOperators(TPTNodeList<TParseTreeNode> pipeOperators)
pipeOperators - list of pipe operator nodespublic boolean isPipeQuery()
public void setIsPipeQuery(boolean isPipeQuery)
isPipeQuery - true if this is a pipe querypublic ArrayList<TAttributeNode> getAttributes()
getAttributes in interface IRelationgetAttributes in class TCustomSqlStatementpublic ArrayList<TSelectSqlStatement> getMultiSelectStatements()
public void setClusterBy(TClusterBy clusterBy)
public TClusterBy getClusterBy()
public void setConsume(boolean consume)
public boolean isConsume()
public TStatementList getHiveBodyList()
getMultiSelectStatements() to retrieve
multimple select statement in Hive from query ... select, select, ...public void setSelectModifiers(ArrayList<TSelectModifier> selectModifiers)
public ArrayList<TSelectModifier> getSelectModifiers()
public void setTimeTravel(TTimeTravel timeTravel)
public void setHintClause(THintClause hintClause)
public TTimeTravel getTimeTravel()
public THintClause getHintClause()
public void setFetchFirstClause(TFetchFirstClause fetchFirstClause)
public void setParenthesisCount(int parenthesisCount)
public void setParenthesisCountBeforeOrder(int parenthesisCountBeforeOrder)
public void setAll(boolean all)
public void setSetOperatorType(ESetOperatorType setOperatorType)
public void setWindowClause(TWindowClause windowClause)
public void setLockingClauses(TPTNodeList<TLockingClause> lockingClauses)
public void setSelectDistinct(TSelectDistinct selectDistinct)
public void setExpandOnClause(TExpandOnClause expandOnClause)
public void setSetOperator(int setOperator)
public void setLeftStmt(TSelectSqlStatement leftStmt)
public void setRightStmt(TSelectSqlStatement rightStmt)
public void setValueClause(TValueClause valueClause)
public void setOracleHint(String oracleHint)
public void setHiveHintClause(THiveHintClause hiveHintClause)
public void setTransformClause(THiveTransformClause transformClause)
public void setDistributeBy(TDistributeBy distributeBy)
public void setIntoClause(TIntoClause intoClause)
public void setOrderbyClause(TOrderBy newOrderbyClause)
public void setQualifyClause(TQualifyClause qualifyClause)
public void setSampleClause(TSampleClause sampleClause)
public void setTeradataWithClause(TTeradataWithClause teradataWithClause)
public void setForUpdateClause(TForUpdate forUpdateClause)
public void setComputeClause(TComputeClause computeClause)
public void setGroupByClause(TGroupBy groupByClause)
public void setHierarchicalClause(THierarchical hierarchicalClause)
public void setLimitClause(TLimitClause limitClause)
public void setOffsetClause(TOffsetClause offsetClause)
public void setOptionClause(TOptionClause optionClause)
public void setIsolationClause(TIsolationClause isolationClause)
public void setIntoTableClause(TIntoTableClause intoTableClause)
public int getParenthesisCountBeforeOrder()
public int getParenthesisCount()
public void setQueryOfCTE(boolean queryOfCTE)
public boolean isQueryOfCTE()
public TResultColumn findEnclosingAliasDefinition(TObjectName reference, TSQLEnv sqlEnv)
reference, an unqualified name of this block,
stands for in SAP IQ and SQL Anywhere (Mantis 4752).
SQL Anywhere: "Aliases can be used anywhere in the SELECT block in which they are defined", and an alias "occludes" a column or variable of the same name (Renamed columns in query results). A subquery in the select list, WHERE, GROUP BY, HAVING or ORDER BY of a block is part of that block, so a name the subquery does not resolve itself is the alias of the block around it:
SELECT a AS x, (SELECT x) AS y FROM outer_t -- the inner x is the alias x, that is a
Only what the SQL and the catalog prove is taken. Walking outward from this block, a block is passed only
when it provably has no column of that name: it reads no table, or the catalog knows every table it reads, with
all its columns, and none of them has that name. A table with no metadata, a table whose columns are not all
known (no column list, or a * lineage could not expand), a derived table, a CTE or a table function may
have it, so the walk stops there and the name stays a column. The walk leaves a block only from a subquery in one of
those clauses or from a branch of a set operation, never from a derived table, a join condition or a CTE. In
the enclosing block the alias must be defined before the reference (a forward reference is SQLCODE -831), which
also keeps a name inside the alias's own definition a column; there the alias wins over a column of the same
name.
The single definition of this rule for the older resolver (TCustomSqlStatement.linkColumnToTable)
and resolver2 (TSQLResolver2.handleSelectListAliasResolution). An alias of the reference's own block is
TResultColumnList.findLateralAliasDefinition(gudusoft.gsqlparser.EDbVendor, gudusoft.gsqlparser.nodes.TObjectName).
reference - an unqualified column reference of this blocksqlEnv - the catalog to look a table up in when it has no resolved
table, or null; it must be in the statement's own context (current database and schema), so
resolver2, which reads the catalog after the whole script, passes nullpublic boolean mayExposeColumn(String columnName, TSQLEnv sqlEnv)
columnName of its own: some table it reads may have it (a derived
table, a CTE, a table function, a table whose columns the catalog does not all know, or knows to include it).
False only when the block provably has none. sqlEnv as in findEnclosingAliasDefinition(gudusoft.gsqlparser.nodes.TObjectName, gudusoft.gsqlparser.sqlenv.TSQLEnv).public static TTable outerCorrelationTable(TObjectName name, TSelectSqlStatement subquery, TSQLEnv sqlEnv)
name in subquery reads, or null when the name
is the subquery's own (Mantis 4797). A SELECT in an expression of a query reads a name from its own tables while
they may have it: in (select Jahr from m_version_table2 where Jahr234 = year(now())) both names are
m_version_table2's, though a derived table around the subquery names them too. The name is an enclosing query's
when it is compared with a column of the subquery's own tables, the subquery's own tables do not prove it and the
enclosing query does: in (SELECT max(v) FROM customfieldvalues WHERE resourceid = resumeid) under
FROM (SELECT id AS resumeid FROM resumes) r, resumeid is r's. Parse-time linking
(TCustomSqlStatement.linkColumnToTable) and resolver2 (NameResolver) both decide by this rule.sqlEnv - the catalog the parse reads, or null when each table's TTable.getResolvedTable() is what
proves its columns, as after resolver2 bound the tablespublic static boolean unnestHasStructField(TTable unnest, String columnName)
columnName as a field of the STRUCTs its array holds:
UNNEST([STRUCT(0 AS a, 1 AS b)]), or a CTE or derived column defined so, has the columns a and b.public static List<String> unnestStructFieldNames(TTable unnest)
UnnestNamespace both
read them here.public TOffsetClause getOffsetClause()
OFFSET 2 ROWS FETCH NEXT 4 ROWS ONLY;
offset clausepublic TFetchFirstClause getFetchFirstClause()
OFFSET 2 ROWS FETCH NEXT 4 ROWS ONLY;
fetch first/next clausepublic TOptionClause getOptionClause()
sql server option clauseTOptionClausepublic TIsolationClause getIsolationClause()
isolation clausepublic TSortBy getSortBy()
Hive sort by clausepublic TIntoTableClause getIntoTableClause()
informix into table clausepublic void setSelectToken(TSourceToken selectToken)
public TSourceToken getSelectToken()
public boolean isTableQuery()
TABLE t, the SQL-standard
shorthand for SELECT * FROM t.
Such a query is analyzed as SELECT * FROM t: t is in
TCustomSqlStatement.getTables() and TCustomSqlStatement.getJoins(), and getResultColumnList()
holds one wildcard result column. That wildcard is synthesized: its tokens
are not in the source token list, and the text has no SELECT or FROM
keyword, so code that rewrites the token stream (a formatter) must leave
the select list and the FROM list of such a query alone.
TABLE tpublic boolean isAll()
public boolean isSetOpDistinct()
public ESetOperatorType getSetOperatorType()
public TWindowClause getWindowClause()
window clause.public TPTNodeList<TLockingClause> getLockingClauses()
TLockingClausepublic TSelectDistinct getSelectDistinct()
distinct clausepublic TIntoClause getIntoClause()
into clausepublic TOrderBy getOrderbyClause()
order by clausepublic TQualifyClause getQualifyClause()
teradata qualify clausepublic TTeradataWithClause getTeradataWithClause()
Teradata with clause public TSampleClause getSampleClause()
SQL Server sample clausepublic TForUpdate getForUpdateClause()
for update clausepublic TComputeClause getComputeClause()
SQL Server compute clausepublic TGroupBy getGroupByClause()
group by clause and having clausepublic THierarchical getHierarchicalClause()
Oracle hierarchical_query_clausepublic TLimitClause getLimitClause()
MySQL,PostgreSQL limit clausepublic TExpandOnClause getExpandOnClause()
Teradata expand on clausepublic int getSetOperator()
getSetOperatorType() and isAll() instead.public TSelectSqlStatement getLeftStmt()
getSetOperator() is not setOperator_none.public TSelectSqlStatement getFarLeftStmt()
public TSelectSqlStatement getRightStmt()
getSetOperator() is not setOperator_none.public boolean isValueClause()
public String getOracleHint()
getHint()public THiveHintClause getHiveHintClause()
Hive hint clausepublic THiveTransformClause getTransformClause()
Hive from clausepublic TDistributeBy getDistributeBy()
Hive distribute by clausepublic TValueClause getValueClause()
DB2 value clausepublic void setChildOfCombinedQuery(boolean childOfCombinedQuery)
public boolean isChildOfCombinedQuery()
public TreeMap<String,TResultColumn> getExpandedResultColumns()
getExpandedResultColumns in class TCustomSqlStatementpublic ArrayList<TSelectSqlStatement> getFlattenedSelects()
public int doParseStatement(TCustomSqlStatement psql)
doParseStatement in class TCustomSqlStatementpsql - input query.public boolean isCombinedQuery()
public void accept(TParseTreeVisitor v)
TParseTreeNodeaccept in interface Visitableaccept in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitorpublic void acceptChildren(TParseTreeVisitor v)
acceptChildren in interface VisitableacceptChildren in class TParseTreeNodev - user defined visitor.public TOrderBy addOrderBy(String orderByStr)
orderByStr - new order by stringpublic TWhereClause addCondition(String condition)
condition - new conditionpublic TWhereClause addConditionOR(String condition)
public TWhereClause addWhereClause(String condition)
addWhereClause in class TCustomSqlStatementpublic TWhereClause addWhereClauseOR(String condition)
protected TWhereClause doAddWhereClause(String condition, boolean isAnd)
public TFromClause getFromClause()
getFromClause in class TCustomSqlStatementpublic TResultColumnList getResultColumnList(boolean useColumnsFromLeftmost)
public TResultColumnList getResultColumnList()
TCustomSqlStatementgetResultColumnList in class TCustomSqlStatementpublic ArrayList<String> getColumnsInFromClause()
public void addColumnInSelectListToSQLEnv(TSQLTable sqlTable)
public boolean searchColumnInResultSet(TObjectName pColumn, boolean pMustIn)
pColumn - pMustIn -