Jackie-Jiang commented on code in PR #12648:
URL: https://github.com/apache/pinot/pull/12648#discussion_r1527886119
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java:
##########
@@ -368,17 +368,15 @@ protected boolean createColumnV1Indices(String column)
for (String argument : arguments) {
ColumnMetadata columnMetadata =
_segmentMetadata.getColumnMetadataFor(argument);
if (columnMetadata == null) {
- LOGGER.warn("Skip creating derived column: {} because argument:
{} does not exist in the segment", column,
- argument);
- if (errorOnFailure) {
- throw new RuntimeException(String.format(
- "Failed to create derived column: %s because argument: %s
does not exist in the segment", column,
- argument));
- }
- return false;
- }
- // TODO: Support creation of derived columns from forward index
disabled columns
- if (!_segmentWriter.hasIndexFor(argument,
StandardIndexes.forward())) {
+ // replace the transform function with the default value for the
derived column
+ String expression =
_schema.getFieldSpecFor(column).getDefaultNullValueString();
Review Comment:
You can simply short circuit it by invoking
`createDefaultValueColumnV1Indices(column)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]