Skip to content

[Bug] Glue column comments with newlines are not normalized before length check #8917

Description

@0dunay0

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

master

Compute Engine

Flink

Minimal reproduce step

  1. Create a table with column comments that contain newline characters, for example from Avro field doc strings.
  2. Sync Iceberg metadata through IcebergHiveMetadataCommitter.
  3. Let a comment stay under 255 characters after newline removal.
  4. Observe Glue validation failure on CreateTable or UpdateTable.

What does not meet your expectations?

IcebergHiveMetadataCommitter.normalizeColumnComment returns early for comments at or below the 255 character limit before removing newline characters. AWS Glue rejects comments with newline characters, so short multiline comments still fail validation even though they should be normalized to spaces first.

Anything else?

A small fix is enough here: strip newlines before the length check, keep the existing truncation behavior for long comments, and add a unit test covering both short and long multiline comments.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions