diff --git a/filesink/filesink.go b/filesink/filesink.go index 44ebadc80a..fce726c4c1 100644 --- a/filesink/filesink.go +++ b/filesink/filesink.go @@ -356,7 +356,7 @@ func StdConstraints(p *pf.Projection) *pm.Response_Validated_Constraint { constraint.Reason = "The operation type should usually be materialized" case strings.HasPrefix(p.Field, "_meta/"): constraint.Type = pm.Response_Validated_Constraint_FIELD_OPTIONAL - constraint.Reason = "Metadata fields fields are able to be materialized" + constraint.Reason = "Metadata fields are able to be materialized" case p.Inference.IsSingleType() && slices.Contains(p.Inference.Types, "array") || isNumeric || p.Inference.IsSingleScalarType(): diff --git a/materialize-bigquery/.snapshots/TestValidateAndApply b/materialize-bigquery/.snapshots/TestValidateAndApply index 0db1959612..094a653bf2 100644 --- a/materialize-bigquery/.snapshots/TestValidateAndApply +++ b/materialize-bigquery/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringUuidField","Nullable":"YES","Type":"STRING"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-bigquery/.snapshots/TestValidateAndApplyMigrations b/materialize-bigquery/.snapshots/TestValidateAndApplyMigrations index a746e3c688..52064db5ac 100644 --- a/materialize-bigquery/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-bigquery/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-databricks/.snapshots/TestValidateAndApply b/materialize-databricks/.snapshots/TestValidateAndApply index f540840a9c..b990d4fb45 100644 --- a/materialize-databricks/.snapshots/TestValidateAndApply +++ b/materialize-databricks/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringUuidField","Nullable":"YES","Type":"STRING"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-databricks/.snapshots/TestValidateAndApplyMigrations b/materialize-databricks/.snapshots/TestValidateAndApplyMigrations index 24005ddfd3..a205057fc6 100644 --- a/materialize-databricks/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-databricks/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-elasticsearch/.snapshots/TestValidateAndApply b/materialize-elasticsearch/.snapshots/TestValidateAndApply index 9b573b4a0e..b877c86d37 100644 --- a/materialize-elasticsearch/.snapshots/TestValidateAndApply +++ b/materialize-elasticsearch/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":5,"TypeString":"FIELD_FORBIDDEN","Reason":"Cannot materialize this field"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document is required for a standard updates materialization"} @@ -188,7 +188,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Field":"stringUuidField","Type":"text"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document is required for a standard updates materialization"} diff --git a/materialize-elasticsearch/type_mapping.go b/materialize-elasticsearch/type_mapping.go index 18091f2058..3114de8f5e 100644 --- a/materialize-elasticsearch/type_mapping.go +++ b/materialize-elasticsearch/type_mapping.go @@ -160,7 +160,7 @@ func (constrainter) NewConstraints(p *pf.Projection, deltaUpdates bool) *pm.Resp constraint.Reason = "The operation type should usually be materialized" case strings.HasPrefix(p.Field, "_meta/"): constraint.Type = pm.Response_Validated_Constraint_FIELD_OPTIONAL - constraint.Reason = "Metadata fields fields are able to be materialized" + constraint.Reason = "Metadata fields are able to be materialized" case p.Inference.IsSingleScalarType() || isNumeric: constraint.Type = pm.Response_Validated_Constraint_LOCATION_RECOMMENDED constraint.Reason = "The projection has a single scalar type" diff --git a/materialize-motherduck/.snapshots/TestValidateAndApply b/materialize-motherduck/.snapshots/TestValidateAndApply index ff5701061f..f23d70b048 100644 --- a/materialize-motherduck/.snapshots/TestValidateAndApply +++ b/materialize-motherduck/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The root document should usually be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringUuidField","Nullable":"YES","Type":"UUID"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The root document should usually be materialized"} diff --git a/materialize-motherduck/.snapshots/TestValidateAndApplyMigrations b/materialize-motherduck/.snapshots/TestValidateAndApplyMigrations index 855af0fc1d..dbc8caedf3 100644 --- a/materialize-motherduck/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-motherduck/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The root document should usually be materialized"} diff --git a/materialize-mysql/.snapshots/TestValidateAndApply b/materialize-mysql/.snapshots/TestValidateAndApply index e34c8947dc..5a8be21202 100644 --- a/materialize-mysql/.snapshots/TestValidateAndApply +++ b/materialize-mysql/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringUuidField","Nullable":"YES","Type":"longtext"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-mysql/.snapshots/TestValidateAndApplyMigrations b/materialize-mysql/.snapshots/TestValidateAndApplyMigrations index 79feb73112..8544648be8 100644 --- a/materialize-mysql/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-mysql/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-mysql/.snapshots/TestValidateAndApplyMigrationsMariaDB b/materialize-mysql/.snapshots/TestValidateAndApplyMigrationsMariaDB index b3c8a1f4a5..fba5a92d94 100644 --- a/materialize-mysql/.snapshots/TestValidateAndApplyMigrationsMariaDB +++ b/materialize-mysql/.snapshots/TestValidateAndApplyMigrationsMariaDB @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-postgres/.snapshots/TestValidateAndApply b/materialize-postgres/.snapshots/TestValidateAndApply index 6d3a000500..1eda591c41 100644 --- a/materialize-postgres/.snapshots/TestValidateAndApply +++ b/materialize-postgres/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringUuidField","Nullable":"YES","Type":"uuid"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-postgres/.snapshots/TestValidateAndApplyMigrations b/materialize-postgres/.snapshots/TestValidateAndApplyMigrations index 09065f1acc..b0aa5b368d 100644 --- a/materialize-postgres/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-postgres/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-redshift/.snapshots/TestValidateAndApply b/materialize-redshift/.snapshots/TestValidateAndApply index e1c52ddde7..6809a08b23 100644 --- a/materialize-redshift/.snapshots/TestValidateAndApply +++ b/materialize-redshift/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringuuidfield","Nullable":"YES","Type":"character varying"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-redshift/.snapshots/TestValidateAndApplyMigrations b/materialize-redshift/.snapshots/TestValidateAndApplyMigrations index c297651352..69b75f4876 100644 --- a/materialize-redshift/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-redshift/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-s3-iceberg/.snapshots/TestValidateAndApply b/materialize-s3-iceberg/.snapshots/TestValidateAndApply index df6c99c22c..8505823c1d 100644 --- a/materialize-s3-iceberg/.snapshots/TestValidateAndApply +++ b/materialize-s3-iceberg/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The root document should usually be materialized"} diff --git a/materialize-s3-iceberg/type_mapping.go b/materialize-s3-iceberg/type_mapping.go index 84e3338a6b..b25b2c9ef2 100644 --- a/materialize-s3-iceberg/type_mapping.go +++ b/materialize-s3-iceberg/type_mapping.go @@ -124,7 +124,7 @@ func (icebergConstrainter) NewConstraints(p *pf.Projection, deltaUpdates bool) * constraint.Reason = "The operation type should usually be materialized" case strings.HasPrefix(p.Field, "_meta/"): constraint.Type = pm.Response_Validated_Constraint_FIELD_OPTIONAL - constraint.Reason = "Metadata fields fields are able to be materialized" + constraint.Reason = "Metadata fields are able to be materialized" case p.Inference.IsSingleScalarType() || isNumeric: constraint.Type = pm.Response_Validated_Constraint_LOCATION_RECOMMENDED constraint.Reason = "The projection has a single scalar type" diff --git a/materialize-snowflake/.snapshots/TestValidateAndApply b/materialize-snowflake/.snapshots/TestValidateAndApply index 06d07f1ad5..229c7f0d0e 100644 --- a/materialize-snowflake/.snapshots/TestValidateAndApply +++ b/materialize-snowflake/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"_meta/flow_truncated","Nullable":"NO","Type":"BOOLEAN"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-snowflake/.snapshots/TestValidateAndApplyMigrations b/materialize-snowflake/.snapshots/TestValidateAndApplyMigrations index a5160ff81b..600ed0b259 100644 --- a/materialize-snowflake/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-snowflake/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-sql/type_mapping.go b/materialize-sql/type_mapping.go index cf6462c2d7..daa70658dc 100644 --- a/materialize-sql/type_mapping.go +++ b/materialize-sql/type_mapping.go @@ -433,7 +433,7 @@ func (constrainter) NewConstraints(p *pf.Projection, deltaUpdates bool) *pm.Resp constraint.Reason = "The operation type should usually be materialized" case strings.HasPrefix(p.Field, "_meta/"): constraint.Type = pm.Response_Validated_Constraint_FIELD_OPTIONAL - constraint.Reason = "Metadata fields fields are able to be materialized" + constraint.Reason = "Metadata fields are able to be materialized" case p.Inference.IsSingleScalarType() || isNumeric: constraint.Type = pm.Response_Validated_Constraint_LOCATION_RECOMMENDED constraint.Reason = "The projection has a single scalar type" diff --git a/materialize-sqlserver/.snapshots/TestValidateAndApply b/materialize-sqlserver/.snapshots/TestValidateAndApply index 7d87399e4e..88d758bb0d 100644 --- a/materialize-sqlserver/.snapshots/TestValidateAndApply +++ b/materialize-sqlserver/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringUuidField","Nullable":"YES","Type":"varchar"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-sqlserver/.snapshots/TestValidateAndApplyMigrations b/materialize-sqlserver/.snapshots/TestValidateAndApplyMigrations index adce1d3311..2c87a498f7 100644 --- a/materialize-sqlserver/.snapshots/TestValidateAndApplyMigrations +++ b/materialize-sqlserver/.snapshots/TestValidateAndApplyMigrations @@ -1,5 +1,5 @@ Base Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"dateValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"datetimeValue","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} diff --git a/materialize-starburst/.snapshots/TestValidateAndApply b/materialize-starburst/.snapshots/TestValidateAndApply index 739ca453a3..bddbcb3d10 100644 --- a/materialize-starburst/.snapshots/TestValidateAndApply +++ b/materialize-starburst/.snapshots/TestValidateAndApply @@ -1,5 +1,5 @@ Big Schema Initial Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"This field is able to be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"} @@ -192,7 +192,7 @@ Big Schema Materialized Resource Schema With No Fields Required: {"Name":"stringuuidfield","Nullable":"YES","Type":"varchar"} Big Schema Changed Types With Table Replacement Constraints: -{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields fields are able to be materialized"} +{"Field":"_meta/flow_truncated","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Metadata fields are able to be materialized"} {"Field":"arrayField","Type":4,"TypeString":"FIELD_OPTIONAL","Reason":"Object fields may be materialized"} {"Field":"boolField","Type":3,"TypeString":"LOCATION_RECOMMENDED","Reason":"The projection has a single scalar type"} {"Field":"flow_document","Type":2,"TypeString":"LOCATION_REQUIRED","Reason":"The root document must be materialized"}