What happened?
ibis.backends.sql.dialects.MSSQL maps the bare Stddev node to STDEVP (population):
sge.Stddev: rename_func("stdevp")
so raw T-SQL passed to Backend.sql() on the MSSQL backend is executed with different statistical semantics than submitted. This is a same-dialect round-trip (T-SQL in, T-SQL out, same backend) — not cross-dialect transpilation ambiguity.
What version of ibis are you using?
12.0.0 (sqlglot 30.4.2)
What backend(s) are you using, if any?
MSSQL (same mapping pattern present in the MySQL and Oracle dialects)
Relevant log output
import sqlglot
from ibis.backends.sql.dialects import MSSQL
print(sqlglot.transpile("SELECT STDEV([x]) AS [s] FROM [t]", read=MSSQL, write=MSSQL)[0])
# SELECT STDEVP([x]) AS [s] FROM [t]
print(sqlglot.transpile("SELECT STDEV([x]) AS [s] FROM [t]", read="tsql", write="tsql")[0])
# SELECT STDEV([x]) AS [s] FROM [t] <- vanilla sqlglot is correct
Code of Conduct
What happened?
ibis.backends.sql.dialects.MSSQL maps the bare Stddev node to STDEVP (population):
sge.Stddev: rename_func("stdevp")so raw T-SQL passed to Backend.sql() on the MSSQL backend is executed with different statistical semantics than submitted. This is a same-dialect round-trip (T-SQL in, T-SQL out, same backend) — not cross-dialect transpilation ambiguity.
What version of ibis are you using?
12.0.0 (sqlglot 30.4.2)
What backend(s) are you using, if any?
MSSQL (same mapping pattern present in the MySQL and Oracle dialects)
Relevant log output
Code of Conduct