OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-919) Specify the result type for each operation based on operator types


    [ https://issues.oasis-open.org/browse/ODATA-919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=65229#comment-65229 ] 

Mark Biamonte commented on ODATA-919:
-------------------------------------

Additionally, executing a SQL statement the causes a numeric overflow of integer values causes the database to return a numeric overflow error.  For example define a table with two bigint columns and populate both values with the max bigint value.  Executing a SQL statement that selects the sum of the two big int columns returns an error when the row with the numeric overflow is fetched.

I also did an experiment with a popular Java JSON parser to see how it behaved when the value null was used instead of a number.  Using the JSON

{
  "rows": [
    {
      "value1": 4,
      "value2": 2
    },
    {
      "value1": 6,
      "value2": null
    }
  ]
}

If the values are fetched from the JSON parser as Int then the null value for value2 in the second row is returned as zero.  If however the values are fetched as a string, then the null value for value2 in the second row is returned.  Does this mean that as an client reading a JSON response, I must fetch all properties of type integer as a string?  With further experimentation I think that is the case.  I added another work where value2's value is the string "NAN".  Fetching that value as an Int also returned zero.  I was not expecting that.  

Even so, if I do fetch the values as string and I get a null value back and the property is nullable, how do I know whether the null is returned because there was an overflow or null was returned because there was no value for value2 in this row



> Specify the result type for each operation based on operator types
> ------------------------------------------------------------------
>
>                 Key: ODATA-919
>                 URL: https://issues.oasis-open.org/browse/ODATA-919
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData URL Conventions
>    Affects Versions: V4.0_OS
>            Reporter: Martin Zurmuehl
>            Assignee: Evan Ireland
>             Fix For: V4.01_CSD02
>
>
> See ODATA-785 for a description of the issue --> Comments Section.



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]