You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Six locations in generators and the interactive shell still emitted
RANDOM() and LIMIT which MS-SQL does not support.
Group A — interactive shell (base.py, table.py, generators.py):
Replace sqlalchemy.text() f-strings with SQLAlchemy expression API.
func.newid() vs func.random() chosen per dialect.name == "mssql";
.limit(n) compiles to TOP n / LIMIT n automatically.
Group B — CovariateQuery (continuous.py):
Add dialect_name parameter to __init__(); _inner_query() now emits
SELECT TOP n … ORDER BY NEWID() on MS-SQL and SELECT * … ORDER BY
RANDOM() LIMIT n elsewhere. dialect_name passed from get_generators().
Group C — MissingnessType (missingness.py):
sampled_query() accepts dialect_name; returns the MS-SQL TOP/NEWID
form when dialect_name == "mssql". do_sampled() passes
self.sync_engine.dialect.name.
Tests added in test_generators_dialect.py (CovariateQuery, Missingness)
and new test_interactive_dialect.py (peek, _get_column_data,
print_column_data) covering both MS-SQL and PostgreSQL.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments