1
0

ceil.asciidoc 749 B

12345678910111213141516171819202122232425262728293031323334353637
  1. [discrete]
  2. [[esql-ceil]]
  3. === `CEIL`
  4. *Syntax*
  5. [.text-center]
  6. image::esql/functions/signature/ceil.svg[Embedded,opts=inline]
  7. *Parameters*
  8. `n`::
  9. Numeric expression. If `null`, the function returns `null`.
  10. *Description*
  11. Round a number up to the nearest integer.
  12. NOTE: This is a noop for `long` (including unsigned) and `integer`.
  13. For `double` this picks the closest `double` value to the integer
  14. similar to {javadoc}/java.base/java/lang/Math.html#ceil(double)[Math.ceil].
  15. *Supported types*
  16. include::types/ceil.asciidoc[]
  17. *Example*
  18. [source.merge.styled,esql]
  19. ----
  20. include::{esql-specs}/math.csv-spec[tag=ceil]
  21. ----
  22. [%header.monospaced.styled,format=dsv,separator=|]
  23. |===
  24. include::{esql-specs}/math.csv-spec[tag=ceil-result]
  25. |===