Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP sql ast #518

Closed
wants to merge 10 commits into from
Closed

WIP sql ast #518

wants to merge 10 commits into from

Conversation

domoritz
Copy link
Member

Fixes #377

WIP until raco side is implemented

@domoritz domoritz changed the title [WIP] Domoritz sql ast sql ast May 15, 2014
@domoritz
Copy link
Member Author

Not really what I was hoping to do do today but certainly useful. Ready for review.

@7andrew7 This changed the interface for table scans and allows you to push work down into the database. Hence, raco has to be adapted. We can have a chat about the format. At the moment, I expect DbQueryScan operators to be like:

{
  "query": {
    "selectExpressions": [{
      "rootExpressionOperator": {
        "type": "COLUMN",
        "columnIdx": 0,
        "relationKey": {
          "userName": "public",
          "relationName": "TwitterK",
          "programName": "adhoc"
        }
      },
      "outputName": "x"
    }]
  },
  "opId": "V1",
  "opType": "DbQueryScan",
  "opName": "MyriaScan(public:adhoc:TwitterK)"
}

There is also support for where clauses and order by. See the code for a reference.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.46%) when pulling 878308b on domoritz-sql-ast into 1ac65d4 on master.

@dhalperi
Copy link
Member

No sense merging these changes until the raco changes are completed, right? No guarantee this is the right java-side encoding until both work together...

@domoritz
Copy link
Member Author

I agree.

@7andrew7
Copy link
Contributor

I'll take a crack at raco side, but it probably won't be this week.

@dhalperi dhalperi changed the title sql ast WIP sql ast May 21, 2014
@domoritz
Copy link
Member Author

One thing that is missing and should probably be added is aggregation. My plan is to add another expression operator and automatically generate the group by clause. Will tackle this some time next week. It should not affect the JSON api, though.

@dhalperi
Copy link
Member

Another way to go about this, btw, would be to try and actually use the
given query fragment to generate a DbQueryScan. Just a (wacky) thought.


Daniel Halperin
Director of Research for Scalable Analytics
eScience Institute
University of Washington

On Fri, May 23, 2014 at 12:19 AM, Dominik Moritz
notifications@github.comwrote:

One thing that is missing and should probably be added is aggregation. My
plan is to add another expression operator and automatically generate the
group by clause. Will tackle this some time next week. It should not affect
the JSON api, though.


Reply to this email directly or view it on GitHubhttps://github.com//pull/518#issuecomment-43978290
.

@domoritz
Copy link
Member Author

Another way to go about this, btw, would be to try and actually use the
given query fragment to generate a DbQueryScan. Just a (wacky) thought.

I don't get it. Do you mean not using any of the code that I've written and just take the query plan and generate a query from that? Sounds possible but won't get us very far since pg and myria have non overlapping features.

@dhalperi
Copy link
Member

Closed via discussion today. Possibly reexplore when @domoritz is back.

@dhalperi dhalperi closed this Jul 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

framework to push work into database (expression tree -> SQL)
4 participants