Skip to content

Arithmetic Expressions #25

Closed Answered by springcomp
springcomp asked this question in Q&A
Mar 3, 2022 · 7 comments · 34 replies
Discussion options

You must be logged in to vote

Arithmetic Expressions

JEP 16
Author Maxime Labelle
Created 01-August-2022
SemVer MINOR
Status Draft
[Discussion #25] #25

Abstract

This JEP proposes a new arithmetic-expression rule in the grammar to support simple arithmetic operations.

Motivation

JMESPath supports querying JSON documents that may return numbers at various stages, but lacks the capability to operate on them using simple arithmetic operations. The only support for arithmetic is currently brought by the sum() function.

Specification

To support arithmetic operations, we need to introduce the following operators:

  • + addition operator
  • - subtraction operator
  • * multiplication operator
  • / division operator
  • %

Replies: 7 comments 34 replies

Comment options

springcomp
Mar 6, 2022
Maintainer Author

You must be logged in to vote
4 replies
@innovate-invent
Comment options

@springcomp
Comment options

springcomp Mar 9, 2022
Maintainer Author

@Thaina
Comment options

@innovate-invent
Comment options

Comment options

You must be logged in to vote
5 replies
@innovate-invent
Comment options

@springcomp
Comment options

@springcomp
Comment options

springcomp Aug 5, 2022
Maintainer Author

@innovate-invent
Comment options

@springcomp
Comment options

Comment options

You must be logged in to vote
3 replies
@springcomp
Comment options

@springcomp
Comment options

@chipzoller
Comment options

Comment options

You must be logged in to vote
3 replies
@innovate-invent
Comment options

@springcomp
Comment options

@springcomp
Comment options

Answer selected by springcomp
Comment options

You must be logged in to vote
1 reply
@springcomp
Comment options

Comment options

You must be logged in to vote
17 replies
@hell-racer
Comment options

@hell-racer
Comment options

@hell-racer
Comment options

@springcomp
Comment options

springcomp Aug 5, 2022
Maintainer Author

@springcomp
Comment options

Comment options

You must be logged in to vote
1 reply
@springcomp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
syntax Will require grammar change jep-candidate JEP (Draft) available - please vote!
5 participants