We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd5977f commit 0f2dccfCopy full SHA for 0f2dccf
python/tests/test_sql.py
@@ -159,6 +159,16 @@ def test_register_parquet(ctx, tmp_path):
159
assert result.to_pydict() == {"cnt": [100]}
160
161
162
+def test_parameterized_sql(ctx, tmp_path) -> None:
163
+ path = helpers.write_parquet(tmp_path / "a.parquet", helpers.data())
164
+ df = ctx.read_parquet(path)
165
+ result = ctx.sql(
166
+ "SELECT COUNT(a) AS cnt FROM {replaced_df}", replaced_df=df
167
+ ).collect()
168
+ result = pa.Table.from_batches(result)
169
+ assert result.to_pydict() == {"cnt": [100]}
170
+
171
172
@pytest.mark.parametrize("path_to_str", (True, False))
173
def test_register_parquet_partitioned(ctx, tmp_path, path_to_str):
174
dir_root = tmp_path / "dataset_parquet_partitioned"
0 commit comments