Implement query parse operations and cover it with test.