Skip to content

Conversation

@blythed
Copy link
Collaborator

@blythed blythed commented Jun 7, 2025

Description

Related Issues

Checklist

  • Is this code covered by new or existing unit tests or integration tests?
  • Did you run make unit_testing and make integration-testing successfully?
  • Do new classes, functions, methods and parameters all have docstrings?
  • Were existing docstrings updated, if necessary?
  • Was external documentation updated, if necessary?

Additional Notes or Comments

@blythed blythed requested a review from jieguangzhou June 7, 2025 11:18
@blythed blythed linked an issue Jun 7, 2025 that may be closed by this pull request
2 tasks
@blythed blythed force-pushed the task/2857/json-native-better-solution branch from a7dd549 to bbd669f Compare June 7, 2025 12:07
Comment on lines +30 to +34
json_native: bool = False

batched: bool = False
id_field: str = 'id'
vector_impl: t.Type = NativeVector
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using a set of datatype implementations like this? That way, we can optimize the logic and make it easier to extend.

datatypes_impl = {"vector": NativeVector, "json": "JsonXXX"}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes good idea.

Copy link
Collaborator Author

@blythed blythed Jun 10, 2025

Choose a reason for hiding this comment

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

On second thoughts, the situation of json_native is slightly different. This is to do with splitting up the logic of encoding between superduper and databackend. JSON and vectors are special, because they are handled in specific ways by the databackend.

@blythed blythed force-pushed the task/2857/json-native-better-solution branch from bbd669f to e59e26d Compare June 10, 2025 09:35
@blythed blythed force-pushed the task/2857/json-native-better-solution branch 6 times, most recently from fd6fe57 to 8c773b8 Compare June 10, 2025 10:25
@blythed blythed force-pushed the task/2857/json-native-better-solution branch from 8c773b8 to 4717460 Compare June 10, 2025 10:32
@blythed blythed merged commit 2a342d5 into superduper-io:main Jun 10, 2025
8 checks passed
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.

json_native better solution and datatype_presets

2 participants