eval.asciidoc 710 B

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