Skip to content

state of joins in mid-aug #67

@chrismo

Description

@chrismo

Capturing from a slack discussion with Phil

-- this isn't working yet 
select *
from a.json join b.json
  on left.id=right.id

I can achieve the same result with code similar to the test examples in the super repo -- something like:
super -c "from (b.json) join on ... " a.json

Given

$ cat a.json 
{"id": 1, "word": "foo"}
{"id": 2, "word": "bar"}

$ cat b.json 
{"id": 1, "word": "hello"}
{"id": 2, "word": "world"}

This works (hat tip to Phil)!

$ super -c "
SELECT a.id, a.word, b.word AS rword
FROM a.json
JOIN b.json
ON a.id=b.id;"
{id:1,word:"foo",rword:"hello"}
{id:2,word:"bar",rword:"world"}

There's just a known issue with select * that's the only thing not working - brimdata/super#5977

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions