Opened 16 months ago

Last modified 15 months ago

#2755 closed defect

FIX - rasql - pow should support integer parameter and parentheses — at Version 1

Reported by: Bang Pham Huu Owned by: nivlev@…
Priority: major Milestone: 10.2
Component: server Version: 10.2
Keywords: Cc:
Complexity: Medium

Description (last modified by Dimitar Misev)

The pow function currently supports only floating-point exponent, e.g.

SELECT pow(2, 2.0)

It should also support integer type exponents (octet, char, short, ushort, long, ulong), i.e. these shouldn't return an error:

SELECT pow(2, 2o)
SELECT pow(2, 2c)
SELECT pow(2, 2s)
SELECT pow(2, 2us)
SELECT pow(2, 2)
SELECT pow(2, 2ul)

Also, it has trouble parsing exponent expressions, e.g.

SELECT encode(POW(c, ( 2.5 ) ), "png" , "{\"metadata\":{\"resolution\":\"1\"},\"nodata\":[]}") FROM test_mr AS c

with error

rasdaman error 300: Parsing error 300 in line 1, column 22: Unexpected name (

Change History (1)

comment:1 by Dimitar Misev, 15 months ago

Description: modified (diff)
Owner: changed from Dimitar Misev to nivlev@…
Summary: FIX - rasql - pow with parenthesis in second paramter failedFIX - rasql - pow should support integer parameter and parentheses
Note: See TracTickets for help on using tickets.