-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when trying to handle missing_constant
== Infinity
#844
Comments
The definition of these special constants (not to mean IEEE 754 special constants) are defined to be: Values of this attribute should be represented in the same data_type as the elements in the object with which the Special_Constants class is associated. Super clear. Anyway, I do not think any special constant is meant to +/- inf or nan since those are data type dependent. Matching types is then pushed directly back onto the label writer. I think the right comparison is 0x7f800000 for positive inf single precision and 0x7ff0000000000000 for positive inf double. I have seen some of these patterns in previous tickets like the one that had us start handling 0x. |
@al-niessner so are you claiming that this data is actually invalid? And they should be using something like |
Yes. Special constants do not have data types and it is the label writer responsibility to make sure the constant is of the correct data type. Infinity in single is not the same as double with more zeros (look closely at prior post). Therefore, infinity puts the type responsibility on the reader while 0x7... puts it on the writer. The data can be +/-Inf or Nan or some limited form of those because they do have a data type associated with them and therefore may to a specific bit pattern: validate/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java Lines 56 to 57 in 3d84b0e
|
@al-niessner for this one, in the meantime, can we at least catch the |
Some test data please. |
@al-niessner see LFT. I can resend if needed. |
Data from LFT works. See PR #894 for details. |
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
When I tried validating a product with
missing_constant
==Infinity
, I get a FATAL_ERROR.Upon further investigation, it is throwing a
java.lang.NumberFormatException
🕵️ Expected behavior
I expected validate to complete successfully.
📜 To Reproduce
🖥 Environment Info
No response
📚 Version of Software Used
3.5.0-SNAPSHOT
🩺 Test Data / Additional context
Data product is very large, so to-be-sent via LFT.
🦄 Related requirements
No response
⚙️ Engineering Details
No response
The text was updated successfully, but these errors were encountered: