File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
parquet-hadoop/src/main/java/org/apache/parquet/hadoop Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -976,6 +976,24 @@ public SELF withSizeStatisticsEnabled(boolean enabled) {
976976 return self ();
977977 }
978978
979+ /**
980+ * Sets whether to write the path_in_schema field in ColumnMetaData.
981+ *
982+ * The path_in_schema field in the Thrift metadata is redundant and wastes a great
983+ * deal of space. Parquet file footers can be made much smaller by omitting this field.
984+ * Because the field was originally a mandatory field, this property defaults to true
985+ * to maintain compatibility with older readers that expect this field to be present.
986+ * If one knows that all readers one plans to use are tolerant of the absense of this field,
987+ * this may be safely set to false.
988+ *
989+ * @param enabled whether to write path_in_schema
990+ * @returnthis builder for method chaining
991+ */
992+ public SELF withWritePathInSchemaEnabled (boolean enabled ) {
993+ encodingPropsBuilder .withWritePathInSchemaEnabled (enabled );
994+ return self ();
995+ }
996+
979997 /**
980998 * Build a {@link ParquetWriter} with the accumulated configuration.
981999 *
You can’t perform that action at this time.
0 commit comments