Compare commits

...

1 Commits

Author SHA1 Message Date
hwang
58fd0160a4 bugfix(TUP-27062):String Datatype Created by Guess Schema When Accessing
an Impala Double Field
2020-05-27 17:27:38 +08:00
2 changed files with 9 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ import org.apache.commons.collections.map.MultiValueMap;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.model.metadata.types.DBTypeUtil;
import org.talend.core.model.metadata.types.JavaTypesManager;
import org.talend.core.prefs.ITalendCorePrefConstants;
@@ -298,9 +299,13 @@ public class MappingTypeRetriever {
return MetadataTalendType.getDefaultTalendType();
}
}
IEclipsePreferences corePluginNode = new InstanceScope().getNode(ITalendCorePrefConstants.CoreUIPlugin_ID);
if (!corePluginNode.getBoolean(ITalendCorePrefConstants.FORBIDDEN_MAPPING_LENGTH_PREC_LOGIC, false)) {
TalendTypePreLenRetriever talendTypePre = new TalendTypePreLenRetriever(mappingTypeOrigin, length, precison);
if(dbms.getProduct() != null && EDatabaseTypeName.IMPALA.getProduct().equals(dbms.getProduct())) {
talendTypePre.setMappingType(mappingTypeOrigin.getTalendType());
}
String mappingType = talendTypePre.getMappingType();
if (listMappingtype != null && listMappingtype.size() != 0) {
for (MappingType type : listMappingtype) {

View File

@@ -68,4 +68,8 @@ public class TalendTypePreLenRetriever {
return this.talendTypeNew;
}
public void setMappingType(String talendTypeNew ) {
this.talendTypeNew = talendTypeNew;
}
}