-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
align from-less query semantics with SQL (#5418)
This commit changes the interpretation of a query that omits the from operator. Previously, a lake query would use the default "HEAD" parameter as an implied "from HEAD". This contradicts SQL which assumes a table with one empty row (like the implied yield null case). The new assumption in a lake query for a from-less query is an implied null source so that a "select 'hello'" query will return not a single 'hello' rather than a sequence based on the implied read from HEAD. Similary, a from-less command-line query (i.e., super -c) with no file arguments also has an automatic null scan inserted. As part of this change, we moved the logic for inserting the null scan into the DAG (along with the logic for inserting DefaultScan of zio.Readers) into the semantic pass. These changes mean that lake queries that read from a pool require an explicit "from" and there is no impleied pool from HEAD. Because of this, we removed the HEAD references in the code paths that involve lake queries. HEAD is still used by the various "super db" commands to refer to a default pool/branch/commit. Currently, the null scan does not follow the done protocol and restart. We will need to add this when we want from-less subqueries to restart.
- Loading branch information
Showing
69 changed files
with
271 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ var unpacker = unpack.New( | |
MapExpr{}, | ||
Merge{}, | ||
Mirror{}, | ||
NullScan{}, | ||
Output{}, | ||
Over{}, | ||
OverExpr{}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.