CAST function not working on PPL

i’m not able to reproduce, maybe try to escape field name? if that didn’t work, could you post a mapping and sample doc for index-yyyy-mm-dd?

POST cast/_doc
{
  "name": "123"
}

POST /_plugins/_ppl
{
  "query": "source = `cast` | eval `num` = cast(`name` as int)"
}

{
  "schema": [
    {
      "name": "name",
      "type": "string"
    },
    {
      "name": "num",
      "type": "integer"
    }
  ],
  "datarows": [
    [
      "123",
      123
    ]
  ],
  "total": 1,
  "size": 1
}