ProductDocsArchitectureBlogGitHubGitHubGet Started
Available

SQL Overview

Krishiv SQL surface: DataFusion base plus Krishiv extensions.

Overview

Krishiv SQL is built on DataFusion, which implements a broad subset of ANSI SQL. Krishiv adds extensions for streaming, incremental views, live tables, pipeline DDL, lakehouse DML, pattern matching, and session management.

Standard SQL (DataFusion)

All standard SELECT semantics are supported: projections, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET, CTEs (WITH), subqueries, UNNEST, window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.), UNION / INTERSECT / EXCEPT, JOINs, string/date/numeric/aggregate/array functions, CASE expressions, CAST, COALESCE, and NULLIF.

Krishiv SQL Extensions

ExtensionStatusSummary
Window functions: tumble_start / tumble_end / hop_start / hop_endAvailableTemporal bucket helpers for streaming GROUP BY.
MATCH_RECOGNIZEAvailableComplex Event Processing (CEP) pattern matching.
MERGE INTOPreviewUpsert/delete on Iceberg tables.
DELETE FROM <iceberg-table>PreviewCopy-on-write row delete on Iceberg.
UPDATE <iceberg-table>PreviewCopy-on-write row update on Iceberg.
CREATE INCREMENTAL VIEWExperimentalRegister an incrementally maintained view.
REFRESH / DROP INCREMENTAL VIEWExperimentalLifecycle DDL for incremental views.
CREATE LIVE TABLEExperimentalRegister a live-ingestion table.
REFRESH / DROP LIVE TABLEExperimentalLifecycle DDL for live tables.
CREATE SOURCE / CREATE SINKExperimentalPipeline DDL for named sources and sinks.
START PIPELINEExperimentalStart a named pipeline from registered source/sink.
CREATE EXTERNAL TABLE … STORED AS KAFKAPreviewRegister a Kafka topic as a streaming table.
<table> FOR SYSTEM_TIME AS OF <expr>PreviewTime-travel read on Iceberg tables.
CREATE FUNCTION … RETURNS TABLE LANGUAGE SQLAvailableSQL-body table-valued functions.
SET shuffle.partitions = NAvailableOverride shuffle bucket count for this session.
DESCRIBE <table>AvailableReturn schema of a registered table.
EXPLAIN [VERBOSE] <query>AvailableShow DataFusion logical/physical plan.
CALL system.<proc>(...)PreviewIceberg maintenance procedures (expire_snapshots, rewrite_data_files, etc.).

Error Handling

SQL errors are returned as typed SqlError values: EmptyQuery, EmptyTableName, Unsupported, DataFusion, Optimizer, AccessDenied, OperationCancelled, Timeout.