[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Van Halbert commented on TEIIDDES-2061:
---------------------------------------
What is the resolution for reading all the char[n] 's? If you say they have to be read as Strings, I would think then the importer should use string, instead of char[1]. Unless, under the covers, char[1] will really be a string that is used.
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Bug
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Assignee: Barry LaFond
> Fix For: 8.4, 8.3.2
>
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Barry LaFond updated TEIIDDES-2061:
-----------------------------------
Issue Type: Bug (was: Feature Request)
Fix Version/s: 8.4
8.3.2
Assignee: Barry LaFond
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Bug
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Assignee: Barry LaFond
> Fix For: 8.4, 8.3.2
>
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Steven Hawkins commented on TEIIDDES-2061:
------------------------------------------
> So it looks like the issue here is Designer needs to recognize a char datatype as a single character with length of 1.
Yes it needs to recognize the Teiid char type is a single character.
1/2 look good as a resolution.
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Barry LaFond (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Barry LaFond commented on TEIIDDES-2061:
----------------------------------------
So it looks like the issue here is Designer needs to recognize a *char* datatype as a single character with length of 1.
1) Look at data-type managers and insure that mapping during import converts all *char* with *length > 1* to a type *string*
2) Create validation rule to flag any *char* values with *length > 1*
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Steven Hawkins commented on TEIIDDES-2061:
------------------------------------------
> Can't the change be made to just read all the characters?
There's still a misunderstanding. A Teiid char is a Java Character - it can hold at most a single character. So regardless of the value returned by the translator, the engine will attempt to coerce the value to a Character using our normal conversion rules.
char is an unfortunate (and unintentional) mismatch in data type terminology from the early days of MetaMatrix, where the runtime type model was initially assumed to be primitive/common Java types.
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Van Halbert commented on TEIIDDES-2061:
---------------------------------------
> Is this why the data is being truncated?
The engine will always attempt to convert the incoming data to the runtime datatypes. So yes we'll take the String value and convert it into a Character.
But currently, the importer is keeping the char. And it would seem then, when the char data is being read, it going from char to char. But only reading the first char, not all 'n'. Can't the change be made to just read all the characters? I realize there could be issues due to padding. But thats something that could be worked out.
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Steven Hawkins commented on TEIIDDES-2061:
------------------------------------------
> So is the issue with the importer, that it should be converting char[n] to String types, rather than char?
If it's importing as char, then yes that's an issue.
> Is this why the data is being truncated?
The engine will always attempt to convert the incoming data to the runtime datatypes. So yes we'll take the String value and convert it into a Character.
> If it is, just curious on how teiid handles querying the char[n] column that is an index?
The issue is well beyond just using an index. Depending upon the situation we'll either attempt to widen the column, or we'll use the narrowed comparison value. So issues abound when the type mapping is off.
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Van Halbert commented on TEIIDDES-2061:
---------------------------------------
So is the issue with the importer, that it should be converting char[n] to String types, rather than char? Is this why the data is being truncated?
If it is, just curious on how teiid handles querying the char[n] column that is an index? Cause it can't use a casting on the where clause, which would negate the index.
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIIDDES-2061) char[n+] field is truncated by importer
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIIDDES-2061?page=com.atlassian.jira.plu... ]
Steven Hawkins commented on TEIIDDES-2061:
------------------------------------------
Maybe the following will help:
The Teiid char type maps to a Java Character (most of the original runtime types were, like Hibernate, just representations of the Java type).
Only a char[1] database type should map to the Teiid char type.
Otherwise a char[n] database type should map to s Teiid string type.
Although, the lack of distinguishing between fixed and variable length strings does cause some issues for Teiid (memory management is harder, databases tend to return padded values, comparisons may require extra settings, etc.).
> char[n+] field is truncated by importer
> ---------------------------------------
>
> Key: TEIIDDES-2061
> URL: https://issues.jboss.org/browse/TEIIDDES-2061
> Project: Teiid Designer
> Issue Type: Feature Request
> Components: Import/Export
> Affects Versions: 8.3.1
> Reporter: Johnathon Lee
> Attachments: testErrors.vdb
>
>
> truncation of Char[>1] fields to one character.
> reproduction with simple VDB (to be attached):
> SELECT asChar,asVarChar,asInt FROM "TestErrors"."TruncateCHAR";
> the "asChar" field only returns a "C" and the asVarChar returns the complete value.
> That is the expected behavior, per the Data Virtualization Reference Manual, char datatype is a single Unicode character (java.lang.Character). However, the importer may need to check for the occurrence of char[n+] and not assume char[1].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month