Skip to content

Conversation

@geoHeil
Copy link
Collaborator

@geoHeil geoHeil commented Nov 26, 2025

No description provided.

This was referenced Nov 26, 2025
Copy link
Collaborator Author

geoHeil commented Nov 26, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@geoHeil geoHeil marked this pull request as ready for review November 26, 2025 14:11
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 07a119d to 48c12f9 Compare November 26, 2025 14:13
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 0b0e3fb to 2c7c93a Compare November 26, 2025 14:13
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Coverage

Coverage Report (Python 3.13) •
FileStmtsMissCoverMissing
__init__.py20195%1, 3–5, 10–11, 23, 30, 36, 41, 47–48, 63, 66, 88, 108, 112–113, 116
_testing
   duckdb_json_compat_store.py322037%19, 27, 29–30, 32–33, 35, 37, 39, 44–45, 47–48, 61, 63–64, 66, 69, 75–76
   metaxy_project.py2502888%93, 129, 136, 199, 306, 308–314, 353, 419, 440, 475, 489, 521, 534, 733, 735–741, 747
metadata_store
   ibis_json_compat.py1268730%69–70, 74, 77, 128, 139, 146–147, 152–153, 158–159, 161, 182, 187, 190, 192, 199–206, 208, 216, 219, 221–222, 224–226, 228, 230, 233–235, 237, 240–243, 245–246, 248–249, 252–253, 263, 304–306, 308, 310–311, 313, 316–317, 319, 321–325, 328, 332, 337–338, 340, 343–344, 450, 454–455, 457–459, 462, 465, 467, 490–492, 497, 500, 503
   json_struct_serializer.py15814210%29–32, 35–36, 39, 44, 53, 57, 59, 61–62, 64, 66–70, 73–78, 82–83, 87–88, 93–94, 97–99, 101–103, 106–107, 109, 115, 117–119, 121–123, 130–131, 136–138, 146, 149, 152, 155–156, 162, 165, 168–169, 173–174, 177, 180–183, 186–187, 190–191, 194–196, 199–201, 204–205, 208–209, 214–215, 227–228, 232–233, 245–246, 251, 259, 261–262, 265, 268, 271–272, 274–275, 292–293, 311–312, 314, 317–319, 322–324, 328–329, 333, 337, 341, 345, 349, 352, 355–356, 365, 374–375, 378, 383–384, 387, 389, 393–394, 398, 403, 409, 413, 417–418, 422, 427, 434, 440, 443
   utils.py481764%1–4, 6, 9, 14, 21–22, 35–37, 39, 44, 49, 123, 125
TOTAL8982366359% 

Tests Skipped Failures Errors Time
1976 22 💤 0 ❌ 0 🔥 6m 33s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Coverage

Coverage Report (Python 3.12) •
FileStmtsMissCoverMissing
__init__.py20195%1, 3–5, 10–11, 23, 30, 36, 41, 47–48, 63, 66, 88, 108, 112–113, 116
_testing
   duckdb_json_compat_store.py322037%19, 27, 29–30, 32–33, 35, 37, 39, 44–45, 47–48, 61, 63–64, 66, 69, 75–76
   metaxy_project.py2502888%93, 129, 136, 199, 306, 308–314, 353, 419, 440, 475, 489, 521, 534, 733, 735–741, 747
metadata_store
   ibis_json_compat.py1268730%69–70, 74, 77, 128, 139, 146–147, 152–153, 158–159, 161, 182, 187, 190, 192, 199–206, 208, 216, 219, 221–222, 224–226, 228, 230, 233–235, 237, 240–243, 245–246, 248–249, 252–253, 263, 304–306, 308, 310–311, 313, 316–317, 319, 321–325, 328, 332, 337–338, 340, 343–344, 450, 454–455, 457–459, 462, 465, 467, 490–492, 497, 500, 503
   json_struct_serializer.py15814210%29–32, 35–36, 39, 44, 53, 57, 59, 61–62, 64, 66–70, 73–78, 82–83, 87–88, 93–94, 97–99, 101–103, 106–107, 109, 115, 117–119, 121–123, 130–131, 136–138, 146, 149, 152, 155–156, 162, 165, 168–169, 173–174, 177, 180–183, 186–187, 190–191, 194–196, 199–201, 204–205, 208–209, 214–215, 227–228, 232–233, 245–246, 251, 259, 261–262, 265, 268, 271–272, 274–275, 292–293, 311–312, 314, 317–319, 322–324, 328–329, 333, 337, 341, 345, 349, 352, 355–356, 365, 374–375, 378, 383–384, 387, 389, 393–394, 398, 403, 409, 413, 417–418, 422, 427, 434, 440, 443
   utils.py481764%1–4, 6, 9, 14, 21–22, 35–37, 39, 44, 49, 123, 125
TOTAL8982366359% 

Tests Skipped Failures Errors Time
1976 22 💤 0 ❌ 0 🔥 7m 20s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Test Results (Python 3.10)

1 976 tests  +7   1 954 ✅ +7   6m 6s ⏱️ -7s
    1 suites ±0      22 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit f61a4e3. ± Comparison against base commit 8554f08.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Coverage

Coverage Report (Python 3.10) •
FileStmtsMissCoverMissing
__init__.py20195%1, 3–5, 10–11, 23, 30, 36, 41, 47–48, 63, 66, 88, 108, 112–113, 116
_testing
   duckdb_json_compat_store.py322037%19, 27, 29–30, 32–33, 35, 37, 39, 44–45, 47–48, 61, 63–64, 66, 69, 75–76
   metaxy_project.py2502888%93, 129, 136, 199, 306, 308–314, 353, 419, 440, 475, 489, 521, 534, 733, 735–741, 747
metadata_store
   ibis_json_compat.py1268730%69–70, 74, 77, 128, 139, 146–147, 152–153, 158–159, 161, 182, 187, 190, 192, 199–206, 208, 216, 219, 221–222, 224–226, 228, 230, 233–235, 237, 240–243, 245–246, 248–249, 252–253, 263, 304–306, 308, 310–311, 313, 316–317, 319, 321–325, 328, 332, 337–338, 340, 343–344, 450, 454–455, 457–459, 462, 465, 467, 490–492, 497, 500, 503
   json_struct_serializer.py15814210%29–32, 35–36, 39, 44, 53, 57, 59, 61–62, 64, 66–70, 73–78, 82–83, 87–88, 93–94, 97–99, 101–103, 106–107, 109, 115, 117–119, 121–123, 130–131, 136–138, 146, 149, 152, 155–156, 162, 165, 168–169, 173–174, 177, 180–183, 186–187, 190–191, 194–196, 199–201, 204–205, 208–209, 214–215, 227–228, 232–233, 245–246, 251, 259, 261–262, 265, 268, 271–272, 274–275, 292–293, 311–312, 314, 317–319, 322–324, 328–329, 333, 337, 341, 345, 349, 352, 355–356, 365, 374–375, 378, 383–384, 387, 389, 393–394, 398, 403, 409, 413, 417–418, 422, 427, 434, 440, 443
   utils.py481764%1–4, 6, 9, 14, 21–22, 35–37, 39, 44, 49, 123, 125
TOTAL8982366359% 

Tests Skipped Failures Errors Time
1976 22 💤 0 ❌ 0 🔥 6m 6s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

Coverage

Coverage Report (Python 3.11) •
FileStmtsMissCoverMissing
__init__.py20195%1, 3–5, 10–11, 23, 30, 36, 41, 47–48, 63, 66, 88, 108, 112–113, 116
_testing
   duckdb_json_compat_store.py322037%19, 27, 29–30, 32–33, 35, 37, 39, 44–45, 47–48, 61, 63–64, 66, 69, 75–76
   metaxy_project.py2502888%93, 129, 136, 199, 306, 308–314, 353, 419, 440, 475, 489, 521, 534, 733, 735–741, 747
metadata_store
   ibis_json_compat.py1268730%69–70, 74, 77, 128, 139, 146–147, 152–153, 158–159, 161, 182, 187, 190, 192, 199–206, 208, 216, 219, 221–222, 224–226, 228, 230, 233–235, 237, 240–243, 245–246, 248–249, 252–253, 263, 304–306, 308, 310–311, 313, 316–317, 319, 321–325, 328, 332, 337–338, 340, 343–344, 450, 454–455, 457–459, 462, 465, 467, 490–492, 497, 500, 503
   json_struct_serializer.py15814210%29–32, 35–36, 39, 44, 53, 57, 59, 61–62, 64, 66–70, 73–78, 82–83, 87–88, 93–94, 97–99, 101–103, 106–107, 109, 115, 117–119, 121–123, 130–131, 136–138, 146, 149, 152, 155–156, 162, 165, 168–169, 173–174, 177, 180–183, 186–187, 190–191, 194–196, 199–201, 204–205, 208–209, 214–215, 227–228, 232–233, 245–246, 251, 259, 261–262, 265, 268, 271–272, 274–275, 292–293, 311–312, 314, 317–319, 322–324, 328–329, 333, 337, 341, 345, 349, 352, 355–356, 365, 374–375, 378, 383–384, 387, 389, 393–394, 398, 403, 409, 413, 417–418, 422, 427, 434, 440, 443
   utils.py481764%1–4, 6, 9, 14, 21–22, 35–37, 39, 44, 49, 123, 125
TOTAL8982366359% 

Tests Skipped Failures Errors Time
1976 22 💤 0 ❌ 0 🔥 7m 12s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces IbisJsonCompatStore, a new abstract base class for Ibis-based metadata stores that work with databases lacking native struct support (PostgreSQL, SQLite, MySQL). The implementation uses a dict-based versioning engine with JSON serialization at database boundaries, allowing struct-like behavior through flattened column naming conventions during computation and JSON storage in the database.

  • Adds abstract base class IbisJsonCompatStore that extends IbisMetadataStore
  • Implements JSON pack/unpack logic to serialize/deserialize struct-like columns
  • Forces use of IbisDictBasedVersioningEngine instead of standard IbisVersioningEngine

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/metaxy/metadata_store/ibis_json_compat.py New abstract base class implementing JSON-compatible metadata storage with pack/unpack methods for struct serialization
tests/metadata_stores/test_ibis_json_compat_store.py Comprehensive tests for JSON pack/unpack functionality including roundtrip tests and lazy execution verification
tests/metadata_stores/test_ibis_json_compat_store_simple.py Basic tests verifying abstract class behavior and dict-based engine configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 2c7c93a to 4adbeef Compare November 27, 2025 12:45
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch 2 times, most recently from 746e47f to 98df887 Compare November 27, 2025 12:54
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 4adbeef to 205f19a Compare November 27, 2025 12:54
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 6004717 to e2c7a2d Compare November 27, 2025 21:43
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 205f19a to 262d57c Compare November 27, 2025 21:43
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from e2c7a2d to dc79716 Compare November 28, 2025 07:02
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 262d57c to 480cefc Compare November 28, 2025 07:02
@geoHeil geoHeil requested a review from danielgafni November 28, 2025 07:21
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 480cefc to f11bf5c Compare November 28, 2025 09:44
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from dc79716 to 64f20ab Compare November 28, 2025 09:44
Copy link
Collaborator

@danielgafni danielgafni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in principle it makes sense.

My main problem with this PR is code quality, and the volume of LOC, it's just hard to review it this way.

Please do a pass and refactor bad code like hasattr checks or unnecessary error handling - even Opus 4.5 will help a lot here.

Consider splitting the PR to introduce the versioning engine and the store separately.

Now, the most important thing I would like to see is a sanity check: what if we implement DuckDB store with this new json code path?

It should work in the same way as the existing store.

It would be a very easy and convincing way to verify the correctness of this huge PR.

Let's add this test. This json-compatible DuckDB class can stay in _testing. It would be much better than mocked tests (I never trust them).

@geoHeil
Copy link
Collaborator Author

geoHeil commented Nov 28, 2025

we should have a duckdb json test actually in the massive PG PR

@danielgafni
Copy link
Collaborator

we should have a duckdb json test actually in the massive PG PR

Well, it should be moved here, tests should not be in some other PRs

@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 8796207 to 7157233 Compare December 8, 2025 20:07
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 085acc1 to 1d547c5 Compare December 8, 2025 20:07
Copy link
Collaborator

@danielgafni danielgafni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are very much not convincing. These are typical AI tests, very lengthy and test almost nothing, mostly small scope unit tests and mocks.

I was able to count one write_metadata_to_store and zero write_metadata in these tests.

A very easy thing to do is to add DuckDBJsonCompatStore to AllStoreCases. It would run it through our entire test suite.

@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 1d547c5 to 59cdb76 Compare December 9, 2025 15:18
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 7157233 to 3ae374b Compare December 9, 2025 15:18
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 59cdb76 to 8c30870 Compare December 9, 2025 16:04
@geoHeil
Copy link
Collaborator Author

geoHeil commented Dec 9, 2025

The tests are very much not convincing. These are typical AI tests, very lengthy and test almost nothing, mostly small scope unit tests and mocks.

I was able to count one write_metadata_to_store and zero write_metadata in these tests.

A very easy thing to do is to add DuckDBJsonCompatStore to AllStoreCases. It would run it through our entire test suite.

I added this.

@geoHeil geoHeil requested a review from danielgafni December 9, 2025 16:20
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 8c30870 to c56c640 Compare December 10, 2025 07:13
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch 2 times, most recently from cd2d4ce to 059f902 Compare December 10, 2025 13:11
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from c56c640 to 0f88924 Compare December 10, 2025 13:11
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 059f902 to f2ba890 Compare December 10, 2025 13:12
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 0f88924 to 44a7af8 Compare December 10, 2025 13:12
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from f2ba890 to 2bd72e4 Compare December 10, 2025 13:14
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 44a7af8 to d938075 Compare December 10, 2025 13:14
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 2bd72e4 to c8de19a Compare December 10, 2025 13:33
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from d938075 to aa30ba6 Compare December 10, 2025 13:33
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from c8de19a to fc1ad5e Compare December 17, 2025 10:05
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from aa30ba6 to 7585151 Compare December 17, 2025 10:05
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from fc1ad5e to 79f6e97 Compare December 19, 2025 08:27
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch 2 times, most recently from 55b3282 to 0478363 Compare December 19, 2025 09:02
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 79f6e97 to 316a4cd Compare December 19, 2025 09:02
geoHeil and others added 4 commits December 23, 2025 07:39
Provides mixin with _pack_json_columns and _unpack_json_columns methods
for handling JSON serialization of struct columns in Ibis stores.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add system table checks in IbisJsonCompatStore read/write methods
- Improve sanitize_uri to preserve usernames while masking passwords
- Add query parameter sanitization (password, pwd, pass)
- Add comprehensive tests for URI sanitization

These improvements apply to all Ibis JSON-compatible stores.
The sanitize_uri function now preserves usernames while masking only passwords.
Update test expectations to match this behavior.
@geoHeil geoHeil force-pushed the 11-26-dict-based_versioning_engine branch from 316a4cd to 8554f08 Compare December 23, 2025 06:40
@geoHeil geoHeil force-pushed the 11-26-ibisjsoncompatstore branch from 0478363 to f61a4e3 Compare December 23, 2025 06:40
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.

3 participants