News for hackers. Stuff that matters.
Re:PRQL – A proposal for a better SQL by taeric on Monday January 24, 2022 @04:08PM (#30064068)
This is... An odd choice. I'd assume I'm not without context looking at a query to know why I would want those columns.

And the auto complete story is backwards. Often I know what columns I want, but I'm not clear what table I need to get them from. Such that, if you make a smarter suggest in the from to only include tables that have the columns, I'd be much happier.

Re:PRQL – A proposal for a better SQL by sanderjd on Monday January 24, 2022 @05:32PM (#30064989)
Just throwing in another point of anecdata onto this pile: "Often I know what columns I want, but I'm not clear what table I need to get them from" does not make sense to me. I don't relate at all to their being a global namespace of columns, rather than a namespace of tables, each with its own columns specific to its context.
Re:PRQL – A proposal for a better SQL by taeric on Monday January 24, 2022 @05:46PM (#30065154)
I challenge this. I accept that there are ambiguities, but I assert that you can go really fast by just telling someone to fetch a few columns by name.

I further assert that if your database is filled with "Id" and "name" columns, instead of "department_name" and similar, you are probably as likely to mess up a join as any benefit you get from the name being short. (And really, what advantage is there in short names nowadays?)

That all said. I worded my take too strongly. My point should have been that auto suggest should not be confined in either direction.

Re:PRQL – A proposal for a better SQL by sanderjd on Monday January 24, 2022 @08:52PM (#30066880)
I think we have just done most of our data work in different environments.

When I'm trying to query stuff, the first question is "which service's database is that in?", so I can guess "user_service" (or whatever I think it is called), but I have no idea what they call anything in their schema, but now that the autocomplete system knows what table I'm interested in, it can help me figure that out.

Re:PRQL – A proposal for a better SQL by taeric on Tuesday January 25, 2022 @12:48AM (#30068590)
I'm used to emacs, with a global namespace. Such that I'm used to searching all variables globally. Feels that searching all columns would be just as easy, all told.

That said, I want to be clear that I think both methods are valid and work.

Re:PRQL – A proposal for a better SQL by sanderjd on Tuesday January 25, 2022 @01:02AM (#30068677)
Yeah, it's just that I don't know what the columns are called. The namespaces (databases and tables) are what guides me to the columns, not vice versa.

I can think back to projects / companies where this may have been different, basically just with fewer different distinct schemas, but it just isn't my recent experience.

(I appreciate your magnanimity in these later comments by the way.)