Hi,everyone 

Problem :  How to add some children to the abstract syntax tree AST to 
implement UDF encryption function



I want to implement a function like this, pass SQL as insert into B select ID 
from a --> Run the insert into b select UDF (ID) from A command At present, 
my idea is to implement HiveSemanticAnalyzerHook preAnalyze method, now I add 
child nodes in this way will report an error, see the source code did not find 
the example, so would like to ask you, how to change the AST add child nodes?

ASTNode outerAST = new ASTNode(new CommonToken(hiveParser.tok_function, 
"(TOK_FUNCTION MD5 (tok_table_or_col name))");

Ast. GetChild (0). The getChild (1). The getChild (1). The getChild (0). 
SetChild (0, outerAST);

Thank you.



Best regards,
Liuyehan 

| |
liuyehan
|
|
lyh1067341...@163.com
|

Reply via email to