Skip to content

[QDP] Unify Null Value Handling Strategy between Batch and Streaming Modes #765

@ryankert01

Description

@ryankert01

Description

There is currently an inconsistency in how our system handles null values depending on the execution mode. To ensure predictable behavior and data integrity, we should align these strategies.

Current Behavior

  • Batch Mode: Null values are automatically coerced/set to 0.
  • Streaming Mode: Null values trigger a runtime error.

Proposed Change

We need to decide on a unified strategy for handling null values across both modes. Potential directions include:

  1. Strict Error Handling: Both modes return an error to prevent silent data corruption.
  2. Default Coercion: Both modes default to 0 (or a type-appropriate default).
  3. Configurable Policy: Allow users to define the on_null behavior (e.g., ignore, fill_zero, or raise_error).

Context

#753 (comment)

To-Do / Discussion Points

  • Research performance implications of adding null-checks in the streaming hot path.
  • Determine if "Default to 0" is safe for all supported data types.
  • Reach a consensus on the unified default behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions