Comment by maximilianroos
4 years ago
Initially the transpiling would be context-free of the schema.
It would really nice to have context when _writing_ the code, so we could do things like autocomplete (IIUC this is what Malloy does already).
Are there features you can think of that would be helpful if we had the schema context during transpiling?
From dbplyr experience, folks want to be able to do stuff like `across(which(is.numeric), mean)`, which you can't do currently because dplyr doesn't know the column types (although it does maintain a list of the column names).
Yes, that's a good example.
Indeed — often SQL doesn't know the column _names_, let alone the types. So for cross-column selection (e.g. `across`), this does become necessary.
I wasn't thinking it'd be useful, but more that it's good to remain as free as possible from any assumptions about the schema of the data. I often work with tables that have unusually large schemas (> 100MB) and have seen some products' performance severely degrade as a function of schema complexity.
(But otherwise +1 to schema awareness during authoring.)