Skip to content

Respect Spark compression settings in native Parquet writer #2814

Closed

Description

@andygrove

What is the problem the feature request solves?

#2812 adds basic support for native Parquet writes, but does not fully support compression codec configs from Spark. Also, lz4 compression level is not configurable.

Describe the potential solution

Respect Spark configuration options.

Image

Also add a Comet conf for specifying lz4 compression level.

Additional context

No response

Activity

  1. added this to the 0.13.0 milestone on Nov 21, 2025
  2. added
    enhancement
    on Nov 21, 2025
  3. modified the milestones: 0.13.0, 0.14.0 on Jan 30, 2026
  4. removed this from the 0.14.0 milestone on Mar 12, 2026
  5. dwsmith1983 commented on Sep 11, 2026

    @dwsmith1983
    Contributor

    The native Parquet writer now honors Spark's codec configuration. CometDataWritingCommand (spark/src/main/scala/org/apache/comet/serde/operator/CometDataWritingCommand.scala) resolves the codec with Spark's own precedence, the compression write option, then parquet.compression, then spark.sql.parquet.compression.codec, and accepts none/uncompressed, snappy, lz4, zstd and gzip (gzip landed last, in #4930, c65a5ee); native/core/src/execution/operators/parquet_writer.rs maps each to the parquet-rs codec and carries the compression level for zstd. An lz4 level is not something parquet-rs exposes (Compression::LZ4 takes no level), so that part of the ask has nothing to configure. Suggest closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions