Skip to content

Commit be28c36

Browse files
authored
Minor text2sql metric fixes (#1913)
minor text2sql metric fixes Signed-off-by: Oktie Hassanzadeh <[email protected]>
1 parent 8381fb8 commit be28c36

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/unitxt/text2sql_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def sqlparse_queries_equivalent(sql1: str, sql2: str) -> bool:
728728
return False
729729
return True
730730
except Exception as e:
731-
logger.debug(f"Errpr parsing SQL query for comparison: {e}")
731+
logger.debug(f"Error parsing SQL query for comparison: {e}")
732732
return False
733733

734734

@@ -863,6 +863,8 @@ def sort_df(df):
863863
if df1.empty or df2.empty or len(df1) != len(df2):
864864
return False
865865

866+
df1.columns = range(df1.shape[1])
867+
df2.columns = range(df2.shape[1])
866868
subset_df, superset_df = (df1, df2) if df1.shape[1] <= df2.shape[1] else (df2, df1)
867869

868870
if ignore_row_order:

0 commit comments

Comments
 (0)