Output
Output
execute_sql
method returns a dictionary with the following keys
result
: The result of the SQL query execution.error
: Any error that occurred during the execution.execution_time
: The time taken to execute the SQL query.
match_sqls()
to match the generated SQL with the ground truth SQL.iterated_execution()
to execute the SQL iteratively and comparing with the ground truth to see the execution time ratio.
Output
Output
Creating Custom Executors
You can create custom executors by inheriting from theBaseExecutor
class and implementing the execute_sql
method. Here’s an example of a custom executor for a PostgreSQL database:
Text2SQLEvaluator
in the next section.