Skip to content

Commit

Permalink
Revise based on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chenboat committed Nov 9, 2024
1 parent ad9a361 commit 84557ac
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,15 @@ private ExtraFieldsContainer processField(SchemaTreeNode parentNode, Deque<Strin
SchemaTreeNode currentNode = parentNode == null ? null : parentNode.getChild(key);
String unindexableFieldSuffix = _transformerConfig.getUnindexableFieldSuffix();
isIndexable = isIndexable && (null == unindexableFieldSuffix || !key.endsWith(unindexableFieldSuffix));
if (value == null) {
return extraFieldsContainer;
}
if (!(value instanceof Map)) {
// leaf node
if (!isIndexable && value != null) {
if (!isIndexable) {
extraFieldsContainer.addUnindexableEntry(key, value);
} else {
if (null != currentNode && currentNode.getValue(value) != null && currentNode.isColumn()) {
if (null != currentNode && currentNode.isColumn()) {
// In schema
outputRecord.putValue(currentNode.getColumnName(), currentNode.getValue(value));
if (_transformerConfig.getFieldsToDoubleIngest().contains(keyJsonPath)) {
Expand All @@ -414,7 +417,7 @@ private ExtraFieldsContainer processField(SchemaTreeNode parentNode, Deque<Strin
} else {
// The field is not mapped to one of the dedicated columns in the Pinot table schema. Thus it will be put
// into the extraField column of the table.
if (storeIndexableExtras && value != null) {
if (storeIndexableExtras) {
extraFieldsContainer.addIndexableEntry(key, value);
mergedTextIndexMap.put(keyJsonPath, value);
}
Expand Down

0 comments on commit 84557ac

Please sign in to comment.