zhuqi-lucas commented on issue #16888: URL: https://github.com/apache/datafusion/issues/16888#issuecomment-3126515866
> Yes, that's a typo. I think my follow up question would be: why is this a valid query? > > SELECT * > FROM t whatever_alias BY k; > Or more precisely: what does `BY k` in the first `FROM` table mean? Very good question @crepererum , it may due to: In DataFusion’s SQL grammar, any identifier immediately following a table reference can be taken as an alias, and if it’s followed by BY col1, col2… it’s treated as a distribution hint (i.e. “hash‑partition on these columns”) rather than a typo of ORDER BY? That syntax (FROM <table> <alias> BY <cols>) is perfectly valid, there’s no parse or validation error... I need to investigate more, if we can have a better solution to solve this, thanks ! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org