Github user chpritchard-expedia commented on the issue:
https://github.com/apache/spark/pull/16347
@rxin - sortBy is somewhat tied in with bucketing, which is also a little
difficult to work with. First, bucketing often relies on a column being
present, whereas in Hive (and with repartition), I may use a formula, to split
the data into appropriate buckets that are evenly distributed.
Overall is not well supported throughout the ecosystem. Even with all of
that, Spark doesn't particularly support semantics to say that a data set is
already sorted.
In Hive, I've had to do a lot of PARTITION BY(datefield, bucket) CLUSTERED
BY (key) INTO 1 SORTED BY (key) INTO 1 BUCKETS. That gets us stable totally
sorted files, for GUIDs.
In the case of Spark, this issue of partitionBy destroying sorting is a
painful bug. I'm now using some very large data sets, searching for keys, and
instead of returning data in a few seconds (thanks to predicate pushdown with
Parquet), it has to scan the entire files.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]