[JBoss JIRA] (TEIID-3562) Teradata15 - teiid shifts date/time/timestamp values according to timezone.
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3562?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3562.
---------------------------------
> Teradata15 - teiid shifts date/time/timestamp values according to timezone.
> ---------------------------------------------------------------------------
>
> Key: TEIID-3562
> URL: https://issues.jboss.org/browse/TEIID-3562
> Project: Teiid
> Issue Type: Bug
> …
[View More]Affects Versions: 8.7.1.6_2
> Environment: teradata version - 15.00.01.01
> teradata driver version - 15.10.00.05
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.12
>
> Attachments: Main.java, out_GMT+0500, out_GMT_not_set
>
>
> Teiid shifts date/time/timestamp values returned from teradata according to user.timezone value [1], [2]. However, when I execute source-specific command, teradata returns correct values [3].
> [1]
> *Query:* SELECT * FROM smalla ORDER BY IntKey
> *-Duser.timezone:* GMT+5
> *Result:*
> || IntKey || DateValue || TimeValue || TimeStampValue ||
> |0 | 1999-12-31 | 19:00:00 | 1999-12-31 19:00:00.0|
> |1 | 2000-01-01 | 20:00:00 | 1999-12-31 19:00:01.0|
> |2 | 2000-01-02 | 21:00:00 | 1999-12-31 19:00:02.0|
> |3 | 2000-01-03 | 22:00:00 | 1999-12-31 19:00:03.0|
> |...|...|...|...|
> [2]
> *Query:* SELECT * FROM smalla ORDER BY IntKey
> *-Duser.timezone:* GMT+1
> *Result:*
> || IntKey || DateValue || TimeValue || TimeStampValue ||
> |0 | 1999-12-31 | 23:00:00 | 1999-12-31 23:00:00.0|
> |1 | 2000-01-01 | 00:00:00 | 1999-12-31 23:00:01.0|
> |2 | 2000-01-02 | 01:00:00 | 1999-12-31 23:00:02.0|
> |3 | 2000-01-03 | 02:00:00 | 1999-12-31 23:00:03.0|
> |...|...|...|...|
> [3]
> *Query:* SELECT g_0.IntKey AS c_0, g_0.DateValue AS c_1, g_0.TimeValue AS c_2, g_0.TimestampValue AS c_3 FROM smalla AS g_0 ORDER BY 1
> *local timezone:* GMT+1/GMT+5
> *Result:*
> || c_0 || c_1 || c_2 || c_3 ||
> |0 | 2000-01-01 | 00:00:00 | 2000-01-01 00:00:00.0|
> |1 | 2000-01-02 | 01:00:00 | 2000-01-01 00:00:01.0|
> |2 | 2000-01-03 | 02:00:00 | 2000-01-01 00:00:02.0|
> |3 | 2000-01-04 | 03:00:00 | 2000-01-01 00:00:03.0|
> |...|...|...|...|
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
[View Less]
9 years, 2 months
[JBoss JIRA] (TEIID-3273) Exception while using biginteger column with SUM function
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3273?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3273.
---------------------------------
> Exception while using biginteger column with SUM function
> ---------------------------------------------------------
>
> Key: TEIID-3273
> URL: https://issues.jboss.org/browse/TEIID-3273
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> …
[View More]Affects Versions: 8.7
> Environment: Teiid 8.7 and Windows
> Reporter: Rakesh Balguri
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.10
>
>
> I have column which is of "BigInteger" type and when I am trying to execute an SQL which contains the SUM function I am getting the following exception.
> The following is the SQL:
>
> SELECT SUM(age) FROM test
>
> My understanding is that the sum of all the BigInteger's is not fitting in the size of the BigInteger and Teiid is trying to convert it into a BigDecimal and end up in an exception.
> How to fix this problem? Do we have a woraround for this?
>
> Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype biginteger for column 0 doesn't match the runtime type "java.math.BigDecimal". Please ensure that the column's modeled datatype matches the expected data.
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:851) [teiid-client-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:317) [teiid-client-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1443) [rt.jar:1.7.0_03]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1414) [rt.jar:1.7.0_03]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174) [rt.jar:1.7.0_03]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346) [rt.jar:1.7.0_03]
> at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1443) [rt.jar:1.7.0_03]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1414) [rt.jar:1.7.0_03]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174) [rt.jar:1.7.0_03]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346) [rt.jar:1.7.0_03]
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> ... 25 more
> Caused by: java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.math.BigInteger
> at org.teiid.client.BatchSerializer$BigIntegerColumnSerializer.writeObject(BatchSerializer.java:681) [teiid-client-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:506) [teiid-client-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:840) [teiid-client-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]
> ... 36 more
> See the discussion in Teiid Forums for more information: https://developer.jboss.org/thread/251244
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
[View Less]
9 years, 2 months
[JBoss JIRA] (TEIID-3672) Odata - if table does not contain element with required key then teiid trows NPE
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3672?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3672.
---------------------------------
> Odata - if table does not contain element with required key then teiid trows NPE
> --------------------------------------------------------------------------------
>
> Key: TEIID-3672
> URL: https://issues.jboss.org/browse/TEIID-3672
> Project: Teiid
> Issue Type: Bug
&…
[View More]gt; Affects Versions: 8.7.1.6_2
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> If table does not contain element with primary key defined in URL, then Teiid throws NPE:
> [org.teiid.ODATA] (http-/127.0.0.1:8180-4) TEIID16013 Error occurred producing OData result.: java.lang.NullPointerException
> at org.odata4j.format.xml.AtomEntryFormatWriter.write(AtomEntryFormatWriter.java:51) [odata-core-0.8.7.redhat-3.jar:0.8.7.redhat-3]
> at org.odata4j.format.xml.AtomEntryFormatWriter.write(AtomEntryFormatWriter.java:20) [odata-core-0.8.7.redhat-3.jar:0.8.7.redhat-3]
> at org.odata4j.producer.resources.EntityRequestResource.getEntityImpl(EntityRequestResource.java:309) [odata-core-0.8.7.redhat-3.jar:0.8.7.redhat-3]
> at org.odata4j.producer.resources.EntityRequestResource.getEntity(EntityRequestResource.java:273) [odata-core-0.8.7.redhat-3.jar:0.8.7.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_40]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_40]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_40]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_40]
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:561) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:543) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:128) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at org.teiid.odata.ODataServletContainerDispatcher.service(ODataServletContainerDispatcher.java:118) [classes:]
> at org.teiid.odata.ODataServlet.service(ODataServlet.java:65) [classes:]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.12.Final-redhat-1.jar:]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.3.Final-redhat-2.jar:7.5.3.Final-redhat-2]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.10.Final-redhat-1.jar:7.5.10.Final-redhat-1]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
[View Less]
9 years, 2 months
[JBoss JIRA] (TEIID-3600) DB2 - error getting substring if "from position" is out of range
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3600?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3600.
---------------------------------
> DB2 - error getting substring if "from position" is out of range
> ----------------------------------------------------------------
>
> Key: TEIID-3600
> URL: https://issues.jboss.org/browse/TEIID-3600
> Project: Teiid
> Issue Type: Quality Risk
> Components:…
[View More] Misc. Connectors
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> If second argument of a SUBSTRING(x,y,z) function is out of range of first argument an exception is thrown [1]. Source-specific command [2].
> [1]
> Caused by: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-138, SQLSTATE=22011, SQLERRMC=null, DRIVER=4.12.55
> at com.ibm.db2.jcc.am.hd.a(hd.java:668)
> at com.ibm.db2.jcc.am.hd.a(hd.java:60)
> ...
> [2]
> SELECT substr(varchar(g_0.TimestampValue), 40, CASE WHEN 0 > (length(varchar(g_0.TimestampValue)) - (40 - 1)) THEN (length(varchar(g_0.TimestampValue)) - (40 - 1)) ELSE 0 END) FROM SmallA AS g_0 WHERE g_0.IntKey = 1
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
[View Less]
9 years, 2 months
[JBoss JIRA] (TEIID-3598) MongoDB string functions - different handling of NULL values
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3598?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3598.
---------------------------------
> MongoDB string functions - different handling of NULL values
> ------------------------------------------------------------
>
> Key: TEIID-3598
> URL: https://issues.jboss.org/browse/TEIID-3598
> Project: Teiid
> Issue Type: Bug
> Components: Misc. …
[View More]Connectors
> Affects Versions: 8.7.1.6_2
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
> Labels: Alpha3
> Fix For: 8.12
>
>
> Teiid doesn't handle NULL values right in given functions when working with mongodb.
> * SUBSTRING(<column resolving to NULL>,2)
> ** query:
> {code:sql}
> SELECT INTKEY, STRINGNUM, SUBSTRING(STRINGNUM, 2) FROM BQT1.SmallA ORDER BY INTKEY
> {code}
> ** source query:
> {code:plain}
> {"$project": {{ "c_0" : "$INTKEY" , "c_1" : "$STRINGNUM" , "c_2" : { "$substr" : [ "$STRINGNUM" , { "$subtract" : [ 2 , 1]} , 4000]}}}}
> {code}
> ** problem:
> For row with NULL value in given column returns sth like:
> {code:plain}{ "_id" : ObjectId("534bf17516997a2a41000002"), "c_0" : 1, "c_1" : null, "c_2" : "" }
> {code}which results in "" as result for SUBSTRING(NULL, 2) which should return NULL instead
> * UCASE, LCASE (UPPER, LOWER)
> ** query:
> {code:sql}
> SELECT intkey, stringnum, LOWER(stringnum) AS LOWER FROM BQT1.SmallA ORDER BY intkey
> {code}
> ** source query:
> {code:plain}
> {"$project": {{ "c_0" : "$INTKEY" , "c_1" : "$STRINGNUM" , "c_2" : { "$toLower" : [ "$STRINGNUM"]}}}}
> {code}
> ** problem:
> For row with NULL value in given column returns sth like:
> {code:plain}
> { "_id" : ObjectId("534bf17516997a2a41000002"), "c_0" : 1, "c_1" : null, "c_2" : "" }
> {code} which results in "" as result for LCASE(NULL) which should return NULL instead
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
[View Less]
9 years, 2 months
[JBoss JIRA] (TEIID-3505) MySQL translator (mysql, mysql5) - convert( ..., float [double]) uses "+ 0.0" construction
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3505?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3505.
---------------------------------
> MySQL translator (mysql, mysql5) - convert( ..., float [double]) uses "+ 0.0" construction
> -------------------------------------------------------------------------------------------
>
> Key: TEIID-3505
> URL: https://issues.jboss.org/browse/TEIID-3505
> Project: Teiid
> …
[View More] Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 8.11
>
>
> convert(... , float) and convert(..., double) functions use for conversion "+ 0.0". But if the result is used in the more complex expression, translator does not take into account priority of the operators.
> *Query:* SELECT StringKey, (convert(StringKey, float)+(-3)) AS StringKeyPlusNeg3, (convert(StringKey, float) - (-3)) AS StringKeyMinusNeg3, (convert(StringKey, float)*(-3)) AS StringKeyTimesNeg3, (convert(StringKey, float)/(-3)) AS StringKeyDivNeg3 FROM table WHERE IntKey == 1 ORDER BY StringKey
> *Result:* 1 | -2 | 4 | 1 | 1
> *Source-specific query:* SELECT g_0.STRINGKEY AS c_0, (g_0.STRINGKEY + 0.0 + -3.0) AS c_1, (g_0.STRINGKEY + 0.0 - -3.0) AS c_2, _*(g_0.STRINGKEY + 0.0 * -3.0)*_ AS c_3, _*(g_0.STRINGKEY + 0.0 / -3.0)*_ AS c_4 FROM smalla AS g_0 WHERE g_0.INTKEY > 0 AND g_0.INTKEY <= 10 ORDER BY c_0
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
[View Less]
9 years, 2 months