Skip to content

[BUG] PPL error node must be a boolean when mapping conflicts #5269

@joshuali925

Description

@joshuali925

Query Information

PPL Command/Query:

source = repro*

Expected Result:
response similar to DSL GET repro*/_search with documents returned

Actual Result:

"{\n  \"error\": {\n    \"reason\": \"Error occurred in OpenSearch engine: node must be a boolean, found NUMBER\",\n    \"details\": \"OpenSearchParseException[node must be a boolean, found NUMBER]\\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.\",\n    \"type\": \"OpenSearchParseException\"\n  },\n  \"status\": 400\n}"

Dataset Information

Dataset/Schema Type

  • OpenTelemetry (OTEL)
  • Simple Schema for Observability (SS4O)
  • Open Cybersecurity Schema Framework (OCSF)
  • Custom (details below)

Index Mapping

{
  "repro-bb": {
    "mappings": {
      "properties": {
        "flag": {
          "type": "boolean"
        },
        "startTime": {
          "type": "date_nanos"
        }
      }
    }
  },
  "repro-aa": {
    "mappings": {
      "properties": {
        "flag": {
          "type": "text"
        },
        "startTime": {
          "type": "date_nanos"
        }
      }
    }
  }
}

Sample Data

{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 2,
    "successful": 2,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 2,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "repro-aa",
        "_id": "1",
        "_score": 1,
        "_source": {
          "startTime": "2026-03-24T20:25:00.000Z",
          "flag": 0
        }
      },
      {
        "_index": "repro-bb",
        "_id": "1",
        "_score": 1,
        "_source": {
          "startTime": "2026-03-25T20:25:00.000Z",
          "flag": false
        }
      }
    ]
  }
}

Bug Description

Issue Summary:
opensearch coerces 0 as false for boolean fields, sql should have same behavior

Steps to Reproduce:

  1. create the two indices with docs listed above
  2. run ppl query as listed above
  3. see error

Impact:
can't search indexes with this kind of mapping conflict

Environment Information

OpenSearch Version:
3.6

Additional Details:

It appears #4095 addressed similar problems, but not 0 to false

Screenshots

Metadata

Metadata

Assignees

Labels

PPLPiped processing languagebugSomething isn't workingerror-experienceIssues related to how we handle failure cases in the plugin.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions