Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Decimal numbers in expression language

avatar

Hi,

Does Latest version of NiFi/HDF supports Fractional numbers in expression language? If not do we have any plans to add it?

Thanks,

Jobin George

1 ACCEPTED SOLUTION

avatar

Currently Fractional (aka. "Decimal") numbers are not supported in Expression Language. The "Number" field is backed by java Longs which are only whole numbers. There is currently work being done to add it and relatively recently there was a discussion thread about it[1]. The exact time when it will be included is yet to be determined though.

Edit: Actually I shouldn't make the assumption "fractional == decimal". There are currently no plans to support decimals expressed as fractions, ie. "1/4". There are plans to support decimals expressed using decimal points, ie "0.25". If decimals expressed as fractions is what you need, could you share the use-case?

[1] http://apache-nifi-developer-list.39713.n7.nabble.com/Discuss-Expression-Language-Options-to-Add-Dec...

View solution in original post

2 REPLIES 2

avatar

Currently Fractional (aka. "Decimal") numbers are not supported in Expression Language. The "Number" field is backed by java Longs which are only whole numbers. There is currently work being done to add it and relatively recently there was a discussion thread about it[1]. The exact time when it will be included is yet to be determined though.

Edit: Actually I shouldn't make the assumption "fractional == decimal". There are currently no plans to support decimals expressed as fractions, ie. "1/4". There are plans to support decimals expressed using decimal points, ie "0.25". If decimals expressed as fractions is what you need, could you share the use-case?

[1] http://apache-nifi-developer-list.39713.n7.nabble.com/Discuss-Expression-Language-Options-to-Add-Dec...

avatar

Thanks! My bad, I wanted to know about decimal[0.25]. Glad to know its WIP.