Skip to content

Validate Mutation Type matches Table Type #1608

@mbroecheler

Description

@mbroecheler

Currently, the GraphQLValidation does not check if the row type of the CREATE TABLE for a mutation matches the GraphQL Input type, resulting in runtime errors.

CREATE TABLE DeploymentMetrics (
    `deploymentId` STRING,
    `service` STRING, -- the service (e.g. flink, postgres, vertx)
    `component` STRING, -- component within a service (i.e. task-/job manager)
    `taskName` STRING, -- from labels['task_name'] in Flink, or labels['query'] in Vertx
    `name` STRING, -- name of the metric
    `metric` DOUBLE, -- the value of simple metrics or max for histograms
    `bucketValues` ARRAY<DOUBLE NOT NULL>, -- values for histogram buckets (latencies)
    `timestamp` TIMESTAMP_LTZ(3) NOT NULL,
     WATERMARK FOR `timestamp` AS `timestamp` - INTERVAL '0.001' SECOND
);

will compile with Input type:

input DeploymentMetricsInput {
  deploymentId: String
  service: String
  instanceId: String
  task_name: String
  name: String
  metric: Float
  bucketValues: [Float]
  timestamp: DateTime
  uid: String
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions