Support Questions

Find answers, ask questions, and share your expertise

JsonRecordSetWriter 1.22.0 issues with elements in array

avatar
Explorer

While working with JsonRecordSetWriter 1.22.0 on an ExecuteSQLRecord 1.22.0 processor, we have noticed that when selecting columns with arrays such as the below example:

SteliosCh_0-1692863900904.png

the writer has the below output:

SteliosCh_1-1692863935597.png

However, if I select a smaller number in the array:

SteliosCh_2-1692864059084.png

I seem to get  the correct result:

SteliosCh_3-1692864073831.png

This seems to be an overflow of some kind that did not seem to exist on our previous version of nifi when working with nifi 1.11.4

I am providing below both the settings of the ExecuteSQLRecord processors and the JsonRecordSetWriter. Please advise if this is a bug or If there might be something I am overlooking. Thank you.

SteliosCh_5-1692864316205.pngSteliosCh_6-1692864327310.png

 

7 REPLIES 7

avatar
Community Manager

@SteliosCh, Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @cotopaul @SAMSAL @TimothySpann @MattWho  may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Explorer

Thank you very much!

avatar
Master Guru

I wonder if this was fixed 1.23.2.   That seems like it shouldn't be too big, but it may be close.

 

https://calcite.apache.org/docs/reference.html

 

INTEGER, INT4 byte signed integerRange is -2147483648 to 2147483647
   

 

 

try BIGINT

avatar
Explorer

Hello @TimothySpann  thank you for the reply,

Unfortunately  BIGINT yields the same results

SteliosCh_0-1692885476014.png

SteliosCh_1-1692885533786.png

 

avatar
Master Guru

What database is that for, that is very weird SQL syntax, why are you making it  JSON to convert to int?

 

Trying upping the precision from 10 to 14.

 

Default Decimal Precision

avatar
Explorer

Changing decimal precision  did not affect the results either. Could this be an issue with the writer by any chance?  

SteliosCh_0-1692888676214.png


This is a postgress database. The casting into json is to create a column of type array with integer contents.

avatar
New Contributor

@SteliosCh, are there any updates on the issue?