apache/spark — pull request #3386 by chenghao-intel (2014-11-20 14:59:17+00:00)
Title: [Spark-4512] [SQL] Unresolved Attribute Exception in Sort By

It will cause exception while do query like:
SELECT key+key FROM src sort by value;

This fix is inspired by #3363 , hope it goes in after #3363 merged. And I've removed the `logical.SortPartitions` and added a new attribute `global` for `logical.Sort`, the reason we do that is for sharing `ResolveSortReferences` for both `ORDER BY` and `SORT BY`.