Repository navigation
fix(syntax-snowflake): represent the part a..b leaves out as null with a flag on its owner - #229
Merged
Merged
Conversation
…h a flag on its owner A Snowflake name such as `d1..orders` or `d1..f()` leaves its schema out. The tree used to hold an invented empty name in that place, or shifted the remaining parts so the name read as `d1.orders`. - A table reference keeps `schema` null and sets `schema_omitted`. - `d1..f()` is a qualified method call on `d1` with `schema_omitted`. - A CALL name list keeps the omitted position in place as a null entry (`Call.name` is now a list of optional identifiers). - Lineage, lint and the remaining parser checks keep the empty part when they join name parts, so `d1..orders` never resolves as `d1.orders`. - The converter refuses `d1..orders`: the new flag is not one it understands.
…ut its schema A call's spelling key joined its qualifier and method name, so `SNOWFLAKE..NULL_COUNT( ... )` now keyed as `SNOWFLAKE.NULL_COUNT`, a two-part name. The key keeps the empty part again. The a..b tree test also covers a data metric function name and an EXECUTE JOB value.
… trees changed The forms with a name that leaves out its schema were read again under review brief version 1, with the clarification that a part a..b leaves out is null with a `*_omitted` flag on its owner. 267 forms are approved; the baseline is re-recorded.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A Snowflake name such as
d1..orders,d1..f()orCALL d1..cls!m()leaves its schema out. The tree held an invented empty name in that place, which review criterion (d) rejects, or shifted the parts so the name read asd1.orders.Changes
schemanull and setsschema_omitted. SHOW targets, data metric function names and EXECUTE JOB values use the same table reference.d1..f()is a qualified method call ond1withschema_omitted.Call.nameis nowVec<Option<Identifier>>, rather than a separate index field.d1..ordersnever reads asd1.orders. The converter refusesd1..orders; mapping it tod1.PUBLIC.ordersis out of scope.*_omittedflag on its owner. The frozen brief file is unchanged; each review note records the clarification.Coverage: verified 2757 to 2768. Gross 16, drops 5, net +11. No drop comes from an a..b tree; each is an existing defect the re-read found:
<account_name>obligation filed as an identifier while its case passes a string (2)ON ( , x -> ... )drops its empty leading slot (2)Verification
d1.ordersconverts andd1..ordersis refused."name":""left from a..b.make check-ci.