Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion premsql/executors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ def iterated_execution(

if is_match["result"] == 1:
diff_list = [
# Bug fix: denominator must use predicted_sql, not gold_sql.
# The original code divided gold_time / gold_time (always 1.0),
# making VES meaningless. Correct formula: gold_time / predicted_time.
self.execute_sql(sql=gold_sql, dsn_or_db_path=dsn_or_db_path)[
"execution_time"
]
/ self.execute_sql(sql=gold_sql, dsn_or_db_path=dsn_or_db_path)[
/ self.execute_sql(sql=predicted_sql, dsn_or_db_path=dsn_or_db_path)[
"execution_time"
]
for _ in range(num_iterations)
Expand Down