Module query_rewriter

Module query_rewriter 

Source
Expand description

Query Rewriter Module

This module analyzes SQL queries and suggests/performs transformations to make them compatible with the SQL engine’s capabilities.

Main transformations:

  • Hoist expressions from aggregate/window functions into CTEs
  • Convert complex expressions to simpler forms
  • Identify patterns that need rewriting

Structs§

QueryRewriter
Analyzes a query and returns rewrite suggestions
RewriteAnalysis
JSON output for CLI integration
RewriteSuggestion
Represents a suggested rewrite for a query

Enums§

RewriteType