Github user QiangCai commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/635#discussion_r106844177
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/newflow/converter/impl/NonDictionaryFieldConverterImpl.java
---
@@ -48,23 +46,24 @@ public NonDictionaryFieldConverterImpl(DataField
dataField, String nullformat, i
this.isEmptyBadRecord = isEmptyBadRecord;
}
- @Override
- public void convert(CarbonRow row, BadRecordLogHolder logHolder) {
+ @Override public void convert(CarbonRow row, BadRecordLogHolder
logHolder) {
String dimensionValue = row.getString(index);
if (dimensionValue == null || dimensionValue.equals(nullformat)) {
- dimensionValue = CarbonCommonConstants.MEMBER_DEFAULT_VAL;
- }
- if (dataType != DataType.STRING) {
- if (null == DataTypeUtil.normalizeIntAndLongValues(dimensionValue,
dataType)) {
- if ((dimensionValue.length() > 0) || (dimensionValue.length() == 0
&& isEmptyBadRecord)) {
+ row.update(CarbonCommonConstants.MEMBER_DEFAULT_VAL_ARRAY, index);
+ } else {
+ try {
+ row.update(DataTypeUtil
+ .getBytesBasedOnDataTypeForNoDictionaryColumn(dimensionValue,
dataType), index);
+ } catch (Throwable ex) {
+ if (dimensionValue.length() != 0 || isEmptyBadRecord) {
--- End diff --
the same with
dimensionValue.length() != 0 || (dimensionValue.length() == 0 &&
isEmptyBadRecord)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---