SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.20630 · 2026

Demonstrating GenDB: Instance-Optimized and Customized Query Processing Code Generation via LLM Agents

Immanuel Trummer, Jiale Lao

arXiv · PDF · Open in the Atlas

Code that ran

14 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 11 failures of our instrument; 2 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2607.20630.json · badge: /api/ran/2607.20630.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
SolidLao/GenDB canonical (classifier label)
classifier basis: census
14 ran · 2 no recorded run
FunctionStatusWhere it lives
clickhouse_available Ran
ran, violated the contract we drafted
SolidLao/GenDB/benchmarks/lib/systems.py
code served (permissive licence) · get_code("8c93f03d236fd459")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
from pathlib import Path

# Create a temporary directory structure to simulate benchmark_root
temp_dir = tempfile.mkdtemp()
benchmark_root = Path(temp_dir)

# Create the clickhouse directory
clickhouse_dir = benchmark_root / 'clickhouse'
clickhouse_dir.mkdir(parents=True, exist_ok=True)

# Create a mock clickhouse binary that is executable
clickhouse_binary = clickhouse_dir / 'clickhouse'
clickhouse_binary.touch()
# Make it executable
os.chmod(str(clickhouse_binary), 0o755)

ARGS = {
    'benchmark_root': benchmark_root
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clickhouse_install Ran
ran, violated the contract we drafted
SolidLao/GenDB/benchmarks/lib/systems.py
code served (permissive licence) · get_code("7416d5ed24bd2c31")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from pathlib import Path
import tempfile

# Create a temporary directory to use as benchmark_root
temp_dir = tempfile.mkdtemp()
benchmark_root = Path(temp_dir)

ARGS = {
    'benchmark_root': benchmark_root
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_best_binaries Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/compare_gendb_versions.py
code served (permissive licence) · get_code("ec557086fd59fa0c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
import tempfile
from pathlib import Path

# Create a temporary directory structure to simulate a valid run_dir
tmpdir = tempfile.mkdtemp()
run_dir = Path(tmpdir)

# Create run.json with phase2 pipelines data
run_json_path = run_dir / 'run.json'
run_data = {
    'phase2': {
        'pipelines': {
            'Q1': {
                'bestCppPath': str(run_dir / 'iter_0' / 'cpp_output')
            },
            'Q2': {
                'bestCppPath': str(run_dir / 'iter_1' / 'cpp_output')
            }
        }
    }
}
with open(run_json_path, 'w') as f:
    json.dump(run_data, f)

# Create query directories with iteration subdirectories
queries_dir = run_dir / 'queries'
queries_dir.mkdir()

for qid in ['q1', 'q2', 'q3']:
    qdir = queries_dir / qid
    qdir.mkdir()
    
    # Create iter_0 with execution_results.json
    iter_dir_0 = qdir / 'iter_0'
    iter_dir_0.mkdir()
    exec_results_0 = {
        'validation': {'status': 'pass'},
        'timing_ms': 100.5
    }
    with open(iter_dir_0 / 'execution_results.json', 'w') as f:
        json.dump(exec_results_0, f)
    # Create a dummy executable binary
    binary_path_0 = iter_dir_0 / qid
    binary_path_0.touch()
    os.chmod(str(binary_path_0), 0o755)
    
    # Create iter_1 with execution_results.json (worse timing)
    iter_dir_1 = qdir / 'iter_1'
    iter_dir_1.mkdir()
    exec_results_1 = {
        'validation': {'status': 'pass'},
        'timing_ms': 200.0
    }
    with open(iter_dir_1 / 'execution_results.json', 'w') as f:
        json.dump(exec_results_1, f)
    # Create a dummy executable binary
    binary_path_1 = iter_dir_1 / qid
    binary_path_1.touch()
    os.chmod(str(binary_path_1), 0o755)

ARGS = {
    'run_dir': run_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_binaries Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/compare_languages.py
code served (permissive licence) · get_code("15b16771f55363d7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
from pathlib import Path
import tempfile

# Create a temporary directory structure to simulate the original run
temp_dir = tempfile.mkdtemp()
root = Path(temp_dir)
output_dir = root / 'output' / 'tpc-h' / '2026-03-07T17-46-23'
output_dir.mkdir(parents=True, exist_ok=True)

# Create a mock run.json with phase2 data
run_data = {
    'phase2': {
        'pipelines': {
            'Q1': {
                'bestCppPath': str(output_dir / 'iter_0' / 'q1.cpp')
            },
            'Q3': {
                'bestCppPath': str(output_dir / 'iter_0' / 'q3.cpp')
            },
            'Q6': {
                'bestCppPath': str(output_dir / 'iter_0' / 'q6.cpp')
            },
            'Q9': {
                'bestCppPath': str(output_dir / 'iter_0' / 'q9.cpp')
            },
            'Q18': {
                'bestCppPath': str(output_dir / 'iter_0' / 'q18.cpp')
            }
        }
    }
}

# Write the run.json file
run_json_path = output_dir / 'run.json'
with open(run_json_path, 'w') as f:
    json.dump(run_data, f)

# Create mock executable binaries
iter_dir = output_dir / 'iter_0'
iter_dir.mkdir(parents=True, exist_ok=True)

for qid in ['Q1', 'Q3', 'Q6', 'Q9', 'Q18']:
    binary_path = iter_dir / qid.lower()
    binary_path.touch()
    os.chmod(str(binary_path), 0o755)

# Create a binary directory for the non-original implementation
binary_dir = root / 'binaries'
binary_dir.mkdir(parents=True, exist_ok=True)

for qid in ['Q1', 'Q3', 'Q6', 'Q9', 'Q18']:
    binary_path = binary_dir / qid.lower()
    binary_path.touch()
    os.chmod(str(binary_path), 0o755)

# Construct ARGS for find_binaries function
ARGS = {
    'impl_name': 'test_implementation',
    'impl_cfg': {
        'type': 'custom_cpp',
        'binary_dir': binary_dir
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pg_conn_params Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/lib/runners.py
code served (permissive licence) · get_code("507875aa0d7f7be6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

class Config:
    def __init__(self, db_name):
        self.db_name = db_name

config = Config(db_name='test_database')

ARGS = {
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_workload_dir Ran
ran, violated the contract we drafted
SolidLao/GenDB/benchmarks/lib/gendb.py
code served (permissive licence) · get_code("7dcbe4ffadbde814")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
from pathlib import Path
import json

# Create a temporary directory that simulates a v37+ persistent workload directory
temp_dir = tempfile.TemporaryDirectory()
workload_dir = Path(temp_dir.name)

# Create the workload.json file that the function checks for
workload_file = workload_dir / 'workload.json'
workload_file.write_text(json.dumps({"version": "37"}))

ARGS = {
    "path": workload_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_gendb_indexes Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/lib/indexes.py
code served (permissive licence) · get_code("9d1a423552a7e756")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary storage_design.json file
temp_dir = tempfile.mkdtemp()
storage_design_path = os.path.join(temp_dir, 'storage_design.json')

# Create a sample storage design with tables and indexes
storage_design = {
    'tables': {
        'users': {
            'indexes': [
                {'columns': ['id'], 'name': 'idx_users_id'},
                {'columns': ['email'], 'name': 'idx_users_email'},
                {'columns': ['email', 'name'], 'name': 'idx_users_email_name'},
            ]
        },
        'orders': {
            'indexes': [
                {'columns': ['order_id'], 'name': 'idx_orders_order_id'},
                {'columns': ['user_id', 'created_at'], 'name': 'idx_orders_user_id_created_at'},
            ]
        },
        'products': {
            'indexes': [
                {'columns': ['product_id'], 'name': 'idx_products_product_id'},
                {'columns': ['sku'], 'name': 'idx_products_sku'},
            ]
        }
    }
}

# Write the storage design to the temporary file
with open(storage_design_path, 'w') as f:
    json.dump(storage_design, f)

# Define primary key columns for each table
pk_columns = {
    'users': ('id',),
    'orders': ('order_id',),
    'products': ('product_id',),
}

# Define a filter function that removes 'row_id' and deduplicates
def filter_fn(table_name, raw_columns):
    filtered = tuple(col for col in raw_columns if col != 'row_id')
    return filtered

ARGS = {
    'storage_design_path': storage_design_path,
    'pk_columns': pk_columns,
    'filter_fn': filter_fn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_timing_output Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/compare_gendb_versions.py
code served (permissive licence) · get_code("74428ecdbf8347b1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

# The function parse_timing_output takes a single parameter: stdout (a string)
# It parses [TIMING] lines from the string using regex patterns
# No complex objects needed - just a string with timing output

stdout_example = """
[TIMING] setup: 1.5 ms
[TIMING] query: 3.2 ms
[TIMING] output: 0.8 ms
[TIMING] total: 5.5 ms
Some other log line
[TIMING] another: 2.1 ms
"""

ARGS = {
    'stdout': stdout_example
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_timing_output Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/compare_languages.py
code served (permissive licence) · get_code("23776f2190da0030")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def parse_timing_output(stdout: str) -> dict:
    """Parse [TIMING] lines from binary output."""
    timings = {}
    for line in stdout.splitlines():
        m = re.match('\\[TIMING\\]\\s+(\\w+):\\s+([\\d.]+)\\s*ms', line)
        if m:
            timings[m.group(1)] = float(m.group(2))
    if 'total' in timings:
        timings['query_ms'] = timings['total'] - timings.get('output', 0)
    return timings


# Construct valid arguments for parse_timing_output
stdout_value = """[TIMING] inference: 42.5 ms
[TIMING] total: 100.3 ms
[TIMING] output: 25.1 ms
[TIMING] preprocessing: 33.7 ms
"""

ARGS = {
    'stdout': stdout_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_gendb_iteration_history Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/lib/gendb.py
code served (permissive licence) · get_code("775ef081482581bb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import re
from pathlib import Path
import tempfile
import shutil

# Create a temporary directory structure that mimics the expected run_dir layout
temp_dir = tempfile.mkdtemp()
run_dir = Path(temp_dir)

# Create queries directory
queries_dir = run_dir / 'queries'
queries_dir.mkdir(parents=True, exist_ok=True)

# Create query Q1 with iterations
q1_dir = queries_dir / 'Q1'
q1_dir.mkdir(parents=True, exist_ok=True)

# Create iter_0 for Q1
iter_0_dir = q1_dir / 'iter_0'
iter_0_dir.mkdir(parents=True, exist_ok=True)
exec_results_0 = {
    'timing_ms': 65.13,
    'validation': {'status': 'pass'}
}
with open(iter_0_dir / 'execution_results.json', 'w') as f:
    json.dump(exec_results_0, f)

# Create iter_4 for Q1
iter_4_dir = q1_dir / 'iter_4'
iter_4_dir.mkdir(parents=True, exist_ok=True)
exec_results_4 = {
    'timing_ms': 61.06,
    'validation': {'status': 'pass'}
}
with open(iter_4_dir / 'execution_results.json', 'w') as f:
    json.dump(exec_results_4, f)

# Create query Q3 with iterations
q3_dir = queries_dir / 'Q3'
q3_dir.mkdir(parents=True, exist_ok=True)

# Create iter_1 for Q3
iter_1_dir = q3_dir / 'iter_1'
iter_1_dir.mkdir(parents=True, exist_ok=True)
exec_results_q3_1 = {
    'timing_ms': 72.5,
    'validation': {'status': 'pass'}
}
with open(iter_1_dir / 'execution_results.json', 'w') as f:
    json.dump(exec_results_q3_1, f)

# Create iter_2 for Q3
iter_2_dir = q3_dir / 'iter_2'
iter_2_dir.mkdir(parents=True, exist_ok=True)
exec_results_q3_2 = {
    'timing_ms': 68.3,
    'validation': {'status': 'pass'}
}
with open(iter_2_dir / 'execution_results.json', 'w') as f:
    json.dump(exec_results_q3_2, f)

# Create query Q6 with iterations
q6_dir = queries_dir / 'Q6'
q6_dir.mkdir(parents=True, exist_ok=True)

# Create iter_5 for Q6
iter_5_dir = q6_dir / 'iter_5'
iter_5_dir.mkdir(parents=True, exist_ok=True)
exec_results_q6 = {
    'timing_ms': 55.2,
    'validation': {'status': 'pass'}
}
with open(iter_5_dir / 'execution_results.json', 'w') as f:
    json.dump(exec_results_q6, f)

ARGS = {
    'run_dir': run_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resolve_gendb_paths Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/lib/gendb.py
code served (permissive licence) · get_code("d838d8d901c5305d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path
import tempfile
import os

# Create a temporary directory structure to test resolve_gendb_paths
temp_dir = tempfile.mkdtemp()

# Create a workload directory structure
workload_dir = Path(temp_dir) / "workload_test"
workload_dir.mkdir(exist_ok=True)
(workload_dir / "workload.json").touch()

# Create runs/latest directory structure
runs_dir = workload_dir / "runs"
runs_dir.mkdir(exist_ok=True)
latest_dir = runs_dir / "latest"
latest_dir.mkdir(exist_ok=True)
(latest_dir / "run.json").touch()

# Create a legacy run directory (at top level with run.json)
legacy_run_dir = Path(temp_dir) / "legacy_run"
legacy_run_dir.mkdir(exist_ok=True)
(legacy_run_dir / "run.json").touch()

# Create a run directory inside a workload (runs/<timestamp>/)
run_timestamp_dir = runs_dir / "20240101_120000"
run_timestamp_dir.mkdir(exist_ok=True)
(run_timestamp_dir / "run.json").touch()

# Test case 1: workload directory path
test_workload_path = workload_dir

ARGS = {
    "gendb_path": test_workload_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_benchmark Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/compare_gendb_versions.py
code served (permissive licence) · get_code("a72bb96a49b6e674")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
from pathlib import Path
import json
import os

# Create a minimal directory structure that mimics a GenDB run_dir
with tempfile.TemporaryDirectory() as tmpdir_base:
    run_dir = Path(tmpdir_base) / "run"
    run_dir.mkdir(parents=True, exist_ok=True)
    
    # Create run.json with phase2 pipelines
    run_json = {
        "phase2": {
            "pipelines": {
                "Q1": {
                    "bestCppPath": str(run_dir / "iter_0" / "q1_cpp.cpp")
                }
            }
        }
    }
    with open(run_dir / "run.json", "w") as f:
        json.dump(run_json, f)
    
    # Create queries directory structure with mock binaries and results
    queries_dir = run_dir / "queries"
    queries_dir.mkdir(parents=True, exist_ok=True)
    
    q1_dir = queries_dir / "Q1"
    q1_dir.mkdir(parents=True, exist_ok=True)
    
    iter_dir = q1_dir / "iter_0"
    iter_dir.mkdir(parents=True, exist_ok=True)
    
    # Create a mock binary (just a simple executable script)
    binary_path = iter_dir / "q1"
    binary_script = """#!/bin/bash
echo "[TIMING] total: 42.5 ms"
echo "[TIMING] output: 2.3 ms"
"""
    with open(binary_path, "w") as f:
        f.write(binary_script)
    os.chmod(binary_path, 0o755)
    
    # Create execution_results.json
    exec_results = {
        "validation": {
            "status": "pass"
        },
        "timing_ms": 40.2
    }
    with open(iter_dir / "execution_results.json", "w") as f:
        json.dump(exec_results, f)
    
    # Create a minimal gendb_dir
    gendb_dir = Path(tmpdir_base) / "gendb"
    gendb_dir.mkdir(parents=True, exist_ok=True)
    
    ARGS = {
        "run_dir": run_dir,
        "gendb_dir": gendb_dir,
        "mode": "cold",
        "timeout": 600
    }
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
run_benchmark Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/compare_languages.py
code served (permissive licence) · get_code("b6b1221fe542202c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
from pathlib import Path

# Create minimal stand-in directory structure
impl_cfg = {
    'type': 'test_impl',
    'binary_dir': Path(tempfile.gettempdir()) / 'test_binaries'
}

# Ensure the binary directory exists
impl_cfg['binary_dir'].mkdir(parents=True, exist_ok=True)

# Create dummy executable files for each query
for qid in ['q1', 'q3', 'q6', 'q9', 'q18']:
    binary_path = impl_cfg['binary_dir'] / qid
    binary_path.touch(mode=0o755)

ARGS = {
    'impl_name': 'test_implementation',
    'impl_cfg': impl_cfg,
    'mode': 'cold',
    'timeout': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
strip_fk_constraints Ran
ran; our contract draft was wrong, not the code
SolidLao/GenDB/benchmarks/lib/utils.py
code served (permissive licence) · get_code("e452a15e81ae2868")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def strip_fk_constraints(schema_sql: str, extra_fn=None) -> str:
    """Remove FK constraints from schema SQL. Optionally apply extra transformations."""
    result = re.sub('--[^\\n]*', '', schema_sql)
    result = re.sub(',?\\s*FOREIGN KEY\\s*\\([^)]+\\)\\s*REFERENCES\\s+\\w+\\([^)]+\\)', '', result)
    result = re.sub('\\s*REFERENCES\\s+\\w+\\([^)]+\\)', '', result)
    result = re.sub(',\\s*\\)', '\n)', result)
    if extra_fn:
        result = extra_fn(result)
    return result


# Create valid arguments for the function
schema_sql_with_fk = """
CREATE TABLE users (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    department_id INT,
    -- This is a comment
    FOREIGN KEY (department_id) REFERENCES departments(id)
);

CREATE TABLE departments (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    FOREIGN KEY (parent_id) REFERENCES departments(id),
    parent_id INT
);
"""

def extra_transform(sql: str) -> str:
    """Example extra transformation function"""
    return sql.replace('CREATE TABLE', 'CREATE TABLE IF NOT EXISTS')


ARGS = {
    "schema_sql": schema_sql_with_fk,
    "extra_fn": extra_transform
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clickhouse_server_start Not yet run
unverified (harvested, no recorded run)
SolidLao/GenDB/benchmarks/lib/systems.py
code served (permissive licence) · get_code("411a1a5a931340e2")
How it ran

no invocation recorded.

plot_combined_results Not yet run
unverified (harvested, no recorded run)
SolidLao/GenDB/benchmarks/lib/plotting.py
code served (permissive licence) · get_code("306b9d35664cf2ec")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Traditional query processing engines require continuous development and extensions to support new techniques and user requirements, and in some cases, entirely new systems must be built from scratch. However, these engines are difficult to extend due to their internal complexity, and building new systems demands significant engineering effort and cost. To address this, we demonstrate GenDB, a generative query engine that shifts query processing from manually engineered systems to query processing code generation driven by Large Language Models (LLMs). An early prototype of GenDB uses LLM agents to generate instance-optimized query execution code tailored to specific data, workloads, and hardware resources. This prototype suits offline code generation for repetitive, templated queries, since the upfront generation cost amortizes over many executions and correctness can be ensured through extensive fuzz testing and manual inspection. For ad-hoc queries, GenDB can work with a traditional DBMS in a hybrid architecture: the DBMS handles one-off queries, while GenDB speeds up frequent SQL templates. We also discuss the current limitations of GenDB, such as high generation cost and the lack of correctness guarantees, to inform future extensions. Our demonstration allows users to (1) visually and interactively explore how GenDB analyzes workloads, profiles hardware resources and underlying data, produces query plans, generates code based on them, and finally uses an optimizer to iteratively achieve a correct and efficient implementation; (2) use visual inspection and analysis to gain qualitative insights into why GenDB produces code that achieves significantly better performance than state-of-the-art query engines on two benchmarks: TPC-H and a newly constructed benchmark designed to reduce potential data leakage from LLM training data; and (3) upload their own data and queries to explore GenDB with different LLMs and query patterns. A live demo is available at https://solidlao.github.io/GenDB/demo/.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2607.20630")
get_code_for_paper("2607.20630")
have("2607.20630")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2607.20630.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2607.20630.svg)](https://syntology.ai/paper/2607.20630)

Connect an agent — have() is free.