3 ms·
Very cool Design goal question - is the goal to have a language that blindly compiles to SQL, or will compilation require data schema knowledge? Suggestion: w
by ridaj 5y ago
Very cool
Design goal question - is the goal to have a language that blindly compiles to SQL, or will compilation require data schema knowledge?
Suggestion: where possible stick to the well established SQL keywords (prefer "group by" to "aggregate by")
- maximilianroos 5y agoInitially 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?
- ridaj 5y agoI 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.)
- hadley 5y agoFrom 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).
- maximilianroos 5y agoYes, 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.