Skip to content

[BUG] Grok/Parse/Patterns parse a null field should return an empty string with Calcite #4380

Closed

Description

@LantaoJin

What is the bug?
Grok parse a null field will return an empty string in v2, ref. but it returns null in v3.

How can one reproduce the bug?

source=accounts | grok email '.+@%{HOSTNAME:host}' | fields email, host ;
    fetched rows / total rows = 4/4
    +-----------------------+------------+
    | email                 | host       |
    |-----------------------+------------|
    | [email protected]  | pyrami.com |
    | [email protected] | netagy.com |
    | null                  | null       |
    | [email protected]   | boink.com  |
    +-----------------------+------------+
source=accounts | parse email '.+@(?<host>.+)' | fields email, host ;
    fetched rows / total rows = 4/4
    +-----------------------+------------+
    | email                 | host       |
    |-----------------------+------------|
    | [email protected]  | pyrami.com |
    | [email protected] | netagy.com |
    | null                  | null       |
    | [email protected]   | boink.com  |
    +-----------------------+------------+
source=accounts | patterns email method=simple_pattern | fields email, patterns_field ;
    fetched rows / total rows = 4/4
    +-----------------------+----------------+
    | email                 | patterns_field |
    |-----------------------+----------------|
    | [email protected]  | @.             |
    | [email protected] | @.             |
    | null                  | null           |
    | [email protected]   | @.             |
    +-----------------------+----------------+

Activity

  1. added
    bug
    PPL
    on Sep 25, 2025
  2. changed the title [-][BUG] Grok parse a null field should return an empty string with Calcite[/-] [+][BUG] Grok/Passe parse a null field should return an empty string with Calcite[/+] on Sep 25, 2025
  3. changed the title [-][BUG] Grok/Passe parse a null field should return an empty string with Calcite[/-] [+][BUG] Grok/Parse/Patterns parse a null field should return an empty string with Calcite[/+] on Sep 25, 2025
  4. moved this from Not Started to Done in PPL Trackeron Sep 26, 2025
  5. LantaoJin commented on Sep 30, 2025

    @LantaoJin
    MemberAuthor

    Resolved by #4381 and #4402

  6. added
    documentation
    and removed
    documentation
    on Sep 30, 2025
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

    PPLbug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions