permuted_columns support for query_helper + unit test