* support WHERE pipe operator
* support order by
* support limit
* select pipe
* extend support
* document supported pipe operators in user guide
* fmt
* fix where pipe before extend
* support AS
* support union
* support intersection
* support except
* support aggregate
* support join operator
* support pivot
* remove unused
* revert parquet-testing
* remove simon
* move docs to select.md
* remove unnecessary comments
* back out pivot operator
* remove prompt marker
* support WHERE pipe operator
* support order by
* support limit
* select pipe
* extend support
* document supported pipe operators in user guide
* fmt
* fix where pipe before extend
* support AS
* support union
* support intersection
* support except
* support aggregate
* revert diff from main
* simplify using mut
* remove useless comments
* remove dummy data
* move docs to select.md
* simplify using alias_if_changed
* deduplicate fn
* add aggregate toc
* revert parquet testing
* support WHERE pipe operator
* support order by
* support limit
* select pipe
* extend support
* document supported pipe operators in user guide
* fmt
* fix where pipe before extend
* don't rebind
* remove clone
* move docs into select.md
* avoid confusion by removing `>` in examples
---------
Co-authored-by: Jeffrey Vo <jeffrey.vo.australia@gmail.com>
* Add failing test
* Fix regression in SELECT FROM syntax with WHERE clause
When using 'SELECT FROM table WHERE condition', the query should create
an empty projection (no columns) while still filtering rows. This was
broken by PR #17295 which added FROM-first syntax support.
The issue was that both 'FROM table' and 'SELECT FROM table' resulted
in empty projection lists, making them indistinguishable. The fix checks
for the presence of a WHERE clause to differentiate:
- 'FROM table' (no WHERE) -> add wildcard projection (all columns)
- 'SELECT FROM table WHERE ...' -> keep empty projection
Also updates the test expectation to correctly show the empty Projection
node in the query plan.
Fixes#17513
* Revert
* Fix regression: SELECT FROM syntax should return empty projection
Removes automatic wildcard projection for empty projections, fixing
the regression where `SELECT FROM table` incorrectly returned all
columns instead of empty projection.
Note: This temporarily breaks FROM-first syntax. A proper fix would
require distinguishing between `FROM table` and `SELECT FROM table`
at the parser level.
Fixes#17513🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* add a better regression test
* remove comment
* fmt
* Update datafusion/sqllogictest/test_files/projection.slt
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
* Update datafusion/core/tests/sql/select.rs
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
* revert docs
* fmt
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
* Support from-first syntax
I noticed in https://github.com/apache/datafusion/pull/17278 that `from`
without an explicit projection did not work.
This should fix it
* add more tests
* document in user guide
* Fix 'Configuration Settings' link in write_options.md
* Fix multiple reference definition in scalar_functions.md
* Fix typo: 'contcat_ws' to 'concat_ws' in scalar_functions.md
* Add missing section 'array_contains' in scalar_functions.md
* Fix reference warnings in operators.md
* Remove unsupported syntax 'csv' from code blocks of adding-udfs.md
* Fix syntax tag in example-usage.md
* Change syntax tag of code blocks that contain multiple syntaxes of
cli.md
* Remove 'sql' syntax tags from code blocks
* Remove leading ❯ in sql code blocks
* Improve doc
Adds specific note on lowercase treatment of columns on SQL
This example is the first thing newcomers see when they start with datafusion (literally the second page on the docs) so it should be clearer.
* Update select.md
add note on the use of default lower-case for SQL query
* prettier this
* improve example file link
* add capitalized example
* consolidate datafusion docs with sphinx
* added python doc
* combined, cli, user-guide and specification docs into a single datafusion doc
Co-authored-by: Jiayu Liu <Jimexist@users.noreply.github.com>