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

ENH: Condense output of symbolic operations. #531

Open
1 of 3 tasks
czaloom opened this issue Apr 11, 2024 · 0 comments
Open
1 of 3 tasks

ENH: Condense output of symbolic operations. #531

czaloom opened this issue Apr 11, 2024 · 0 comments
Assignees

Comments

@czaloom
Copy link
Collaborator

czaloom commented Apr 11, 2024

Feature Type

  • Adding new functionality to valor

  • Changing existing functionality in valor

  • Removing existing functionality in valor

Problem Description

Dumping a symbolic operation (e.g. Label.key.in_(["k1", "k2", ..., kn"])) to a dictionary results in a very repetitive output as each case is enumerated as an equality.

Feature Description

Separate the symbol in a function from the valued arguments in cases where enumeration can occur.

The in_ operator is a good candidate for this.

The desired output would look something like the following:

{
  "op": "or",
  "args": [
    {
      "op": "eq",
      "symbol": {
        "type": "symbol",
        "value": {
          "owner": "dataset",
          "name": "name",
          "key": null,
          "attribute": null
        }
      },
      "values": [
        {
          "type": "string",
          "value": "dataset1"
        },{
          "type": "string",
          "value": "dataset2"
        },{
          "type": "string",
          "value": "dataset3"
        }
      ]
    }
  ]
}

Additional Context

No response

@czaloom czaloom self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant