Skip to content

[RFC] Missing UDFs in both v2 and v3 #3898

Closed

Description

@ishaoxy

Problem Statement
When I checked and reproduced this issue #1339 , I found that these operators are not available in the current v2 and v3 ppl statements. But I thought it has been fixed in v2? Does anyone know what is going on? Do we need to add them to all versions?

  • cosh
  • sinh
  • multiply (see below)
  • expm1
  • rint
  • signum

BTW, don't we support multiplication? The following query doesn't work in v2 and v3:

source=my_test_data | eval f = x*y | fields f

Activity

  1. LantaoJin commented on Jul 18, 2025

    @LantaoJin
    Member

    source=my_test_data | eval f = x * y | fields f works

  2. LantaoJin commented on Jul 18, 2025

    @LantaoJin
    Member

    Let's focus on v3 first. @ishaoxy

  3. added
    PPL
    and removed on Jul 18, 2025
  4. ishaoxy commented on Jul 21, 2025

    @ishaoxy
    ContributorAuthor

    source=my_test_data | eval f = x * y | fields f

    Yes, but I found that multiplication needs to work only when there is a gap between both the two numbers and the operator. Otherwise it will show
    "{\n \"error\": {\n \"reason\": \"Invalid Query\",\n \"details\": \"field [x*y] not found; input fields are: [x, y, _id, _index, _score, _maxscore, _sort, _routing]\",\n \"type\": \"IllegalArgumentException\"\n },\n \"status\": 400\n}"
    or
    "{\n \"error\": {\n \"reason\": \"Invalid Query\",\n \"details\": \"[y] is not a valid term at this part of the query: '..._data | eval f = x* y' <-- HERE. Expecting one of 9 possible tokens. Some examples: EOF, '|', ',', '.', '+', ...\",\n \"type\": \"SyntaxCheckException\"\n },\n \"status\": 400\n}".
    What's more, subtraction requires a gap between at least the first digit and the operator to work.
    Or it will show the same error as above.
    However, addition and division do not need to rely on gaps to work.

  5. LantaoJin commented on Jul 22, 2025

    @LantaoJin
    Member

    source=my_test_data | eval f = x * y | fields f

    Yes, but I found that multiplication needs to work only when there is a gap between both the two numbers and the operator. Otherwise it will show "{\n \"error\": {\n \"reason\": \"Invalid Query\",\n \"details\": \"field [x*y] not found; input fields are: [x, y, _id, _index, _score, _maxscore, _sort, _routing]\",\n \"type\": \"IllegalArgumentException\"\n },\n \"status\": 400\n}" or "{\n \"error\": {\n \"reason\": \"Invalid Query\",\n \"details\": \"[y] is not a valid term at this part of the query: '..._data | eval f = x* y' <-- HERE. Expecting one of 9 possible tokens. Some examples: EOF, '|', ',', '.', '+', ...\",\n \"type\": \"SyntaxCheckException\"\n },\n \"status\": 400\n}". What's more, subtraction requires a gap between at least the first digit and the operator to work. Or it will show the same error as above. However, addition and division do not need to rely on gaps to work.

    This is known issue, ref #720 (comment)

  6. moved this from Not Started to Done in PPL Trackeron Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPL

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions