Change query stream type from HashMap to Tuples of strings