Just run the command internally to the UDF? Or use Map directly?

Just as some quicker means.

Otherwise you would need to adjust the Grammar file, rebuild and the new
child will be recognized

liuyehan <lyh1067341...@163.com> schrieb am Mi., 21. Sept. 2022, 05:06:

> 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 --&gt; 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
>
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=liuyehan&uid=lyh1067341434%40163.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fsma957d454002c351ecf6ffb4bd3c71fdc.jpg&items=%5B%22lyh1067341434%40163.com%22%5D>
>

Reply via email to