Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5216

JBOSS - Teiid 9.2.1 unable to return DateTimeOffset ODatatype values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 9.2.1
    • Fix Version/s: 10.1
    • Component/s: OData
    • Labels:
      None
    • Environment:

      All

    • Steps to Reproduce:
      Hide

      During the time of requesting ODatatype - DateTimeOffset from the from the following service - http://services.odata.org/V4/Northwind/Northwind.svc/

      *Query - Select * from Employees.
      *
      Using the above query it is unable to return DateTimeOffset values for it

      Show
      During the time of requesting ODatatype - DateTimeOffset from the from the following service - http://services.odata.org/V4/Northwind/Northwind.svc/ *Query - Select * from Employees. * Using the above query it is unable to return DateTimeOffset values for it

      Description

      During the time of requesting ODatatype - DateTimeOffset from the from the following service - http://services.odata.org/V4/Northwind/Northwind.svc/

      Query - Select * from Employees.

      Using the above query it is unable to return DateTimeOffset values for it and returns the
      following error -
      java.lang.IllegalArgumentException: No enum constant org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind.TimeOffset
      at java.lang.Enum.valueOf(Enum.java:238)
      at org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind.valueOf(EdmPrimitiveTypeKind.java:24)
      at org.teiid.olingo.common.ODataTypeManager.parseLiteral(ODataTypeManager.java:332)
      at org.teiid.olingo.common.ODataTypeManager.convertToTeiidRuntimeType(ODataTypeManager.java:184)
      at org.teiid.translator.odata4.BaseQueryExecution.buildRow(BaseQueryExecution.java:244)
      at org.teiid.translator.odata4.ODataQueryExecution.next(ODataQueryExecution.java:122)
      at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:435)
      at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:238)
      at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:220)
      at com.sun.proxy.$Proxy398.more(Unknown Source)
      at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
      at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
      at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
      at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:282)
      at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

      From the initial level analysis and observation is has been observed teiid class - ODataTypeManager in that parselitreals method where ODatatype.Substring(4) is done which is causing the issue which is changing DateTimeOffset to TimeOffset and when it tries to find the Enum constant from the EdmPrimitiveTypeKind list it is unable find the changed name and this seems to be causing the issue in accessing the DateTimeOffset type datas from the containing tables.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                pushkar_kamra Pushkar Kamra
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: