Struct attrributes#268
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
==========================================
- Coverage 87.81% 87.56% -0.25%
==========================================
Files 57 57
Lines 4998 5155 +157
Branches 877 908 +31
==========================================
+ Hits 4389 4514 +125
- Misses 384 409 +25
- Partials 225 232 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Maybe I should save the data field-wise in SQLGraph. Let me experiment in this way. |
|
@yfukai, let me know when this is ready for review. |
|
Thanks, it might take a while, but I'll continue working on this. |
|
@JoOkuma I believe this is good to go! Sorry for the large PR. |
|
@yfukai, I need more time to take a look at your PRs. I'll try to get them done before the end of the week. |
|
Added additional comments! It would be great if you could review this, since this changes the database structure for a "struct"-type attributes @JoOkuma |
| if isinstance(out, Attr): | ||
| out._append_field_path(name) |
There was a problem hiding this comment.
Won't this if always be true according to the return value?
There was a problem hiding this comment.
Yeah I think it's guaranteed to be Attr before this block. Thanks!
| Separator. Defaults to ``STRUCT_FIELD_SEP``. | ||
| """ | ||
| result: dict = {} | ||
| value = value or {} |
There was a problem hiding this comment.
Are both value = value or {} and field_val or {} necessary? They seem a bit redundant
There was a problem hiding this comment.
I'm sorry for overlooking this. That's true! I fied this.
|
Sure, thanks @JoOkuma! Let me also try to reduce the complexity. |
The previous commit (db35287) mistakenly deleted upstream/main's _SQLIDSet scratch-table machinery, _create_id_scratch_table, the out_degree/copy bound-variable handling, and the three scratch-table tests — they were diffed against a stale fork main and wrongly treated as PR-added code. Restore them verbatim from main; the struct-attr column-expansion simplification from the previous commit is kept.
Partially solves #194 by allowing
pl.Structsaved and searched in graphs.Assumes #262 merged.