hpcc-systems / DataPatterns

HPCC Systems ECL bundle that provides some basic data profiling and research tools to an ECL programmer
3 stars 4 forks source link

best_attribute_type leading zeros for float / exponential notation #53

Closed jrclements closed 5 years ago

jrclements commented 5 years ago

The solution for #42 might have caused an issue suggesting the best type for fields containing only values that are numbers in decimal or exponential notations & begin in zero. For example - https://play.hpccsystems.com:18010/?Wuid=W20190722-192640&Widget=WUDetailsWidget#/stub/Resources-DL/Grid - specifically the "precipintensity" attribute.

In lieu of line 511 on https://github.com/hpcc-systems/DataPatterns/pull/47/commits/db2a2790db598abbfc1e706e501a8dd1729e1a5d#diff-a648eefa0718d8c9b3b40721e26e0563R511, would something like this regex work, if the implementation of the REGEXFIND builtin is capable of negative lookahead?

https://regex101.com/r/h7uzgD/3

dcamper commented 5 years ago

Good catch. I have modified the test for leading zeros, making it more specific ("integer value with leading zeros").

@jrclements Please check out branch issue-53-leading-zero-exp-notation (https://github.com/hpcc-systems/DataPatterns/tree/issue-53-leading-zero-exp-notation) and give it a try. Let me know if it works for you. If it does, I will integrate it into v1.5.3.

dcamper commented 5 years ago

Fix included in v1.5.3.