Skip to main content

Module stream_sql

Module stream_sql 

Source
Expand description

§Stream SQL - SQL-like Query Language for Streams

This module provides a SQL-like query language specifically designed for stream processing, enabling developers to write familiar SQL queries for real-time data processing.

§Features

  • SQL parsing and execution for streams
  • Window functions (TUMBLING, SLIDING, SESSION)
  • Aggregate functions (COUNT, SUM, AVG, MIN, MAX, STDDEV)
  • Stream joins with temporal semantics
  • Pattern matching in streams
  • Query optimization

§Example

SELECT sensor_id, AVG(temperature) as avg_temp
FROM sensor_stream
WINDOW TUMBLING (SIZE 5 MINUTES)
GROUP BY sensor_id
HAVING AVG(temperature) > 30

Structs§

ColumnDefinition
Column definition
CreateStreamStatement
CREATE STREAM statement
Lexer
Lexer for SQL tokenization
OrderByItem
ORDER BY specification
Parser
Parser for SQL queries
QueryResult
Query result
ResultRow
Query result row
SelectItem
SELECT column specification
SelectStatement
SELECT statement AST
StreamMetadata
Stream metadata
StreamSqlConfig
Configuration for Stream SQL engine
StreamSqlEngine
Stream SQL engine
StreamSqlStats
Stream SQL statistics
WindowSpec
Window specification

Enums§

AggregateFunction
Aggregate functions
BinaryOperator
Binary operators
DataType
SQL data types
Expression
Expression in SQL AST
FromClause
FROM clause item
JoinType
Join types
QueryType
SQL query types
SqlValue
SQL value types
Token
SQL token types for lexer
UnaryOperator
Unary operators
WindowType
Window types