NXP-14838: Add unit test, trace the query in case of parser error to ease debugging