eval.asciidoc 750 B

1234567891011121314151617181920212223242526272829
  1. [[esql-eval]]
  2. === `EVAL`
  3. `EVAL` enables you to append new columns:
  4. [source.merge.styled,esql]
  5. ----
  6. include::{esql-specs}/docs.csv-spec[tag=eval]
  7. ----
  8. [%header.monospaced.styled,format=dsv,separator=|]
  9. |===
  10. include::{esql-specs}/docs.csv-spec[tag=eval-result]
  11. |===
  12. If the specified column already exists, the existing column will be dropped, and
  13. the new column will be appended to the table:
  14. [source.merge.styled,esql]
  15. ----
  16. include::{esql-specs}/docs.csv-spec[tag=evalReplace]
  17. ----
  18. [%header.monospaced.styled,format=dsv,separator=|]
  19. |===
  20. include::{esql-specs}/docs.csv-spec[tag=evalReplace-result]
  21. |===
  22. [discrete]
  23. ==== Functions
  24. `EVAL` supports various functions for calculating values. Refer to
  25. <<esql-functions,Functions>> for more information.