-
Notifications
You must be signed in to change notification settings - Fork 229
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
TEIID-5826: Adding ability to read length, precision and scale from m… #1182
Conversation
An issue would be that we have some inconsistency between the notion of odata precision and teiid precision - OData timestamp precision = Teiid Timestamp scale. See
For the other non-numeric types precision isn't needed at all, but it should be okay to set it on them. |
BTW, this is OData V2 only, do we know if that mismatch exists here also? Build error seems to be unrelated. |
so precision on date reflects the nanoseconds on DateTime. So, if the "scale" on Datetime gets converted to "precision" on outbound, we need to set "precision" as "scale" on ingest, however I do not see similar behavior on OData V4, should be changed there too? |
Yes that appears to have the same issue. |
@shawkins Updated the code per your suggestions for the TIMESTAMP type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only issue is that it's still setting the precision on a timestamp. The Teiid precision for a timestamp matches the jdbc definition - the length of the string definition. So you could leave it unset, or if the precision is 0, then set it to 19, otherwise 20+odata precision.
…etadata properties for OData V2, and SAP, OData V4 transaltors. Also for datatime precision is being read as scale on the teiid runtime type to support odata production on top
@shawkins Updated the PR to left it unset for timestamp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…etadata properties for OData V2, and SAP transaltors