Skip to main content

6 posts tagged with "Engineering"

Engineering deep dives

View All Tags

One ALTER TABLE for Millisecond Writes

· 5 min read
Gnok Team

A single-row INSERT into an Iceberg table is a strange thing to benchmark. The row is a few dozen bytes; the commit that lands it rewrites metadata, swaps a pointer, and waits for the catalog to say yes. On our own cluster that costs about 712 ms, and no amount of tuning changes the shape of it — you are paying for a catalog transaction, once per statement, whatever the statement contains.

That is fine for the workload Iceberg was built for. It is not fine for an application that edits one order, appends one comment, or increments one counter and then wants to read it back.

Gnok now takes a different path for those writes, and turning it on is one line of DDL:

ALTER TABLE orders SET TBLPROPERTIES ('gnok.write.mode' = 'command');

That write now acknowledges in 5–7 ms.

Real Iceberg Rollback in Pure SQL

· 4 min read
Gnok Team

Most engines say they support time travel. Watch what happens when you actually try to roll back. Plenty of catalogs have shipped a "snapshot rollback" that quietly only edits the table's current-snapshot-id property — subsequent reads still hit the latest data. Until recently, gnok was one of them.

This post walks through how that path is now wired end-to-end: ALTER TABLE … SET SNAPSHOT actually flips the read pointer, the new is_current / parent_snapshot_id / sequence_number columns surface state honestly, and the $snapshots system view makes Iceberg metadata first-class SQL.

Learned Optimization: Inspecting What AutoML Has Picked Up

· 4 min read
Gnok Team

After watching ten thousand queries, Gnok has opinions about your workload. Learned scorers now feed the planner's partition and index advisors, so those opinions reflect the cost savings actually observed across your queries — not just the original heuristics.

The advisors run continuously as part of the service. This post walks through the surface that lets you see what they've learned: three SHOW … RECOMMENDATIONS commands that expose the live state of the join-order, materialized-view, and overall AutoML caches.

Building a Real-Time Fraud Detection Pipeline with Gnok

· 10 min read
Gnok Team

This tutorial builds a complete fraud detection system inside Gnok -- from data ingestion to ML scoring to alerting -- without any external services. We'll use COPY INTO for bulk loading, vector similarity for merchant profiling, statistical anomaly detection for flagging outliers, and natural language queries for ad-hoc investigation.

Iceberg v3 in Gnok: Deletion Vectors, VARIANT, Spatial Types, and Row Lineage

· 8 min read
Gnok Team

Apache Iceberg format version 3 brings four major capabilities: deletion vectors for more efficient row-level mutations, the VARIANT type for semi-structured data, GEOMETRY/GEOGRAPHY types for spatial analytics, and row lineage for stable row identity across compaction. Gnok now supports all of them.

This post explains what each feature does, when to use it, and how to get started.

Building Custom WASM UDFs for Gnok: A Step-by-Step Guide

· 8 min read
Gnok Team

Gnok's WebAssembly UDF system lets you extend SQL with custom functions written in Rust, Go, C, or any language that compiles to WASM. Your functions run inside the query engine with near-native performance, sandboxed execution, and automatic distribution across cluster workers.

This tutorial walks through building a WASM UDF from scratch, registering it, and using it in queries.