eosphoros-ai / sqlgpt-parser

sqlgpt-parser is a Python implementation of an SQL parser that effectively converts SQL statements into Abstract Syntax Trees (AST). By leveraging AST tree comparisons between two SQL queries, it becomes possible to achieve robust evaluation of text-to-SQL models.
Apache License 2.0
25 stars 11 forks source link

fix error when sql select from more than one table #9

Closed qidi1 closed 1 year ago

qidi1 commented 1 year ago

When select from muti table, from node will be list, changed to

    if node.from_:
                    if isinstance(node.from_, list):
                        for item in node.from_:
                            self.process(item, context)
                    else:
                        self.process(node.from_, context)