V Luong created SPARK-23467:

             Summary: Enable way to create DataFrame from pre-partitioned files 
(Parquet/ORC/etc.) with each in-memory partition mapped to 1 physical file 
                 Key: SPARK-23467
                 URL: https://issues.apache.org/jira/browse/SPARK-23467
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core, SQL
    Affects Versions: 2.2.1
            Reporter: V Luong

I would like to echo the need described here: 

In many of my use cases, data is appended by date (say, date X) into an S3 
subdir `s3://bucket/path/to/parquet/date=X`, after which I need to run 
analytics by date. The analytics involves sorts and window functions. But I'm 
only interested in within-date sorts/windows, and don't care about the 
between-dates sorts and windows. 

Currently, if I simply load the entire data set from the parent dir 
`s3://bucket/path/to/parquet`, and then write Spark SQL statements involving 
"SORT" or "WINDOW", then very expensive shuffles will be invoked. Hence I am 
exploring ways to write analytics code/function per Spark partition, and send 
such code/function to each partition.

The biggest problem now is that Spark's in-memory partitions do not correspond 
to the physical files loaded from S3, so there is no way to guarantee that the 
analytics by partition is done by date as desired.

Is there a way we can explicitly enable a direct correspondence between file 
partitions and in-memory partitions?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to