Skip to content

[Refactor] Consolidate DataFrame formatting logic in FlintJob #1226

@manaslohani

Description

@manaslohani

Currently, DataFrame formatting in FlintJob is scattered across multiple locations:

  • SingleStatementExecutionManagerImpl handles DataFrame formatting for streaming queries
  • QueryResultWriter.processDataFrame() handles for successful interactive queries
  • constructErrorDF handles all failed queries

Consolidating all DataFrame formatting through a single unified approach using QueryResultWriter.processDataFrame method. This will centralize all DataFrame formatting logic in one place.

Notes

The following considerations need to be addressed during implementation:

  • Pass jobType to processDataFrame for different cleanup logic between streaming and interactive queries
  • ** Refactor logic for getting requestIndex/ Ensure requestIndex is available in session context** for streaming queries to maintain current functionality
  • Handle failed/timeout states generically - either create a new method or extend the existing processDataFrame method to handle both success and failure cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions