[JBoss JIRA] (TEIID-5076) Couchbase update syntax error
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5076?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5076:
---------------------------------------
> Is there a way how to check in Teiid whether it is not the documentID column being updated?
Yes, you can use the changing variable or even compare new.documentID to old.documentID.
> Couchbase update syntax error
> -----------------------------
>
> Key: TEIID-5076
> URL: https://issues.jboss.org/browse/TEIID-5076
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> There is an issue with UPDATE queries.
> For a query:
> {code:sql}
> UPDATE SmallA SET StringNum = NULL WHERE IntNum > 0
> {code}
> following error is returned:
> {code}
> Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 Source: Query did not complete successfully: [{"msg":"syntax error - at (","code":3000}], error code: fatal
> {code}
> The query being pushed is invalid:
> {code:sql}
> UPDATE `dvqe_crud` USE KEYS '1' SET META(`dvqe_crud`).id = '1', `StringKey` = '1', `IntNum` = 1417293, `StringNum` = NULL, `FloatNum` = 14735.7998046875, `LongN um` = 826580, `DoubleNum` = -1098869.04, `ByteNum` = 15, `DateValue` = '2006-03-06', `TimeValue` = '10:57:23', `TimestampValue` = NULL, `BooleanValue` = TRUE, `CharValue` = '2', `ShortValue` = 5303, `BigIn tegerValue` = 608932, `BigDecimalValue` = 1229956.01, `ObjectValue` = '-70' WHERE `dvqe_crud`.`type` = 'nullSmallA' RETURNING META(`dvqe_crud`).id AS PK
> {code}
> Couchbase complains about a '('. And from what I found, it is the first use of META() function in the command.
> On that topic I've found a note in Couchbase docs:
> bq. Every document is identified by a document ID, which can be automatically generated (as a UUID) or determined by the application; the only constraints are that it must be unique within the database, and it can't be changed.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5077) Couchbase strange behaviour for long numbers
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5077?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5077:
---------------------------------------
> Modelling of the column as string on Couchbase's side and defining a view
I don't see from that posting that the Couchbase client is to blame, but potentially other JSON parsers - has it been confirmed that this directly affects our Couchbase usage. Also does the proposed workaround actually work? If the view contains a conversion to biginteger/long, that would currently be pushed to couchbase as the to_number function and if there is an issue with the json serialization/deserialization in the Couchbase client, you'd seemingly still hit the issue.
> Couchbase strange behaviour for long numbers
> --------------------------------------------
>
> Key: TEIID-5077
> URL: https://issues.jboss.org/browse/TEIID-5077
> Project: Teiid
> Issue Type: Bug
> Components: Documentation, Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
>
> There is a strange limitation for storing large numbers (e.g. modelled as long) in Couchbase.
> https://forums.couchbase.com/t/strange-behavior-when-saving-big-long-numb...
> The same behaviour with value: 28341791043587382
> which is being stored and retreived as: 28341791043587384
> I feel we need to document this behaviour and provide hints how to overcome it. (Modelling of the column as string on Couchbase's side and defining a view).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5077) Couchbase strange behaviour for long numbers
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5077:
----------------------------------
Summary: Couchbase strange behaviour for long numbers
Key: TEIID-5077
URL: https://issues.jboss.org/browse/TEIID-5077
Project: Teiid
Issue Type: Bug
Components: Documentation, Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Critical
There is a strange limitation for storing large numbers (e.g. modelled as long) in Couchbase.
https://forums.couchbase.com/t/strange-behavior-when-saving-big-long-numb...
The same behaviour with value: 28341791043587382
which is being stored and retreived as: 28341791043587384
I feel we need to document this behaviour and provide hints how to overcome it. (Modelling of the column as string on Couchbase's side and defining a view).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5076) Couchbase update syntax error
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5076?page=com.atlassian.jira.plugin... ]
Jan Stastny updated TEIID-5076:
-------------------------------
Priority: Major (was: Blocker)
> Couchbase update syntax error
> -----------------------------
>
> Key: TEIID-5076
> URL: https://issues.jboss.org/browse/TEIID-5076
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> There is an issue with UPDATE queries.
> For a query:
> {code:sql}
> UPDATE SmallA SET StringNum = NULL WHERE IntNum > 0
> {code}
> following error is returned:
> {code}
> Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 Source: Query did not complete successfully: [{"msg":"syntax error - at (","code":3000}], error code: fatal
> {code}
> The query being pushed is invalid:
> {code:sql}
> UPDATE `dvqe_crud` USE KEYS '1' SET META(`dvqe_crud`).id = '1', `StringKey` = '1', `IntNum` = 1417293, `StringNum` = NULL, `FloatNum` = 14735.7998046875, `LongN um` = 826580, `DoubleNum` = -1098869.04, `ByteNum` = 15, `DateValue` = '2006-03-06', `TimeValue` = '10:57:23', `TimestampValue` = NULL, `BooleanValue` = TRUE, `CharValue` = '2', `ShortValue` = 5303, `BigIn tegerValue` = 608932, `BigDecimalValue` = 1229956.01, `ObjectValue` = '-70' WHERE `dvqe_crud`.`type` = 'nullSmallA' RETURNING META(`dvqe_crud`).id AS PK
> {code}
> Couchbase complains about a '('. And from what I found, it is the first use of META() function in the command.
> On that topic I've found a note in Couchbase docs:
> bq. Every document is identified by a document ID, which can be automatically generated (as a UUID) or determined by the application; the only constraints are that it must be unique within the database, and it can't be changed.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5076) Couchbase update syntax error
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5076?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-5076:
------------------------------------
[~shawkins]
I'll lower the priority for this issue, as this was caused by updating the column directly in my INSTEAD OF UPDATE trigger.
Is there a way how to check in Teiid whether it is not the documentID column being updated? If there is, it'd be more convenient to throw an exception for such update.
> Couchbase update syntax error
> -----------------------------
>
> Key: TEIID-5076
> URL: https://issues.jboss.org/browse/TEIID-5076
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
>
> There is an issue with UPDATE queries.
> For a query:
> {code:sql}
> UPDATE SmallA SET StringNum = NULL WHERE IntNum > 0
> {code}
> following error is returned:
> {code}
> Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 Source: Query did not complete successfully: [{"msg":"syntax error - at (","code":3000}], error code: fatal
> {code}
> The query being pushed is invalid:
> {code:sql}
> UPDATE `dvqe_crud` USE KEYS '1' SET META(`dvqe_crud`).id = '1', `StringKey` = '1', `IntNum` = 1417293, `StringNum` = NULL, `FloatNum` = 14735.7998046875, `LongN um` = 826580, `DoubleNum` = -1098869.04, `ByteNum` = 15, `DateValue` = '2006-03-06', `TimeValue` = '10:57:23', `TimestampValue` = NULL, `BooleanValue` = TRUE, `CharValue` = '2', `ShortValue` = 5303, `BigIn tegerValue` = 608932, `BigDecimalValue` = 1229956.01, `ObjectValue` = '-70' WHERE `dvqe_crud`.`type` = 'nullSmallA' RETURNING META(`dvqe_crud`).id AS PK
> {code}
> Couchbase complains about a '('. And from what I found, it is the first use of META() function in the command.
> On that topic I've found a note in Couchbase docs:
> bq. Every document is identified by a document ID, which can be automatically generated (as a UUID) or determined by the application; the only constraints are that it must be unique within the database, and it can't be changed.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5076) Couchbase update syntax error
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5076?page=com.atlassian.jira.plugin... ]
Jan Stastny updated TEIID-5076:
-------------------------------
Affects Version/s: 8.12.x-6.4
> Couchbase update syntax error
> -----------------------------
>
> Key: TEIID-5076
> URL: https://issues.jboss.org/browse/TEIID-5076
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
>
> There is an issue with UPDATE queries.
> For a query:
> {code:sql}
> UPDATE SmallA SET StringNum = NULL WHERE IntNum > 0
> {code}
> following error is returned:
> {code}
> Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 Source: Query did not complete successfully: [{"msg":"syntax error - at (","code":3000}], error code: fatal
> {code}
> The query being pushed is invalid:
> {code:sql}
> UPDATE `dvqe_crud` USE KEYS '1' SET META(`dvqe_crud`).id = '1', `StringKey` = '1', `IntNum` = 1417293, `StringNum` = NULL, `FloatNum` = 14735.7998046875, `LongN um` = 826580, `DoubleNum` = -1098869.04, `ByteNum` = 15, `DateValue` = '2006-03-06', `TimeValue` = '10:57:23', `TimestampValue` = NULL, `BooleanValue` = TRUE, `CharValue` = '2', `ShortValue` = 5303, `BigIn tegerValue` = 608932, `BigDecimalValue` = 1229956.01, `ObjectValue` = '-70' WHERE `dvqe_crud`.`type` = 'nullSmallA' RETURNING META(`dvqe_crud`).id AS PK
> {code}
> Couchbase complains about a '('. And from what I found, it is the first use of META() function in the command.
> On that topic I've found a note in Couchbase docs:
> bq. Every document is identified by a document ID, which can be automatically generated (as a UUID) or determined by the application; the only constraints are that it must be unique within the database, and it can't be changed.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5014) Unable to use parameterized query with node pg module and Teiid/JBoss VDB
by Johnathon Lee (JIRA)
[ https://issues.jboss.org/browse/TEIID-5014?page=com.atlassian.jira.plugin... ]
Johnathon Lee updated TEIID-5014:
---------------------------------
Fix Version/s: 8.12.13.6_3
> Unable to use parameterized query with node pg module and Teiid/JBoss VDB
> -------------------------------------------------------------------------
>
> Key: TEIID-5014
> URL: https://issues.jboss.org/browse/TEIID-5014
> Project: Teiid
> Issue Type: Bug
> Components: ODBC
> Affects Versions: 8.7.11.6_2
> Environment: Teiid runtime 8.7.11
> JBoss Data Virtualization 6.10
> NodeJS 6.9.4
> node pg 6.4.1
> Mac OSX 10.11.6
> Reporter: Brian M
> Assignee: Steven Hawkins
> Fix For: 10.0, 9.2.6, 9.3.3, 8.12.13.6_3
>
>
> When using node pg 6.4.1 in a node application to connect to a JBoss VDB with Teiid, we are unable to successfully return data with a parameterized query.
> Example from node js application (failure):
> client.query("SELECT * FROM records WHERE recordType = $1", ['TYPE1'], function(err, result) { done(); })
> The above code will actually retrieve rows of data, but the connection will be terminated unexpectedly from the JBoss side, thus resulting in a failure. We can confirm though that the parameter is properly inserted into the variable, and rows of data can be retrieved without issue.
> Also, we have confirmed that when sending a static query, we are able to successfully return data without JBoss terminating the connection. We found this approach from the Teiid blog: http://teiid.blogspot.com/2013/02/access-teiid-from-nodejs.html
> Example from node js application (success):
> client.query("SELECT * FROM records WHERE recordType = 'TYPE1'", function(err, result) { done(); })
> Is there something different about a parameterized query vs. a static query that may cause this issue?
> Are you aware of other individuals who have successfully used parameterized queries with the node pg module and Teiid/JBoss VDB?
> Is it possible that how the ODBC settings for Teiid are configured may have an impact on parameterized queries vs. static queries?
> Link: https://teiid.gitbooks.io/documents/content/client-dev/ODBC_Support.html
> Thank you so much for all your help!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5075) Couchbase incorrect update count returned
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5075?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5075.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.4
Resolution: Done
Made the corrections from the last comment.
> Couchbase incorrect update count returned
> -----------------------------------------
>
> Key: TEIID-5075
> URL: https://issues.jboss.org/browse/TEIID-5075
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 10.0, 8.12.x-6.4, 9.3.4
>
>
> # For a bulk insert query:
> {code:sql}
> INSERT INTO SmallA (IntKey, StringKey) VALUES (100, '100'),(101, '101'),(102, '102'),(103, '103')
> {code}
> update row count is 1 even though all 4 rows are inserted correctly into database.
> # For a delete query:
> {code:sql}
> DELETE FROM SmallA WHERE StringKey=101;
> {code}
> returned 'deleted number of rows' is 0, though the row was deleted from database.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years