Hi Community,
I had to gather the list of all fully qualified table names and thier column
names used(referenced) jn a SELECT query.
I simply parsed the query and wrote a visitor to visit the SqlNode recursively.
While its working (may be with few bugs here and there), i am wondering if
Calcit
Hi, Yogendra
there is an utility method RelOptUtil#findAllTables that looks for all
tables in the rel tree. It doesn't collect column names, but you can
adopt it for this purpose.
It seems to me that solution with visitor should also work fine.
--
Roman Kondakov
On 07.02.2022 12:45, Zhe Hu