[
https://issues.jboss.org/browse/TEIIDDES-995?page=com.atlassian.jira.plug...
]
Barry LaFond commented on TEIIDDES-995:
---------------------------------------
Debugging led me to the static initializer in RelationalTypeMappingImple class. In the
code below, only the Integer class is loaded into the SQL_TYPE_MAPPING map, but this map
is used by the getDatatype() method looks in this map. In this case VARCHAR is not in the
map. Removing the if() statement and allowing all types to be loaded in to map fixes
problem.
// This is a poor man's enum.
static {
Field[] fields = Types.class.getDeclaredFields();
for (Field field : fields) {
if (field.getType() == Integer.class) {
try {
SQL_TYPE_MAPPING.put(field.getName(), field.getInt(null));
} catch (Exception e) {
}
}
}
}
Importing metadata from text, VARCHAR is interpreted as OBJECT -
Should be character-based type
-----------------------------------------------------------------------------------------------
Key: TEIIDDES-995
URL:
https://issues.jboss.org/browse/TEIIDDES-995
Project: Teiid Designer
Issue Type: Bug
Components: Modeling
Affects Versions: 7.4
Environment: Designer 7.4 in Eclipse 3.6
Reporter: Paul Nittel
Attachments: Rows100BadTypes.png, TableWith100Rows.csv
I imported the attached CSV file into a relational source model. The NUMBERs translated
to bigdecimal, but the VARCHARs translated to objects. Should have been a character-based
type.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira