query parser: return const ref instead of const value