MaxNevermind commented on code in PR #1273:
URL: https://github.com/apache/parquet-mr/pull/1273#discussion_r1524264905
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/rewrite/RewriteOptions.java:
##########
@@ -39,11 +36,20 @@
/**
* A set of options to create a ParquetRewriter.
+ *
+ * TODO find a place where to put a proper description of functionality as it
is not trivial:
+ * ParquetRewriter allows to stitch files with the same schema into a single
file.
+ * Note that ParquetRewriter also can be used for effectively stitch/joining
multiple parquet files with
+ * different schemas.
+ * You can provide the main input file group and multiple right side ones.
That is possible when:
+ * 1) the number of rows in the main and extra input groups are the same,
+ * 2) the ordering of rows in the main and extra input groups is the same.
*/
public class RewriteOptions {
private final ParquetConfiguration conf;
private final List<InputFile> inputFiles;
+ private final List<List<InputFile>> inputFilesR;
Review Comment:
So the RewriteOptions will contain a holder for List<VerticalInputFile> &
List<HorizontalInputFile> or some sort of general List<StackableInputFile> that
both VerticalInputFile & HorizontalInputFile need to implement?
By the way. In my current implementation only the total number of rows of
the left and on the right need to match. Individual files don't need the row
count matched. It seem you suggest putting the same number of records into each
VerticalInputFiles group. I'm not sure that particular requirement is easy to
satisfy in practical environment. For example in Spark there are ways to
preserve the ordering as I showed in the linked Gist in PR description but
controlling the number of rows in each output file in Spark is not trivial as
far as I know.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]