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

Column names #68

Merged
merged 4 commits into from
Jun 5, 2017
Merged

Column names #68

merged 4 commits into from
Jun 5, 2017

Conversation

mwhittaker
Copy link
Collaborator

screenshot from 2017-04-13 22 57 45

Added column names to Fluent. Now, creating a fluent program looks like this.

auto f = fluent<NoopClient>("name", "tcp://0.0.0.0:8000", &context, conn)
  .table<int, char, float>("t1", {{"x", "y", "z"}})
  .table<float, int>("t2" {{"x", "y"}})
  .scratch<int, int, float>("s", {{"x", "y"}})
  .channel<std::string, float, char>("c", {{"addr", "x", "y"}})
  .RegisterBootstrapRules([&](auto& t1, auto& t2, auto& s, auto& c) {
    return std::make_tuple(t1 <= ra::make_iterable("ts", &ts));
  })
  .RegisterRules([](auto& t1, auto& t2, auto& s, auto& c) {
    return std::make_tuple(t2 <= t1.iterable | ra::project<2, 0>());
  });

Column names are put in the lineage database and are used by the frontend. If you provide an incorrect number of channel names, the code won't compile. That's nice :)

@mwhittaker mwhittaker requested a review from cw75 April 14, 2017 06:01
@cw75
Copy link
Contributor

cw75 commented Apr 14, 2017

Currently, is the column name only for querying lineage? Can we also do things like "ra::project<"z", "x">"?

@mwhittaker
Copy link
Collaborator Author

Only lineage.

@mwhittaker mwhittaker mentioned this pull request Apr 14, 2017
@mwhittaker mwhittaker changed the base branch from misc_tidying to master June 5, 2017 00:36
@mwhittaker mwhittaker merged commit a3bf51f into master Jun 5, 2017
@mwhittaker mwhittaker deleted the column_names branch June 5, 2017 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants