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

feat: support FunctionOption #400

Closed
wjones127 opened this issue Oct 28, 2022 · 1 comment
Closed

feat: support FunctionOption #400

wjones127 opened this issue Oct 28, 2022 · 1 comment

Comments

@wjones127
Copy link
Contributor

substrait-io/substrait#342 will introduce a change in how functions are represented, moving the enum arguments (like "overflow") into the "options" field.

Currently, we produce something like:

{
    "scalarFunction": {
      "functionReference": 2,
      "outputType": {
        "fp64": {
          "nullability": "NULLABILITY_NULLABLE"
        }
      },
      "arguments": [
        {
          "enum": {
            "specified": "ERROR"
          }
        },
        {
          "value": {
            "selection": {
              "directReference": {
                "structField": {}
              },
              "rootReference": {}
            }
          }
        },
        {
          "value": {
            "literal": {
              "i8": 2
            }
          }
        }
      ]
    }
}

And we will need to produce:

{
    "scalarFunction": {
      "functionReference": 2,
      "outputType": {
        "fp64": {
          "nullability": "NULLABILITY_NULLABLE"
        }
      },
      "options": [
        {
          "name": "overflow",
          "preference": "ERROR"
        }
      ],
      "arguments": [
        {
          "value": {
            "selection": {
              "directReference": {
                "structField": {}
              },
              "rootReference": {}
            }
          }
        },
        {
          "value": {
            "literal": {
              "i8": 2
            }
          }
        }
      ]
    }
}
@gforsyth
Copy link
Member

I made this change but I've lost track of which commit it was. But it's done!

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

No branches or pull requests

2 participants