Opened 5 years ago

Last modified 5 years ago

#2171 closed defect

pow() on struct literal returns random result — at Initial Version

Reported by: Dimitar Misev Owned by: apercov
Priority: major Milestone: 10.0
Component: qlparser Version: 9.8
Keywords: Cc:
Complexity: Medium

Description

SELECT power({ 13c, 115c, 212c }, 0us)

result { inf, 1, 1 }

SELECT power({ 13c, 115c, 212c }, 0d)

result { 1, 1, inf }

SELECT pow({ 13c, 115c, 212c }, 0)

result { 1, 1, inf }

I executed the last one 10 times with

for i in $(seq 10); do rasql -q 'SELECT pow({ 13c, 115c, 212c }, 0)' --out string | grep Result; sleep 1; done

and got

  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { -nan, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, 1 }
  Result element 1: { 1, 1, inf }

Change History (0)

Note: See TracTickets for help on using tickets.