Skip to content

Use s-strings to generate a CTE #376

Closed

Description

@max-sixty

Currently:

table x = (
  s"SELECT * FROM employees"
)

from x

returns

Expected a known transformation; got s

I'm not sure the exact form that the s-string should be in, but this would allow any form of escape hatch. Currently if someone wanted to do something beyond a statement — e.g. a lateral join, which we don't support — then that wouldn't be possibl.

Activity

  1. added
    bug
    language-design
    on Apr 17, 2022
  2. added this to the 0.2 milestone on Apr 17, 2022
  3. aljazerzen commented on Apr 18, 2022

    @aljazerzen
    Member

    I would expect such statement to have form of:

    table x = s"SELECT * FROM employees"
    

    because a SELECT has the same "type" as a pipeline not a transform inside a pipeline.

  4. max-sixty commented on Apr 18, 2022

    @max-sixty
    MemberAuthor

    Yes agree, good point. (It does give the same error though)

  5. modified the milestones: 0.2, 0.3 on Apr 18, 2022
  6. max-sixty commented on Apr 18, 2022

    @max-sixty
    MemberAuthor

    I notice you took off the milestone — how difficult do you think this is @aljazerzen ? I do think that we're likely to have lots of missing things, and so without this, people will hit a cap without an escape hatch.

    I may try and implement r# strings, which would be necessary for this.

  7. aljazerzen commented on Apr 18, 2022

    @aljazerzen
    Member

    It would require a few tweaks to the parser, which might cause a cascade.

    I didn't know how important is it, I you feel that people will quickly hit this limit, we can do it in 0.2 milestone.

  8. aljazerzen commented on Dec 1, 2022

    @aljazerzen
    Member

    Closed by #1197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglanguage-design

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions