Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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.