It is the most naive comparison function. it calculates the fraction of predictions that are exactly identical with the ground truth query.
The String matching accuracy
This metric is too restrictive, as it penalises on any difference, even if the prediction is still equivalent to the ground truth query.
Let:
Find the person who has the same first name as last name
CREATE TABLE PERSON(
ID int primary key,
FIRST_NAME VARCHAR(20),
LAST_NAME VARCHAR(20)
)
SELECT FIRST_NAME,LAST_NAME from PERSON where FIRST_NAME==LAST_NAME;
Suppose that the predicted query
SELECT FIRST_NAME,LAST_NAME from PERSON where LAST_NAME==FIRST_NAME;
Then, even both queries are semantically equivalent, the prediction is considered incorrect with respect to