Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Declarative Graphing + JSON/DataFrames #482
Declarative Graphing + JSON/DataFrames #482
Changes from 2 commits
ee87c06
228bad6
2336b20
e84ce08
95cf9a5
4bc91e3
fb72596
b4a2a06
c51cb06
de59579
7b2c2ba
50693ae
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
value
doesn't depend onkey
this is really a homogeneous data frame instead, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point... it's heterogeneous because of the variant type for value. I guess ideally this would be a table where columns are of different types? I will have to think more if that is possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh it's heterogeneous because you store all values as JSON! When we initially thought of data frames, we usually considered them as tables-of-records (
n=>{field1: Float & field2 : Int}
). A nice benefit of that is that those do have an efficient lowering, unlike this huge variant. But it would make it much harder to store thecolumn=>meta
association, because thecolumn
index set really indexes the fields of the record 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah records are definitely the right solution to this. But I couldn't really figure out how to cleanly enumerate over fields.
Although maybe I just need like a variant over Iso's instead of values. I guess the Meta could could do that work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually @danieldjohnson , maybe the cute solution is to have col metadata Iso Variant indexed and the columns in a Iso record. The metadata needs to provide a function to extract it's column (say into json)
Downside: The user would have to manually link them. Same names?
Upside: homogenous data columns, variant named columns (not ordering based), column enumeration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried a slightly different strategy. I think maybe flat dataframes are a hack and kind of unneeded in dex. To make graphing work, you can just construct the flat data representation along with the graph description. This can come from a record or from any other source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, I like the most recent version!
I think that manipulating records will be much, much easier once we can enumerate over fields in userspace. So hopefully the "manually linking" downsides will no longer be a problem at that point.