[JBoss JIRA] (TEIID-4319) Deprecate automatically adding of the class object to the source table
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4319?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4319:
------------------------------------
By removing the object column (because its not updatable), the materialization process will work without having to specify the LOAD_SCRIPT, just let Teiid use the default loading.
> Deprecate automatically adding of the class object to the source table
> ----------------------------------------------------------------------
>
> Key: TEIID-4319
> URL: https://issues.jboss.org/browse/TEIID-4319
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Van Halbert
>
> If the source model is not defined with the metadata, but allowing the infinispan (object) translator to reverse engineer the metadata from the cache object class, the process will add a column that represents the cache object. This is a holdover from the original implementation that used the OBJECTTABLE function for transforming the object into a row in the result set. This column is not required and can be excluded (or removed) if modeling the object source table.
> This column also causes WARNING to show up in the server log because it is assumed by the engine to be part of materialization. However, this column is not updatable and can be excluded in materialization by not specifying it in the INSERT INTO statement.
> So to clean up all this, it would be good to stop adding the class object as a column in the source table. And the user can always add it back if they wish to use it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4297) Add UDF functions based on OSDQ for POC
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4297?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4297:
-------------------------------------
[~arunwizz] The particular one we were failing is servlet api jar from old jetty dependency. But in general profiler-core seems to be dependent variety of projects, I have only looked at my log, once I take look I will give more details.
> Add UDF functions based on OSDQ for POC
> ---------------------------------------
>
> Key: TEIID-4297
> URL: https://issues.jboss.org/browse/TEIID-4297
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: 9.1
>
>
> Please add following UDF functions to Teiid library based on maven module
> http://search.maven.org/#search%7Cga%7C1%7Carrahtec
> The UDF functions needs to from this class below
> {code}
> public class Maskutil {
> /**
> * @param a
> * The string that need to randomize
> * vivek singh' will become 'ihg vkeivh'
> */
> public static String toRandomValue(String a) {
> return ShuffleRTM.shuffleString(a);
> }
> /**
> * @param a
> * This function will retrun MD5 hashcode of the string
> * @return String
> */
> public static String toHashValue(String a) {
> if (a == null)
> return "d41d8cd98f00b204e9800998ecf8427e"; // null MD5 value
> return ResultsetToRTM.getMD5(a).toString();
> }
> /**
> * @param a
> * This function will return digit characters of the string
> * @return
> *
> */
> public static String toDigitValue(String a) {
> return StringCaseFormatUtil.digitString(a);
> }
> }
> {code}
> for example Teiid should have UDF functions like
> {code}
> string random(string)
> string hash(string)
> string digit(string)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4319) Deprecate automatically adding of the class object to the source table
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4319?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4319:
------------------------------------
As for deprecating, I think a translator-override should be added that would trigger the inclusion of Object column when the metadata is reverse engineered. This would enable backwards compatibility. But most likely, no one is using this column since the logic was changed to not need the OBJECTTABLE in order to transform the object to a row.
> Deprecate automatically adding of the class object to the source table
> ----------------------------------------------------------------------
>
> Key: TEIID-4319
> URL: https://issues.jboss.org/browse/TEIID-4319
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors
> Affects Versions: 9.x
> Reporter: Van Halbert
> Assignee: Van Halbert
>
> If the source model is not defined with the metadata, but allowing the infinispan (object) translator to reverse engineer the metadata from the cache object class, the process will add a column that represents the cache object. This is a holdover from the original implementation that used the OBJECTTABLE function for transforming the object into a row in the result set. This column is not required and can be excluded (or removed) if modeling the object source table.
> This column also causes WARNING to show up in the server log because it is assumed by the engine to be part of materialization. However, this column is not updatable and can be excluded in materialization by not specifying it in the INSERT INTO statement.
> So to clean up all this, it would be good to stop adding the class object as a column in the source table. And the user can always add it back if they wish to use it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4343) Impala Translator - With Clause Support
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4343?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4343:
---------------------------------------
This does appear to be a driver issue. A related issue is https://issues.cloudera.org/browse/IMPALA-2611 which refers to this being fixed with the 2.5.30 driver - at least for a different style of query. Can you confirm if this has been addressed with a later driver? If not, an issue will be needed on the impala side. We can also narrow the capabilities of the impala translator to not support the with clause if this is a pervasive issue.
> Impala Translator - With Clause Support
> ---------------------------------------
>
> Key: TEIID-4343
> URL: https://issues.jboss.org/browse/TEIID-4343
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.13.3
> Reporter: Scott Wallace
> Assignee: Steven Hawkins
> Fix For: 9.1
>
>
> I'm getting an error using the With clause in Teiid connecting to Impala
> {code}
> with t as (select * from schema_name.table_name)
> select * from t;
> {code}
> Error:
> {code}
> org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 warehouse: 11300 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: WITH t (col1, col2, col3) AS (SELECT g_0.`col1`, g_0.`col2`, g_0.`col3` FROM schema_name.table_name g_0) SELECT g_0.col1, g_0.col2, g_0.col3 FROM t g_0]
> Elapsed Time: 0 hr, 0 min, 0 sec, 841 ms.
> {code}
> Full error stack:
> {code}
> 14:37:35,491 INFO [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ImpalaExecutionFactory Commit=true;DatabaseProductName=Impala;DatabaseProductVersion=2.5.0-cdh5.7.0;DriverMajorVersion=2;DriverMajorVersion=5;DriverName=ImpalaJDBC;DriverVersion=02.05.31.1051;IsolationLevel=1
> 14:37:35,516 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Connector worker process failed for atomic-request=u1RZzQGciJra.0.1.0: org.teiid.translator.jdbc.JDBCExecutionException: 11300 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: WITH t (col1, col2, col3) AS (SELECT g_0.`col1`, g_0.`col2`, g_0.`col3` FROM schema_name.table_name g_0) SELECT g_0.col1, g_0.col2, g_0.col3 FROM t g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.13.3.jar:8.13.3]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_91]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_91]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_91]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_91]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy29.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> 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) [rt.jar:1.8.0_91]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_91]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_91]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
> Caused by: java.sql.SQLDataException: [Simba][JDBC](11300) A ResultSet was expected but not generated from query "WITH t (col1, col2, col3) AS (SELECT g_0.`col1`, g_0.`col2`, g_0.`col3` FROM schema_name.table_name g_0) SELECT g_0.col1, g_0.col2, g_0.col3 FROM t g_0". Query not executed.
> at com.cloudera.exceptions.ExceptionConverter.toSQLException(Unknown Source)
> at com.cloudera.jdbc.common.SStatement.checkCondition(Unknown Source)
> at com.cloudera.jdbc.common.SPreparedStatement.executeWithParams(Unknown Source)
> at com.cloudera.jdbc.common.SPreparedStatement.executeQuery(Unknown Source)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.13.3.jar:8.13.3]
> ... 18 more
> {code}
> Taking the prepared statement and executing against Impala directly, succeeds without any issues.
> Is the With clause supported in the Impala translator?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4297) Add UDF functions based on OSDQ for POC
by Arun Yadav (JIRA)
[ https://issues.jboss.org/browse/TEIID-4297?page=com.atlassian.jira.plugin... ]
Arun Yadav commented on TEIID-4297:
-----------------------------------
Hi [~rareddy] - Can you please share details about conflicting jars or jenkin logs? we can review and see if it can be avoided.
> Add UDF functions based on OSDQ for POC
> ---------------------------------------
>
> Key: TEIID-4297
> URL: https://issues.jboss.org/browse/TEIID-4297
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: 9.1
>
>
> Please add following UDF functions to Teiid library based on maven module
> http://search.maven.org/#search%7Cga%7C1%7Carrahtec
> The UDF functions needs to from this class below
> {code}
> public class Maskutil {
> /**
> * @param a
> * The string that need to randomize
> * vivek singh' will become 'ihg vkeivh'
> */
> public static String toRandomValue(String a) {
> return ShuffleRTM.shuffleString(a);
> }
> /**
> * @param a
> * This function will retrun MD5 hashcode of the string
> * @return String
> */
> public static String toHashValue(String a) {
> if (a == null)
> return "d41d8cd98f00b204e9800998ecf8427e"; // null MD5 value
> return ResultsetToRTM.getMD5(a).toString();
> }
> /**
> * @param a
> * This function will return digit characters of the string
> * @return
> *
> */
> public static String toDigitValue(String a) {
> return StringCaseFormatUtil.digitString(a);
> }
> }
> {code}
> for example Teiid should have UDF functions like
> {code}
> string random(string)
> string hash(string)
> string digit(string)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4347) ORDER BY fails with a subselect containing UNION ALL
by Salvatore R (JIRA)
[ https://issues.jboss.org/browse/TEIID-4347?page=com.atlassian.jira.plugin... ]
Salvatore R commented on TEIID-4347:
------------------------------------
Great, thanks a lot.
> ORDER BY fails with a subselect containing UNION ALL
> ----------------------------------------------------
>
> Key: TEIID-4347
> URL: https://issues.jboss.org/browse/TEIID-4347
> Project: Teiid
> Issue Type: Bug
> Reporter: Salvatore R
> Assignee: Steven Hawkins
>
> Running the following query:
> {code:sql}
> select s from
> (
> select 1 as o, 'a' as s
> union all
> select 0 as o, 'b' as s
> )f order by f.o
> {code}
> throws java.lang.ArrayIndexOutOfBoundsException.
> It looks like the bug occurs only if the element used in the order by clause is not projected in the SELECT. In fact, this query works correctly:
> {code:sql}
> select s from
> (
> select 1 as o, 'a' as s
> union all
> select 0 as o, 'b' as s
> )f order by f.s
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4347) ORDER BY fails with a subselect containing UNION ALL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4347?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4347.
-----------------------------------
Resolution: Duplicate Issue
Thanks. This is a duplicate of TEIID-3858
> ORDER BY fails with a subselect containing UNION ALL
> ----------------------------------------------------
>
> Key: TEIID-4347
> URL: https://issues.jboss.org/browse/TEIID-4347
> Project: Teiid
> Issue Type: Bug
> Reporter: Salvatore R
> Assignee: Steven Hawkins
>
> Running the following query:
> {code:sql}
> select s from
> (
> select 1 as o, 'a' as s
> union all
> select 0 as o, 'b' as s
> )f order by f.o
> {code}
> throws java.lang.ArrayIndexOutOfBoundsException.
> It looks like the bug occurs only if the element used in the order by clause is not projected in the SELECT. In fact, this query works correctly:
> {code:sql}
> select s from
> (
> select 1 as o, 'a' as s
> union all
> select 0 as o, 'b' as s
> )f order by f.s
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months