SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.emnlp-main.178 · EMNLP · 2025

Dialect-SQL: An Adaptive Framework for Bridging the Dialect Gap in Text-to-SQL

Wei Wang, Peng Wang, Jia Chen, Yanghua Xiao, Bo Xu, Jie Shi, Jiaqing Liang, Xi Cao

Open in the Atlas

Code that ran

17 of 18 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; 1 honoured the contract we drafted, 3 violated it and 6 have no contract verdict; 7 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2025.emnlp-main.178.json · badge: /api/ran/2025.emnlp-main.178.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
jieshi10/orm-sql canonical (classifier label)
classifier basis: census
17 ran · 1 no recorded run
FunctionStatusWhere it lives
build_sql Ran
ran on a synthesized input
jieshi10/orm-sql/sql_utils_2.py
code served (permissive licence) · get_code("a645f0787e9b9c4c")
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 torch
import numpy as np

ARGS = {
    'table_name': 'users',
    'columns': [
        ('id', 'INT'),
        ('name', 'VARCHAR(255)'),
        ('email', 'VARCHAR(255)'),
        ('created_at', 'TIMESTAMP')
    ],
    'primary_keys': ['id'],
    'foreign_keys': [
        {
            'fk': ['department_id'],
            'ref': 'departments',
            'ref_key': ['id']
        }
    ],
    'descriptions': {
        'id': 'User identifier',
        'name': 'Full name of the user',
        'email': 'Email address',
        'created_at': 'Account creation timestamp'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
condition_has_like Ran
ran, violated the contract we drafted
jieshi10/orm-sql/benchmark/test-suite-sql-eval/evaluation_2.py
code served (permissive licence) · get_code("8231e3fdffa9c8ee")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.

WHERE_OPS = ('not', 'between', '=', '>', '<', '>=', '<=', '!=', 'in', 'like', 'is', 'exists')

# The function expects conds to be a list where every other element (starting at 0, i.e., conds[::2])
# is a cond_unit. Each cond_unit must be indexable with [1] to get an operation index.
# The operation index should be an integer that can be checked against WHERE_OPS.index('like').

# WHERE_OPS.index('like') = 9

# Create a valid conds structure
# conds[::2] gives us every other element starting from index 0
# Each cond_unit needs to be a sequence where cond_unit[1] is an integer representing the operation

# Example: conds with 4 elements, so conds[::2] will give us elements at indices 0 and 2
# Each cond_unit can be a tuple/list like (col_id, op_id, value)

conds = [
    (0, 2, 'value1'),  # index 0: operation '=' (index 2)
    'separator',        # index 1: some separator (not accessed by [::2])
    (1, 9, 'pattern'), # index 2: operation 'like' (index 9)
    'separator'         # index 3: another separator (not accessed by [::2])
]

ARGS = {'conds': conds}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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
condition_has_or Ran
ran, violated the contract we drafted
jieshi10/orm-sql/benchmark/test-suite-sql-eval/evaluation_2.py
code served (permissive licence) · get_code("f2d76234528d3b57")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 torch
import numpy as np

# The function checks if 'or' is in conds[1::2], which means it's looking at every other element starting from index 1
# This suggests conds is a list where odd indices might contain operators like 'or', 'and', etc.
# A typical structure would be: [condition1, 'or', condition2, 'and', condition3, ...]

# Example 1: conds with 'or' in odd positions
conds_with_or = ['condition1', 'or', 'condition2', 'and', 'condition3']

# Example 2: conds without 'or' in odd positions
conds_without_or = ['condition1', 'and', 'condition2', 'and', 'condition3']

# We'll use the first example as the argument
ARGS = {
    'conds': conds_with_or
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
convert_fk_index Ran
ran, honoured the contract we drafted
jieshi10/orm-sql/benchmark/test-suite-sql-eval/get_tables_2.py
code served (permissive licence) · get_code("64dd3849a251a1bf")
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 2, dtype family int; 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 torch
import numpy as np

# Construct valid arguments for convert_fk_index
data = {
    'foreign_keys': [
        # Each foreign key is a tuple of ((table_name, column_name), (ref_table_name, ref_column_name))
        (('users', 'department_id'), ('departments', 'id')),
        (('orders', 'user_id'), ('users', 'id')),
    ],
    'table_names_original': ['users', 'departments', 'orders'],
    'column_names_original': [
        # Each entry is (table_id, column_name)
        (0, 'id'),
        (0, 'name'),
        (0, 'department_id'),
        (1, 'id'),
        (1, 'dept_name'),
        (2, 'id'),
        (2, 'user_id'),
        (2, 'amount'),
    ],
}

ARGS = {
    'data': data,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — 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
convert_sqlite_type_to_postgres_type Ran
ran on a synthesized input
jieshi10/orm-sql/bird_code/export_bird_db_to_mssql.py
code served (permissive licence) · get_code("4628ebe5268ffb3c")
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.

ARGS = {
    'db_type': 'text'
}
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
convert_sqlite_type_to_postgres_type Ran
ran on a synthesized input
jieshi10/orm-sql/bird_code/export_bird_db_to_mysql.py
code served (permissive licence) · get_code("8245252ef45fa75e")
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 torch
import torch.nn as nn

ARGS = {
    "db_type": "datetime"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
dump_db_json_schema Ran
ran; our contract draft was wrong, not the code
jieshi10/orm-sql/benchmark/test-suite-sql-eval/get_tables_2.py
code served (permissive licence) · get_code("992c7947d4eb2bb1")
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 sqlite3
import tempfile
import os

# Create a temporary SQLite database for testing
temp_dir = tempfile.mkdtemp()
db_path = os.path.join(temp_dir, "test.db")

conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Create tables with schema
cursor.execute('''
    CREATE TABLE users (
        user_id INTEGER PRIMARY KEY,
        name TEXT,
        email TEXT
    )
''')

cursor.execute('''
    CREATE TABLE orders (
        order_id INTEGER PRIMARY KEY,
        user_id INTEGER,
        amount REAL,
        order_date DATE,
        FOREIGN KEY(user_id) REFERENCES users(user_id)
    )
''')

cursor.execute('''
    CREATE TABLE products (
        product_id INTEGER PRIMARY KEY,
        product_name TEXT,
        price NUMERIC
    )
''')

cursor.execute('''
    CREATE TABLE order_items (
        item_id INTEGER PRIMARY KEY,
        order_id INTEGER,
        product_id INTEGER,
        quantity INTEGER,
        FOREIGN KEY(order_id) REFERENCES orders(order_id),
        FOREIGN KEY(product_id) REFERENCES products(product_id)
    )
''')

conn.commit()
conn.close()

ARGS = {
    'db': db_path,
    'f': 'test_db'
}
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
dump_db_json_schema Ran
ran on a synthesized input
jieshi10/orm-sql/sql_utils_2.py
code served (permissive licence) · get_code("268aac9944c7d507")
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 sqlite3
import tempfile
import os

# Create a temporary SQLite database with test schema
temp_dir = tempfile.mkdtemp()
db_file = os.path.join(temp_dir, "test.db")

conn = sqlite3.connect(db_file)

# Create a simple schema with tables and foreign keys
conn.execute('''
    CREATE TABLE users (
        id INTEGER PRIMARY KEY,
        name TEXT NOT NULL
    )
''')

conn.execute('''
    CREATE TABLE posts (
        id INTEGER PRIMARY KEY,
        user_id INTEGER NOT NULL,
        title TEXT,
        FOREIGN KEY(user_id) REFERENCES users(id)
    )
''')

conn.execute('''
    CREATE TABLE comments (
        id INTEGER PRIMARY KEY,
        post_id INTEGER NOT NULL,
        user_id INTEGER NOT NULL,
        content TEXT,
        FOREIGN KEY(post_id) REFERENCES posts(id),
        FOREIGN KEY(user_id) REFERENCES users(id)
    )
''')

conn.commit()
conn.close()

ARGS = {
    'db_file': db_file
}
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
ensure_timeout Ran
ran on a synthesized input
jieshi10/orm-sql/benchmark/test-suite-sql-eval/evaluation_2.py
code served (permissive licence) · get_code("9735063be27f84b8")
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 function. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "seconds": 5.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
extract_tables_from_sql Ran
ran on a synthesized input
jieshi10/orm-sql/sql_utils_2.py
code served (permissive licence) · get_code("a334f8582f1c13f5")
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 set. 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.

# Analyze the function to understand what it needs:
# - schema: needs an 'idMap' attribute that's a dict-like object
# - sql: can be a nested structure (dict, list, tuple, or str) containing strings
#        that follow the pattern __tablename__ where tablename is in schema.idMap

class MockSchema:
    def __init__(self):
        self.idMap = {
            'users': True,
            'orders': True,
            'products': True,
        }

# Create a nested SQL structure with table references
sql_structure = {
    'select': ['__users__', '__orders__'],
    'from': '__products__',
    'where': [
        ('column', '__users__.id'),
        ('nested', {
            'subquery': ['__orders__']
        })
    ],
    'extra': '__nonexistent__',  # This won't be in idMap, so won't be extracted
}

schema = MockSchema()

ARGS = {
    'schema': schema,
    'sql': sql_structure,
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_schema Ran
ran; our contract draft was wrong, not the code
jieshi10/orm-sql/process_sql.py
code served (permissive licence) · get_code("0992d2a47ae733fa")
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 sqlite3
import tempfile
import os

# Create a temporary SQLite database with some test tables
temp_dir = tempfile.mkdtemp()
db_path = os.path.join(temp_dir, "test.db")

conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Create a sample table
cursor.execute("""
    CREATE TABLE users (
        id INTEGER PRIMARY KEY,
        name TEXT,
        email TEXT
    )
""")

# Create another sample table
cursor.execute("""
    CREATE TABLE products (
        id INTEGER PRIMARY KEY,
        title TEXT,
        price REAL,
        stock INTEGER
    )
""")

conn.commit()
conn.close()

ARGS = {
    "db": db_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 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_schema_from_json Ran
ran; our contract draft was wrong, not the code
jieshi10/orm-sql/process_sql.py
pointer only (licence: MIT); the stored copy get_code serves, from ygan/NatSQL, is pointer only (licence: NONE) · get_code("c4dcaf29b663a364")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ygan/NatSQL, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

join_tokens Ran
ran; our contract draft was wrong, not the code
jieshi10/orm-sql/benchmark/test-suite-sql-eval/parse.py
code served (permissive licence) · get_code("2178b95c919ae420")
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.

from typing import List, Tuple, Set, Iterator, Dict, Any, Union
from collections import namedtuple

Token = namedtuple('Token', ['ttype', 'value'])

# Create a list of Token objects for testing
tokens = [
    Token(ttype='WORD', value='hello'),
    Token(ttype='SPACE', value='  '),
    Token(ttype='WORD', value='world'),
    Token(ttype='SPACE', value=' '),
    Token(ttype='WORD', value='test'),
]

ARGS = {
    'tokens': tokens
}
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
permute_tuple Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jieshi10/orm-sql/benchmark/test-suite-sql-eval/exec_eval_2.py
code served (permissive licence) · get_code("f23d6ff3772963bc")
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. 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 torch

torch.manual_seed(0)

# The function permute_tuple takes:
# 1. element: a Tuple - can be any tuple
# 2. perm: a Tuple - should be a permutation of indices matching element length

# Create a simple tuple with 4 elements of different types
element = (1, "hello", 3.14, torch.tensor([1, 2, 3]))

# Create a permutation tuple that reorders the indices
# For a 4-element tuple, a valid permutation could be (3, 1, 0, 2)
perm = (3, 1, 0, 2)

ARGS = {
    "element": element,
    "perm": perm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
postprocess Ran
ran; our contract draft was wrong, not the code
jieshi10/orm-sql/benchmark/test-suite-sql-eval/parse.py
code served (permissive licence) · get_code("58e472cff9780d63")
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 torch
import numpy as np

torch.manual_seed(0)

# The function postprocess takes a single string parameter 'query'
# and performs string replacements on it.
# No complex objects needed - just a simple string.

ARGS = {
    'query': '> = test < = and ! = check'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
quick_rej Ran
ran, violated the contract we drafted
jieshi10/orm-sql/benchmark/test-suite-sql-eval/exec_eval_2.py
code served (permissive licence) · get_code("a40510ba6a37f798")
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 torch

torch.manual_seed(0)

# Analyze the function:
# - result1: List[Tuple] - list of tuples
# - result2: List[Tuple] - list of tuples
# - order_matters: bool - determines comparison mode

# The function processes tuples through unorder_row which sorts elements
# by their string representation and type. Then it either compares lists
# directly (order_matters=True) or as sets (order_matters=False).

# Create test data with various tuple types
result1 = [
    (1, "a", 2.5),
    (10, "b", 3.5),
    (5, "c", 1.5),
]

result2 = [
    (5, "c", 1.5),
    (1, "a", 2.5),
    (10, "b", 3.5),
]

order_matters = False

ARGS = {
    "result1": result1,
    "result2": result2,
    "order_matters": order_matters,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
unorder_row Ran
ran; our contract draft was wrong, not the code
jieshi10/orm-sql/benchmark/test-suite-sql-eval/exec_eval_2.py
code served (permissive licence) · get_code("afc8ef89576ef2aa")
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. 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 torch
import numpy as np
from typing import Tuple, Any, List, Set

torch.manual_seed(0)

# Construct a tuple with mixed types to test the sorting logic
row = (
    "zebra",
    42,
    3.14,
    torch.tensor([1, 2, 3]),
    {"key": "value"},
    [1, 2, 3],
    None,
)

ARGS = {
    "row": row,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
tokenize Not yet run
unverified (harvested, no recorded run)
jieshi10/orm-sql/process_sql.py
code served (permissive licence) · get_code("a906f5de1f5971b0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 1 later) and 6 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.

FunctionAlso present inEarliest-datedOthers named
condition_has_like 14 other papers
12 dated earlier, 2 same year, order not determinable
1809.08887 (2018-09)
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
1906.02285 (2019-06)
SParC: Cross-Domain Semantic Parsing in Context
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
and 11 more not named here
condition_has_or 14 other papers
12 dated earlier, 2 same year, order not determinable
1809.08887 (2018-09)
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
1906.02285 (2019-06)
SParC: Cross-Domain Semantic Parsing in Context
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
and 11 more not named here
get_schema_from_json 13 other papers
10 dated earlier, 1 later, 2 same year, order not determinable
1911.04942 (2019-11)
RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2106.01093 (2021-06)
LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
and 10 more not named here
get_schema 11 other papers
9 dated earlier, 2 same year, order not determinable
1911.04942 (2019-11)
RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2106.01093 (2021-06)
LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
and 8 more not named here
tokenize 10 other papers
9 dated earlier, 1 same year, order not determinable
1911.04942 (2019-11)
RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers
2020.emnlp-main.564 (2020 (year only))
Re-examining the Role of Schema Linking in Text-to-SQL
2106.01093 (2021-06)
LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations
and 7 more not named here
permute_tuple 6 other papers
4 dated earlier, 2 same year, order not determinable
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2310.17342 (2023-10)
ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
and 3 more not named here
quick_rej 6 other papers
4 dated earlier, 2 same year, order not determinable
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2310.17342 (2023-10)
ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
and 3 more not named here
unorder_row 6 other papers
4 dated earlier, 2 same year, order not determinable
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2310.17342 (2023-10)
ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
and 3 more not named here
join_tokens 5 other papers
4 dated earlier, 1 same year, order not determinable
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2310.17342 (2023-10)
ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
and 2 more not named here
postprocess 5 other papers
4 dated earlier, 1 same year, order not determinable
2302.08468 (2023-02)
LEVER: Learning to Verify Language-to-Code Generation with Execution
2310.17342 (2023-10)
ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
and 2 more not named here
convert_fk_index 2 other papers
2 dated earlier
2306.08891 (2023-06)
Interleaving Pre-Trained Language Models and Large Language Models for Zero-Shot NL2SQL Generation
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs
dump_db_json_schema 1 other paper
1 dated earlier
2406.12288 (2024-06)
An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs

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-24.

Repositories linked to this paper

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

Abstract

Text-to-SQL is the task of translating natural language questions into SQL queries based on relational databases. Different databases implement their own SQL dialects, leading to variations in syntax. As a result, SQL queries designed for one database may not execute properly in another, creating a dialect gap. Existing Text-to-SQL research primarily focuses on specific database systems, limiting adaptability to different dialects. This paper proposes a novel adaptive framework called Dialect-SQL, which employs Object Relational Mapping (ORM) code as an intermediate language to bridge this gap. Given a question, we guide Large Language Models (LLMs) to first generate ORM code, which is then parsed into SQL queries targeted for specific databases. However, there is a lack of high-quality Textto-Code datasets that enable LLMs to effectively generate ORM code. To address this issue, we propose a bootstrapping approach to synthesize ORM code, where verified ORM code is iteratively integrated into a demonstration pool that serves as in-context examples for ORM code generation. Our experiments demonstrate that Dialect-SQL significantly enhances dialect adaptability, outperforming traditional methods that generate SQL queries directly. Our code and data are released at https://github.com/jieshi10/orm-sql.

For agents

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

get_harvested_code_for_paper("2025.emnlp-main.178")
get_code_for_paper("2025.emnlp-main.178")
have("2025.emnlp-main.178")

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

curl https://syntology.ai/api/ran/2025.emnlp-main.178.json

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

[![Syntology run record](https://syntology.ai/api/ran/2025.emnlp-main.178.svg)](https://syntology.ai/paper/2025.emnlp-main.178)

Connect an agent — have() is free.