[JBoss JIRA] (TEIID-3691) Add ability to set escape tokens within literals
by Don Krapohl (JIRA)
Don Krapohl created TEIID-3691:
----------------------------------
Summary: Add ability to set escape tokens within literals
Key: TEIID-3691
URL: https://issues.jboss.org/browse/TEIID-3691
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Don Krapohl
Assignee: Steven Hawkins
A mismatch of escape sequences exists between Teiid and some databases (Impala for sure). Teiid uses doubled up quotes for single/double whereas some databases expect C-style escapes like \' or \". When string literals are pushed down they fail to parse on the underlying database using Teiid's escapes.
Teiid uses multiple quotes to escape a single within a string literal. Example would be searching for the string literal Haggley's within single quotes. In Teiid the parser will fail with a parser error using any of these options:
* Surround with double quotes ("Haggley's")
* Escape with C-style escape ('Haggley\'s')
Making the query parse in Teiid the filter value would be 'Haggley''s'. When pushed down into the database this is not valid syntax and should be translated as 'Haggley\'s' or other escape sequence as appropriate to the underlying data store.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-3642) RhinoScriptEngineFactory be removed in Java 8
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3642?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-3642:
------------------------------------------------
Alex Szczuczko <aszczucz(a)redhat.com> changed the Status of [bug 1254399|https://bugzilla.redhat.com/show_bug.cgi?id=1254399] from MODIFIED to ON_QA
> RhinoScriptEngineFactory be removed in Java 8
> ----------------------------------------------
>
> Key: TEIID-3642
> URL: https://issues.jboss.org/browse/TEIID-3642
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Affects Versions: 8.7.1.6_2, 8.12
> Environment: * DV 6.2.0.ER4
> * Java 1.8.0_25
> Reporter: Kylin Soong
> Assignee: Steven Hawkins
>
> RhinoScriptEngineFactory be removed in Java 8, this cause OData war deploy output Error:
> {code}
> 09:30:51,315 WARN [org.jboss.as.dependency.unsupported] (MSC service thread 1-6) JBAS015868: Deployment "deployment.teiid-odata-8.7.1.6_2-redhat-2.war" is using an unsupported module ("org.joda.time:main") which may be changed or removed in future versions without notice.
> 09:30:51,424 ERROR [stderr] (MSC service thread 1-6) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> 09:30:51,429 ERROR [stderr] (MSC service thread 1-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> 09:30:51,505 ERROR [stderr] (MSC service thread 1-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> 09:30:51,513 ERROR [stderr] (MSC service thread 1-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> 09:30:51,583 ERROR [stderr] (MSC service thread 1-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
> {code}
> *OData war* depend on *org.joda.time*, *org.joda.time* depend on *RhinoScriptEngineFactory*, due to RhinoScriptEngineFactory be removed in Java 8, so stderr output in console.
> h3. how to reproduce
> Start DV 6.2 with Java 8.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-3681) Subquery field added in wrong place in generated JDBC SQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3681?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3681.
-----------------------------------
Resolution: Done
Corrected by having the assignment of output to access nodes check for the positioning of a project node and claiming any non-element symbol partial projections.
> Subquery field added in wrong place in generated JDBC SQL
> ---------------------------------------------------------
>
> Key: TEIID-3681
> URL: https://issues.jboss.org/browse/TEIID-3681
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.10
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> I'm using Teiid 8.11.3 and h2 translator:
> I have a query that contains a subquery field in the select statement and a join over another subquery. In the JDBC query executed, i found that the subquery field was added into the subquery join which is giving an error in execution.
> Here is my query:
> SELECT
> "Profile_fqS_030915"."CID" as "Profile_fqS_030915_CID"
> ,
> (
> SELECT
> MAX("Trx_fil_030915_sub"."TransactionDate") as "Trx_fil_030915_TransactionDa"
> FROM
> "implify_data_BanksModel"."implify_data_Banks"."Trx_fil_030915"
> "Trx_fil_030915_sub"
> WHERE
> ("Profile_fqS_030915"."CID" = "Trx_fil_030915_sub"."CID") ) as "SubQuery Trx" ,
> TIMESTAMPDIFF(SQL_TSI_DAY, "Trx"."TransactionDate", PARSETIMESTAMP( '2015-04-02 00:00:00.000', 'yyyy-MM-dd HH:mm:ss.SSS' )) as "CalculatedField2"
> ,
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_CalculatedField12" as
> "Trxmo3U_CalculatedField1"
> ,
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_CalculatedField3" as
> "Trxmo3U_CalculatedField"
> ,
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_CalculatedField11" as
> "Trxmo3U_CalculatedField11"
> ,
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_CalculatedField2" as
> "Trxmo3U_CalculatedField2"
> ,
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_CalculatedField1" as
> "Trxmo3U_CalculatedField12"
> ,
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_CalculatedField" as
> "Trxmo3U_CalculatedField3"
> FROM
> "implify_data_BanksModel"."implify_data_Banks"."Profile_fqS_030915"
> "Profile_fqS_030915"
> LEFT JOIN
> "implify_data_BanksModel"."implify_data_Banks"."Trx_fil_030915" "Trx"
> ON
> "Profile_fqS_030915"."CID" = "Trx"."CID"
> LEFT JOIN
> (
> SELECT
> "Trxmo3U_sub"."Trx_fil_030915_CID" as "Trxmo3U_Trx_fil_030915_CID"
> ,
> MIN("Trxmo3U_sub"."CalculatedField1") as "Trxmo3U_CalculatedField1"
> ,
> MIN("Trxmo3U_sub"."CalculatedField") as "Trxmo3U_CalculatedField"
> ,
> MAX("Trxmo3U_sub"."CalculatedField") as "Trxmo3U_CalculatedField2"
> ,
> MAX("Trxmo3U_sub"."CalculatedField1") as "Trxmo3U_CalculatedField11"
> ,
> AVG(1.0 * "Trxmo3U_sub"."CalculatedField") as "Trxmo3U_CalculatedField3"
> ,
> AVG(1.0 * "Trxmo3U_sub"."CalculatedField1") as "Trxmo3U_CalculatedField12"
> FROM
> "Domain1BusinessModel"."Trxmo3U" "Trxmo3U_sub"
> WHERE
> ( ( ("Trxmo3U_sub"."Trx_fil_030915_Channel" IN ('ATM'
> ,
> 'Branch'
> ,
> 'P.O.S.') ) ) )
> GROUP BY
> "Trxmo3U_sub"."Trx_fil_030915_CID") "Trxmo3UMEoebyXTVyguosX_Sub" ON
> "Profile_fqS_030915"."CID" =
> "Trxmo3UMEoebyXTVyguosX_Sub"."Trxmo3U_Trx_fil_030915_CID" LIMIT 0, 10
> Here is the executed JDBC query:
> SELECT
> g_0."CID" AS c_0,
> (
> SELECT
> MAX(g_4."TransactionDate")
> FROM
> "implify_data_Banks"."Trx_fil_030915" AS g_4
> WHERE
> g_4."CID" = g_0."CID") AS c_1 ,
> g_1."TransactionDate" AS c_2,
> v_0.c_2 AS c_3,
> v_0.c_3 AS c_4,
> v_0.c_4 AS c_5,
> v_0.c_5 AS c_6,
> v_0.c_6 AS c_7,
> v_0.c_7 AS c_8
> FROM
> ("implify_data_Banks"."Profile_fqS_030915" AS g_0
> LEFT OUTER JOIN
> "implify_data_Banks"."Trx_fil_030915" AS g_1
> ON
> g_0."CID" = g_1."CID")
> LEFT OUTER JOIN
> (
> SELECT
> g_2."Trx_fil_030915_CID" AS c_0
> ,
> *_(
> SELECT
> MAX(g_3."TransactionDate")
> FROM
> "implify_data_Banks"."Trx_fil_030915" AS g_3
> WHERE
> g_3."CID" = g_0."CID") AS c_1_* ,
> AVG((1.0 * cast(g_2."CalculatedField1" AS decimal))) AS c_2 ,
> AVG((1.0 * g_2."CalculatedField")) AS c_3 ,
> MAX(g_2."CalculatedField1") AS c_4 ,
> MAX(g_2."CalculatedField") AS c_5 ,
> MIN(g_2."CalculatedField1") AS c_6 ,
> MIN(g_2."CalculatedField") AS c_7
> FROM
> "implify_data_Banks"."Trxmo3U" AS g_2
> WHERE
> g_2."Trx_fil_030915_Channel" IN ('ATM', 'Branch', 'P.O.S.')
> GROUP BY
> g_2."Trx_fil_030915_CID") AS v_0 ON g_0."CID" = v_0.c_0 LIMIT 10
> Error:
> Please try again! TEIID30504 implify_data_BanksModelVDB: 42122 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: []
> Note that if i remove TIMESTAMPDIFF from the main query, the query executes without a problem and the subquery field is no longer added in the join subquery
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months
[JBoss JIRA] (TEIID-3690) Add a custom error page for rest war
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3690?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-3690:
-------------------------------------
Adding a custom page is of no use to the user. These services are not supposed to be for the consumption of the end user, but an application. So far we have depended upon the status code of the response to determine the success or failure of the request, to add detail, we can return error description in XML or JSON form like
{code}
<error>
<code>404</code>
<message>something went terribly wrong</message>
<details>may be stacktrace?</details>
</error>
{code}
similarly in the JSON, the type of error message need to depend upon the the "accepts" header, just like the request does and default is set to "application/xml" now.
> Add a custom error page for rest war
> ------------------------------------
>
> Key: TEIID-3690
> URL: https://issues.jboss.org/browse/TEIID-3690
> Project: Teiid
> Issue Type: Quality Risk
> Affects Versions: 8.12
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Fix For: 8.12
>
> Attachments: error-404.png, error-500.png
>
>
> As attached pictures:
> * Technical details are displayed when Exception occurs, which is not valuable to End User.
> * JBoss Web version be displayed as error page title and in foot, some users think this have security risk.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 6 months