答复: Re: Re: How to get all input tables of a SPARK SQL 'select' statement

2019-01-28 Thread luby
Thank you so much. I tried your suggestion and it really works! 发件人: "Ramandeep Singh Nanda" 收件人: l...@china-inv.cn 抄送: "Shahab Yunus" , "Tomas Bartalos" , "user @spark/'user @spark'/spark users/user@spark" 日期: 2019/01/26 05:42 主题:

Re: Re: How to get all input tables of a SPARK SQL 'select' statement

2019-01-25 Thread Ramandeep Singh Nanda
Hi, You don't have to run the SQL statement. You can parse it, that will be the logical parsing. val logicalPlan = ss.sessionState.sqlParser.parsePlan(sqlText = query) println(logicalPlan.prettyJson) [ { "class" : "org.apache.spark.sql.catalyst.plans.logical.Project", "num-children" : 1, "