{"record":{"id":"7428997f6e72936e","repo":"hasura/graphql-engine","slug":"the-type-of-the-comparable-field-field-name-on","errorCode":null,"errorMessage":"the type of the comparable field '{field_name}' on the boolean expresssion '{boolean_expression_type_name}' is a multidimensional array type: {field_type}. Multidimensional arrays are not supported in boolean expressions","messagePattern":"the type of the comparable field '(.+?)' on the boolean expresssion '(.+?)' is a multidimensional array type: (.+?)\\. Multidimensional arrays are not supported in boolean expressions","errorType":"validation","errorClass":"BooleanExpressionIssue::MultidimensionalArrayComparableFieldNotSupported","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/boolean_expressions/types.rs","lineNumber":67,"sourceCode":"        name: FieldName,\n    },\n    #[error(\n        \"the comparable relationship '{name}' is defined more than once in the boolean expression type '{type_name}'\"\n    )]\n    DuplicateComparableRelationshipFound {\n        type_name: Qualified<CustomTypeName>,\n        name: RelationshipName,\n    },\n    #[error(\n        \"the boolean expression '{type_name}' has a GraphQL field name conflict between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed.\"\n    )]\n    GraphqlFieldNameConflict {\n        type_name: Qualified<CustomTypeName>,\n        name: String,\n        name_source_1: FieldNameSource,\n        name_source_2: FieldNameSource,\n    },\n    #[error(\n        \"the type of the comparable field '{field_name}' on the boolean expresssion '{boolean_expression_type_name}' is a multidimensional array type: {field_type}. Multidimensional arrays are not supported in boolean expressions\"\n    )]\n    MultidimensionalArrayComparableFieldNotSupported {\n        boolean_expression_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n        field_type: QualifiedTypeReference,\n    },\n    #[error(\n        \"the target model '{target_model_name}' of the relationship '{relationship_name}' does not have a boolean expression type defined\"\n    )]\n    ComparableRelationshipToModelWithoutBooleanExpressionType {\n        target_model_name: Qualified<ModelName>,\n        relationship_name: RelationshipName,\n    },\n    #[error(\"the boolean expression type with name {type_name} is defined more than once\")]\n    DuplicateBooleanExpressionType {\n        type_name: Qualified<CustomTypeName>,\n    },","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/boolean_expressions/types.rs#L49-L85","documentation":"A comparable field's type resolves to a multidimensional array (array of arrays). Multidimensional arrays cannot be expressed in boolean expression filters, so resolution fails outright.","triggerScenarios":"Declaring a comparable field whose QualifiedTypeReference is a nested array type, e.g. `[[Int]]`, in a boolean expression type.","commonSituations":"Postgres columns typed as multi-dimensional arrays or nested JSON arrays mapped to nested array types in metadata; schema changes introducing `[][]` types into a type with an existing boolean expression.","solutions":["Remove the multidimensional field from comparable fields","Change the field's type to a flat scalar array or JSON if the shape is not semantically 2D","If the underlying column is genuinely 2D, expose it via a non-comparable field only"],"exampleFix":"// before\nmatrix: [[Float]]\n  comparable: true\n// after\nmatrix: [[Float]]\n  comparable: false","handlingStrategy":"validation","validationCode":"fn array_depth(mut t: &QualifiedType) -> usize {\n    let mut d = 0;\n    while let QualifiedType::Array(inner) = t { d += 1; t = inner; }\n    d\n}\nfor f in &be_type.comparable_fields {\n    assert!(array_depth(&f.field_type.underlying) < 2,\n        \"{} is multidimensional; not allowed in boolean expressions\", f.name);\n}","typeGuard":"fn is_multidimensional(t: &QualifiedTypeReference) -> bool {\n    matches!(t.underlying(), QualifiedType::Array(inner)\n        if matches!(**inner, QualifiedType::Array(_)))\n}","tryCatchPattern":"if let BooleanExpressionIssue::MultidimensionalArrayComparableFieldNotSupported { field_name, field_type, .. } = &issue {\n    log::error!(\"{field_name} ({field_type}) is multidimensional; mark it non-comparable\");\n}","preventionTips":["Never mark 2D-array columns as comparable","Flatten or JSON-typing genuinely nested data","Run resolve checks in CI after schema changes"],"tags":["rust","hasura","metadata","boolean-expressions","arrays","type-validation"],"backgroundTag":"unsupported-filter-type","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}