Class THashByClause
Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.teradata.THashByClause
- All Implemented Interfaces:
Visitable,Iterator<TSourceToken>
Represents a HASH BY clause in Teradata table function calls.
Syntax: HASH BY column_list | RANDOM
Example:
FROM TABLE( myfunc(...) RETURNS (...) HASH BY col1, col2 LOCAL ORDER BY col1, col2 ) AS t
-
Field Summary
Fields inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept a visitorvoidAccept a visitor to iterate this class and sub-nodes of this classGets the list of columns in the HASH BY clause.voidInitialize a query tree node.booleanisRandom()Returns whether this is a HASH BY RANDOM clause.voidsetColumns(TObjectNameList columns) Sets the column list for the HASH BY clause.voidsetRandom(boolean random) Sets whether this is a HASH BY RANDOM clause.Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, doParse, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, 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, 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
-
Constructor Details
-
THashByClause
public THashByClause()
-
-
Method Details
-
getColumns
Gets the list of columns in the HASH BY clause. Returns null if HASH BY RANDOM was specified.- Returns:
- the column list, or null if RANDOM
-
setColumns
Sets the column list for the HASH BY clause.- Parameters:
columns- the column list
-
isRandom
Returns whether this is a HASH BY RANDOM clause.- Returns:
- true if RANDOM, false if column list
-
setRandom
Sets whether this is a HASH BY RANDOM clause.- Parameters:
random- true if RANDOM
-
init
Description copied from class:TParseTreeNodeInitialize a query tree node. Used internally- Overrides:
initin classTParseTreeNode- Parameters:
arg1- first argument
-
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
-