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
{{ message }}
Repository navigation
A prepared query of datafusion.<schema>.<table> misses that table's replacement #325
🌀 Claude: A prepared query of datafusion.<schema>.<table> doesn't notice that table being replaced. It returns the old rows and doesn't raise.
xarray-sql counts replacements under a name without DataFusion's default catalog and schema. It strips datafusion.public. and public., but not datafusion. in front of another schema. So a query that names datafusion.era5.i is tracked under that whole name, while replacing era5.i is counted under era5.i:
importnumpyasnp, xarrayasxrfromxarray_sqlimportContextds=xr.Dataset(
{"v": ("i", np.arange(3.0)), "t": (("i", "j"), np.ones((3, 2)))},
coords={"i": np.arange(3), "j": np.arange(2)},
) # two groups of dims, so from_dataset makes tables era5.i and era5.i_jctx=Context(); ctx.from_dataset("era5", ds)
q=ctx.prepare("SELECT v FROM datafusion.era5.i ORDER BY i")
ctx.sql("CREATE OR REPLACE TABLE era5.i AS SELECT 7.0 AS v, 0 AS i")
ctx.sql("SELECT v FROM datafusion.era5.i") # [7.0]q()["v"] # [0.0, 1.0, 2.0], with no error
I reproduced this on main at 447791a (0.7.1), with DataFusion 55.0.0. For the same reason, such a query can't write era5.i. The review of #323 found it, and #323 will fix it.
Activity
Find views with dots in their names, and names in the default catalog
Release 0.8.0 (#327)
Make Context's records of its tables and functions public (xqlsystems…