Skip to content

Commit

Permalink
store only sort column indexes in logical OrderBy operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobin Baker committed Aug 28, 2017
1 parent fe87d73 commit c6fdede
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion raco/backends/myria/myria.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def compileme(self, inputsym):
return {
"opType": "InMemoryOrderBy",
"argChild": inputsym,
"argSortColumns": [col.position for col in self.sort_columns],
"argSortColumns": self.sort_columns,
"argAscending": self.ascending
}

Expand Down
4 changes: 2 additions & 2 deletions raco/myrial/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def bagcomp(self, from_clause, where_clause, emit_clause,
raise InvalidStatementException(
"An ORDER BY clause must be accompanied by a LIMIT clause")
orderby_cols, orderby_ords = zip(*orderby_clause)
orderby_cols = [get_unnamed_ref(col, op.scheme())
orderby_idxs = [get_unnamed_ref(col, op.scheme()).position
for col in orderby_cols]
op = raco.algebra.OrderBy(input=op,
sort_columns=orderby_cols,
sort_columns=orderby_idxs,
ascending=orderby_ords)

if limit_clause:
Expand Down

0 comments on commit c6fdede

Please sign in to comment.