-
Notifications
You must be signed in to change notification settings - Fork 126
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
Sketches Schema UI view #1015
Sketches Schema UI view #1015
Conversation
To complete this:
|
This is hacky UI code. It does not handle "run ids". 1. Adds to pandas & pyspark schema capture using `h_schema.py`. 2. Adds SchemaView and related types to try to show a table... So it's either we've set something up with too many things, or this is just a factor of using typescript... Basically I dont like how many things I had to add to do this.. Otherwise it's non-obvious to me what the pattern should be to handle comparing runs -- this UI change for the schema table doesn't take that into account -- it should probably use Generic Table but I couldn't wrap my head around it. Otherwise open question whether we reuse the h_schema pyarrow stuff, or just roll our own again...
This will make it look like the others, make it expandable, etc...
d34c9dc
to
ecc9337
Compare
This allows us to hide attributes now that we have multiple
We now have three categories: 1. Result summaries -- we can output one and if not it will be unsupported in the UI 2. Schema -- we can output one or none 3. Additional -- as many as we want We use a single dispatch function for each, and it makes the code a lot cleaner. We no longer put stuff in lists unless its an additional result. Note they can also supply their own name, if not, we will generate a unique attribute name. In the long term we'll likely want to stop using single dispatch as we need to register multiple with roles (and single dispatch requires one function per role). For now this is clean enough and easy to work with, however.
// dataTypeDisplay={(item: string) => { | ||
// return ( | ||
// <RunLink | ||
// projectId={props.projectId} | ||
// runId={parseInt(item) as number} | ||
// setHighlightedRun={() => void 0} | ||
// highlightedRun={null} | ||
// ></RunLink> | ||
// ); | ||
// }} |
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.
commented out?
{ | ||
"observability_type": "primitive", | ||
"observability_value": { | ||
"type": str(str), | ||
"value": o_value["cost_explain"], | ||
}, | ||
"observability_schema_version": "0.0.1", | ||
"name": "Cost Explain", | ||
}, | ||
{ | ||
"observability_type": "primitive", | ||
"observability_value": { | ||
"type": str(str), | ||
"value": o_value["extended_explain"], | ||
}, | ||
"observability_schema_version": "0.0.1", | ||
"name": "Extended Explain", |
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.
I don't see these added to additional...
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 I just stuck in the o_value there cause I figured it was easier. Doesn't allow us to compare, though, so it might be nice to have. Will add it to additional
1c142f9
to
32b1ef1
Compare
This just treats all primitives as strings, which can show the view. This works with strings and will actually just look fine otherwise. It uses the ReactDiffViewer component which is simple, and we use elsewhere in the app. We can probably tune this a bit (the interaction is a little jumpy), but for now this is OK.
We had captured all of them. Now we capture individual data as well, which allows for easy comparison. It's duplicated, so we use an lru_tools cache (which should cache based on the pyspark dataframe ID)
71ed230
to
161b028
Compare
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.
This has been fixed up + approved
{ | ||
"observability_type": "primitive", | ||
"observability_value": { | ||
"type": str(str), | ||
"value": o_value["cost_explain"], | ||
}, | ||
"observability_schema_version": "0.0.1", | ||
"name": "Cost Explain", | ||
}, | ||
{ | ||
"observability_type": "primitive", | ||
"observability_value": { | ||
"type": str(str), | ||
"value": o_value["extended_explain"], | ||
}, | ||
"observability_schema_version": "0.0.1", | ||
"name": "Extended Explain", |
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 I just stuck in the o_value there cause I figured it was easier. Doesn't allow us to compare, though, so it might be nice to have. Will add it to additional
Original description follows. This has been fixed up to work correctly.
This is hacky UI code. It does not handle "run ids".
h_schema.py
.So it's either we've set something up with too many things, or this is just a factor of using typescript... Basically I dont like how many things I had to add to do this..
Otherwise it's non-obvious to me what the pattern should be to handle comparing runs -- this UI change for the schema table doesn't take that into account -- it should probably use Generic Table but I couldn't wrap my head around it.
Changes
How I tested this
Notes
h_schema
since I kind of already have some of this... we should align on what the "schema" view actually takes in too.Checklist