Skip to content
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

allow subfield access #153

Closed
wants to merge 2 commits into from
Closed

Conversation

bmschmidt
Copy link
Collaborator

@bmschmidt bmschmidt commented Oct 1, 2024

This makes it possible for deepscatter to access not just single-depth fields, but also structs that can get probed into.

Struct<x: Float32, y: Float32>

This is useful because often a single transformation should create two or more columns.


Important

Enhance Deepscatter to support subfield access in struct columns, enabling complex data transformations and rendering.

  • Behavior:
    • Allow access to subfields in struct columns, enabling transformations to create multiple columns.
    • Update get_column in Tile to handle subfields.
  • Aesthetics:
    • Add subfield handling in Aesthetic and StatefulAesthetic classes.
    • Update columnKeys to include subfields.
  • Rendering:
    • Modify ReglRenderer to support subfield access in buffer management.
    • Update neededFieldsToPlot to handle subfields.
  • Data Management:
    • Enhance Deeptable to support subfield transformations.
    • Update apply_transformation in Tile to handle subfields.
  • Utility:
    • Introduce TupleMap and TupleSet for managing nested keys.

This description was created by Ellipsis for a3d1a8a. It will automatically update as commits are pushed.

Copy link
Collaborator Author

bmschmidt commented Oct 1, 2024

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.

Join @bmschmidt and the rest of your teammates on Graphite Graphite

@bmschmidt bmschmidt marked this pull request as ready for review October 1, 2024 01:02
@bmschmidt bmschmidt closed this Oct 1, 2024
@@ -76,9 +78,25 @@ export abstract class Aesthetic<
this.field = null;
Copy link

Choose a reason for hiding this comment

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

The logic for setting the subfield property is repeated in multiple places. Consider extracting this logic into a separate function to adhere to the DRY principle. This issue is also present in other files where similar logic is used.

const existing = this._batch?.getChild(colname);
if (existing) {
return existing;
async get_column(
Copy link

Choose a reason for hiding this comment

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

The get_column method is doing more than one thing: fetching the column and applying transformations if needed. Consider separating these responsibilities into distinct methods to adhere to the Single Responsibility Principle.

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.

1 participant