[JBoss JIRA] (TEIID-5051) UUID translating
by Lukáš Svačina (JIRA)
[ https://issues.jboss.org/browse/TEIID-5051?page=com.atlassian.jira.plugin... ]
Lukáš Svačina updated TEIID-5051:
---------------------------------
Description:
Postgresql translator replaces source's `uuid` datatype for `Object`. So teiid (by default without custom casting) is unable to sort/condition views on such a field.
String might be better than Object.
was:
Postgresql translator replaces source's `uuid` datatype for `Object`. So teiid is unable to sort/condition views by default without custom casting.
String might be better than Object.
> UUID translating
> ----------------
>
> Key: TEIID-5051
> URL: https://issues.jboss.org/browse/TEIID-5051
> Project: Teiid
> Issue Type: Bug
> Reporter: Lukáš Svačina
> Assignee: Steven Hawkins
>
> Postgresql translator replaces source's `uuid` datatype for `Object`. So teiid (by default without custom casting) is unable to sort/condition views on such a field.
> String might be better than Object.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5051) UUID translating
by Lukáš Svačina (JIRA)
Lukáš Svačina created TEIID-5051:
------------------------------------
Summary: UUID translating
Key: TEIID-5051
URL: https://issues.jboss.org/browse/TEIID-5051
Project: Teiid
Issue Type: Bug
Reporter: Lukáš Svačina
Assignee: Steven Hawkins
Postgresql translator replaces source's `uuid` datatype for `Object`. So teiid is unable to sort/condition views by default without custom casting.
String might be better than Object.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5050) CLOB instead of STRING
by Lukáš Svačina (JIRA)
Lukáš Svačina created TEIID-5050:
------------------------------------
Summary: CLOB instead of STRING
Key: TEIID-5050
URL: https://issues.jboss.org/browse/TEIID-5050
Project: Teiid
Issue Type: Bug
Reporter: Lukáš Svačina
Assignee: Steven Hawkins
Postgresql translator should replace source's datatype `text` for `clob` instead of `string(4000)` by default.
In general teiid should be able to handle any input source without data corruption. So if source's column datatype doesn't fit into string(4000), it should use some kind of unlimited datatype e.g. `clob`.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5049) CLOB instead of STRING
by Lukáš Svačina (JIRA)
Lukáš Svačina created TEIID-5049:
------------------------------------
Summary: CLOB instead of STRING
Key: TEIID-5049
URL: https://issues.jboss.org/browse/TEIID-5049
Project: Teiid
Issue Type: Bug
Reporter: Lukáš Svačina
Assignee: Steven Hawkins
Postgresql translator should replace source's datatype `text` for `clob` instead of `string(4000)` by default.
In general teiid should be able to handle any input source without data corruption. So if source's column datatype doesn't fit into string(4000), it should use some kind of unlimited datatype e.g. `clob`.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5039) Couchbase document type definition for a table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5039?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5039.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
Expanded the use of the typedname pair to account for update scenarios - that is if not specified the value will be assumed and if specified you cannot modify or insert a value that does match the expected type.
> Couchbase document type definition for a table
> ----------------------------------------------
>
> Key: TEIID-5039
> URL: https://issues.jboss.org/browse/TEIID-5039
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 10.0, 8.12.x-6.4, 9.3.3
>
>
> If a table is tight to a single document type, there shouldn't be need for explicit type column assignment when inserting into that table.
> With a vdb:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> {code}
> I'd like to insert using such query:
> {code:sql|title=query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum) VALUES (1, '1', 1, '1');
> {code}
> And then getting the value back using
> {code:sql|title=query_select}
> SELECT * FROM Source.SmallA
> {code}
> to see the row I inserted.
> Everything without the need to explicitly set 'type' column for the insert query.
> There is missing 1-to-1 relation between a defined FOREIGN table and a document type in couchbase. (When I INSERT into a table in Teiid, there should be clear distiction about what type of document I am inserting and to what keyspace). Possibly the OPTION "teiid_couchbase:NAMEDTYPEPAIR" can serve this purpose, if it works that way for selects, why not for inserts.
> I see this as an usability blocker, when user has to set 'type' explicitly in every single insert.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5042) Couchbase supported data types restriction issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5042?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5042.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
Corrected the logic so that unsupported type values are not silently ignored - they will instead throw an exception at insert time. The documentation will be updated to highlight the supported types.
> Couchbase supported data types restriction issues
> -------------------------------------------------
>
> Key: TEIID-5042
> URL: https://issues.jboss.org/browse/TEIID-5042
> 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.3
>
>
> # Couchbase translator supports only subset of supported datatypes in Teiid:
> ??All supported type in a Couchbase JSON item: null, String, Integer, Long, Double, BigInteger, BigDecimal, JsonObject, JsonArray??
> #* this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
> # Couchbase leaves out silently the columns with unsupported data types in INSERTs.
> #* See the example in bottom of description.
> # documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
> Example:
> For a source model DDL:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
> {code}
> and query
> {code:sql|title=INSERT query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5);
> {code}
> there is incorrect source command being pushed to couchbase. The float column is not being pushed at all, no warning appears.
> {code:title=teiid-command.log}
> 14:49:37,061 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) ReyS5USI/FcT START USER COMMAND: startTime=2017-08-29 14:49:37.061 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT applicationName=JDBC principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5)
> 14:49:38,375 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT START DATA SRC COMMAND: startTime=2017-08-29 14:49:38.375 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum, DoubleNum, FloatNum, LongNum) VALUES ('4', '1', 1, '1', 5.0, 5.0, 5)
> 14:49:38,380 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT SOURCE SRC COMMAND: endTime=2017-08-29 14:49:38.38 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sourceCommand=[INSERT INTO `dvqe_crud` (KEY, VALUE) VALUES ('4', {"DoubleNum":5.0,"IntNum":1,"LongNum":5,"StringNum":"1","StringKey":"1"}) RETURNING META(`dvqe_crud`).id AS PK]
> 14:49:38,962 DEBUG [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue151) ReyS5USI/FcT END SRC COMMAND: endTime=2017-08-29 14:49:38.962 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security finalRowCount=1 cpuTime(ns)=12306369
> 14:49:38,966 INFO [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue152) ReyS5USI/FcT END USER COMMAND: endTime=2017-08-29 14:49:38.966 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5039) Couchbase document type definition for a table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5039?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5039:
----------------------------------
Issue Type: Bug (was: Enhancement)
Component/s: Misc. Connectors
Priority: Blocker (was: Major)
I don't think it was clear on reading this that the implication of leaving the type off is that the insert still succeeds, but that it then doesn't appear in the source table - due to the type value not being set on the document.
> Couchbase document type definition for a table
> ----------------------------------------------
>
> Key: TEIID-5039
> URL: https://issues.jboss.org/browse/TEIID-5039
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
>
> If a table is tight to a single document type, there shouldn't be need for explicit type column assignment when inserting into that table.
> With a vdb:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> {code}
> I'd like to insert using such query:
> {code:sql|title=query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum) VALUES (1, '1', 1, '1');
> {code}
> And then getting the value back using
> {code:sql|title=query_select}
> SELECT * FROM Source.SmallA
> {code}
> to see the row I inserted.
> Everything without the need to explicitly set 'type' column for the insert query.
> There is missing 1-to-1 relation between a defined FOREIGN table and a document type in couchbase. (When I INSERT into a table in Teiid, there should be clear distiction about what type of document I am inserting and to what keyspace). Possibly the OPTION "teiid_couchbase:NAMEDTYPEPAIR" can serve this purpose, if it works that way for selects, why not for inserts.
> I see this as an usability blocker, when user has to set 'type' explicitly in every single insert.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months
[JBoss JIRA] (TEIID-5039) Couchbase document type definition for a table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5039?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5039:
----------------------------------
Priority: Major (was: Blocker)
Dropping the severity given the workaround of specifying the type.
> Couchbase document type definition for a table
> ----------------------------------------------
>
> Key: TEIID-5039
> URL: https://issues.jboss.org/browse/TEIID-5039
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> If a table is tight to a single document type, there shouldn't be need for explicit type column assignment when inserting into that table.
> With a vdb:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> {code}
> I'd like to insert using such query:
> {code:sql|title=query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum) VALUES (1, '1', 1, '1');
> {code}
> And then getting the value back using
> {code:sql|title=query_select}
> SELECT * FROM Source.SmallA
> {code}
> to see the row I inserted.
> Everything without the need to explicitly set 'type' column for the insert query.
> There is missing 1-to-1 relation between a defined FOREIGN table and a document type in couchbase. (When I INSERT into a table in Teiid, there should be clear distiction about what type of document I am inserting and to what keyspace). Possibly the OPTION "teiid_couchbase:NAMEDTYPEPAIR" can serve this purpose, if it works that way for selects, why not for inserts.
> I see this as an usability blocker, when user has to set 'type' explicitly in every single insert.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 7 months