[JBoss JIRA] (TEIID-2984) MongoDB: Usage of function "mod()" in SQL query throws an exception
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-2984?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-2984:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1104758|https://bugzilla.redhat.com/show_bug.cgi?id=1104758] from NEW to ASSIGNED
> MongoDB: Usage of function "mod()" in SQL query throws an exception
> -------------------------------------------------------------------
>
> Key: TEIID-2984
> URL: https://issues.jboss.org/browse/TEIID-2984
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4.1
> Reporter: Filip Elias
> Assignee: Ramesh Reddy
> Fix For: 8.7.1, 8.8
>
> Attachments: server.log
>
>
> Exception[1] is thrown when function modulo(mod) is used in SQL query.
> Sample query:
> SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM
> Server log is in the attachment.
> [1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2983) MongoDB: Function "count()" returns sum instead of number of rows
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2983?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2983:
---------------------------------------
Do you mean:
{code}select sum(1) from bar where foo is not null{code}
Is it possible to select more than one aggregate? If so, then this approach seems problematic.
> MongoDB: Function "count()" returns sum instead of number of rows
> -----------------------------------------------------------------
>
> Key: TEIID-2983
> URL: https://issues.jboss.org/browse/TEIID-2983
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7.1
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Labels: Beta1
> Fix For: 8.7.1, 8.8
>
>
> Function "count()" returns sum of rows instead of number of rows
> Query [1] returns sum of values of all rows of IntKey column.
> Query [2] correctly returns number of rows
>
> [1] SELECT COUNT(IntKey) FROM BQT1.SmallA
> [2] SELECT COUNT(*) FROM BQT1.SmallA
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2983) MongoDB: Function "count()" returns sum instead of number of rows
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2983?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-2983.
---------------------------------
Labels: Beta1 (was: )
Resolution: Done
Wrote rewriter such that
{code}
select count(foo) from bar
{code}
will be rewritten to
{code}
select count(*) from bar where foo is not null
{code}
> MongoDB: Function "count()" returns sum instead of number of rows
> -----------------------------------------------------------------
>
> Key: TEIID-2983
> URL: https://issues.jboss.org/browse/TEIID-2983
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7.1
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Labels: Beta1
> Fix For: 8.7.1, 8.8
>
>
> Function "count()" returns sum of rows instead of number of rows
> Query [1] returns sum of values of all rows of IntKey column.
> Query [2] correctly returns number of rows
>
> [1] SELECT COUNT(IntKey) FROM BQT1.SmallA
> [2] SELECT COUNT(*) FROM BQT1.SmallA
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2984) MongoDB: Usage of function "mod()" in SQL query throws an exception
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2984?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-2984.
---------------------------------
Resolution: Done
done, removed support
> MongoDB: Usage of function "mod()" in SQL query throws an exception
> -------------------------------------------------------------------
>
> Key: TEIID-2984
> URL: https://issues.jboss.org/browse/TEIID-2984
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4.1
> Reporter: Filip Elias
> Assignee: Ramesh Reddy
> Fix For: 8.7.1, 8.8
>
> Attachments: server.log
>
>
> Exception[1] is thrown when function modulo(mod) is used in SQL query.
> Sample query:
> SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM
> Server log is in the attachment.
> [1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2986) issues with embedded
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2986:
-------------------------------------
Summary: issues with embedded
Key: TEIID-2986
URL: https://issues.jboss.org/browse/TEIID-2986
Project: Teiid
Issue Type: Bug
Components: Embedded
Affects Versions: 8.7
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.7.1, 8.8
The dependency set for the ws translator is incomplete the cxf bundle jar and several other dependencies are needed.
We are not including the JBoss modules jar, but have an implied dependency through EmbeddedProfile, which should be refactored so that the modules jar is not needed in the embedded kit.
Also the classpaths in the example scripts are incorrect with the 8.7 refactoring to put optional dependencies in subfolders.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2984) MongoDB: Usage of function "mod()" in SQL query throws an exception
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2984?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-2984:
-------------------------------------
Looks like my understanding of MOD is incorrect in Mongo. It supports MOD function but also works as filter so it is more like
{code}
SELECT * FROM BQT1.SmallA where MOD(LongNum, 11) = 0
{code}
I will remove the function support for this
> MongoDB: Usage of function "mod()" in SQL query throws an exception
> -------------------------------------------------------------------
>
> Key: TEIID-2984
> URL: https://issues.jboss.org/browse/TEIID-2984
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4.1
> Reporter: Filip Elias
> Assignee: Ramesh Reddy
> Fix For: 8.7.1, 8.8
>
> Attachments: server.log
>
>
> Exception[1] is thrown when function modulo(mod) is used in SQL query.
> Sample query:
> SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM
> Server log is in the attachment.
> [1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2984) MongoDB: Usage of function "mod()" in SQL query throws an exception
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2984?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-2984:
--------------------------------
Fix Version/s: 8.7.1
8.8
> MongoDB: Usage of function "mod()" in SQL query throws an exception
> -------------------------------------------------------------------
>
> Key: TEIID-2984
> URL: https://issues.jboss.org/browse/TEIID-2984
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4.1
> Reporter: Filip Elias
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.8
>
> Attachments: server.log
>
>
> Exception[1] is thrown when function modulo(mod) is used in SQL query.
> Sample query:
> SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM
> Server log is in the attachment.
> [1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2984) MongoDB: Usage of function "mod()" in SQL query throws an exception
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2984?page=com.atlassian.jira.plugin... ]
Ramesh Reddy reassigned TEIID-2984:
-----------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> MongoDB: Usage of function "mod()" in SQL query throws an exception
> -------------------------------------------------------------------
>
> Key: TEIID-2984
> URL: https://issues.jboss.org/browse/TEIID-2984
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4.1
> Reporter: Filip Elias
> Assignee: Ramesh Reddy
> Fix For: 8.7.1, 8.8
>
> Attachments: server.log
>
>
> Exception[1] is thrown when function modulo(mod) is used in SQL query.
> Sample query:
> SELECT LongNum, 11, MOD(LongNum, 11) FROM BQT1.SmallA ORDER BY LONGNUM
> Server log is in the attachment.
> [1] 16:36:59,645 ERROR [org.teiid.CONNECTOR] (Worker10_QueryProcessorQueue71) Connector worker process failed for atomic-request=hRCP8hHjrmZb.25.0.13: com.mongodb.CommandFailureException: { "serverUsed" : "localhost/127.0.0.1:27017" , "errmsg" : "exception: disallowed field type Array in object expression (at 'mod')" , "code" : 15992 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (TEIID-2985) odbc script reader does not handle extra statement delimiters
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2985:
-------------------------------------
Summary: odbc script reader does not handle extra statement delimiters
Key: TEIID-2985
URL: https://issues.jboss.org/browse/TEIID-2985
Project: Teiid
Issue Type: Feature Request
Components: ODBC
Affects Versions: 7.7
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.7.1, 8.8
If sent the block of statements:
BEGIN;declare "SQL_CUR0x1e4ba50" cursor with hold for select * from pg_proc;;fetch 1 in "SQL_CUR0x1e4ba50"
We'll stop processing at the extra ; after the declare.
In older branches such as 7.7 we'll attempt to process an empty sql statement, which will throw an exception.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months