title: How to list table name in spark sql using java?
body: <p>I want to get table names in spark sql query .</p>
  
  <p>Sql looks like "<code>select * from table_a as A join table_b as b where a.pk=b.fk</code> ".
  And I want a list contains table_a and table_b.</p>
  
  <p>Before this question,I found scala code <a href="https://stackoverflow.com/questions/49785796/how-to-get-table-names-from-sql-query.I">How to get table names from SQL query?</a> tried to translate it to java ,but failed.</p>
  
  <p>Any help would be appreciated.</p>