GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Systematic way of dealing with nested queries · Issue #7 · queryverse/QuerySQLite.jl

Systematic way of dealing with nested queries #7

New issue
Copy link
New issue
Copy link
Open
Bug
Open
Systematic way of dealing with nested queries#7
Bug
Copy link
Assignees
bramtayl

Description

@davidanthoff
davidanthoff
opened on Sep 9, 2019
Issue body actions

I tried this query on the Chinook db:

db.Track |> @select(:AlbumId, :Composer) |> @mutate(bar = _.AlbumId * 2)

and got an error. Should that work?

Activity

  1. davidanthoff
    added
    bugSomething isn't workingSomething isn't working
    on Sep 9, 2019
  2. davidanthoff
    assigned
    bramtayl
    on Sep 9, 2019
  3. bramtayl commented on Dec 8, 2019

    @bramtayl
    bramtayl
    on Dec 8, 2019
    Collaborator
    More actions

    This is getting close to being user ready. I need to add some docs and write up the blog posts. Sorry it's been a busy semester.

    I tried running the code, and it generates the following:

    result = database.Track |> @select(:AlbumId, :Composer) |> @mutate(bar = _.AlbumId * 2)
    translate(result.code)
    SELECT AlbumId AS AlbumId, Composer AS Composer, AlbumId * 2 AS bar SELECT AlbumId AS AlbumId, Composer AS Composer FROM (Track)

    Which is pretty close to being reasonable looking SQL code. I have already have an implementation of a nested query for the GROUP_BY translation, but it seems like it might need a more general implementation.

  4. bramtayl commented on Dec 8, 2019

    @bramtayl
    bramtayl
    on Dec 8, 2019
    Collaborator
    More actions

    Ok, this works on master, so I'm closing it, but not a very satisfying solution. A more satisfying one would be a way to determine when SQL expressions need to be specifically marked as nested. I wonder how much would be lost if all SQL expressions were assumed to be nested? Can the SQLite optimizer optimize them away?

  5. bramtayl
    changed the title [-]Error in a query[/-] [+]Systematic way of dealing with nested queries[/+] on Dec 9, 2019
  6. davidanthoff
    removed
    bugSomething isn't workingSomething isn't working
    on Sep 2, 2026
  7. davidanthoff
    added the
    Bug
    issue type on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @bramtayl
    bramtayl

Labels

No labels
No labels

Type

Bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.