Refactor some variables name. Add guard to only support single partition queries (replicated tables + single partition stored procedure)