richardstartin commented on a change in pull request #8343: URL: https://github.com/apache/pinot/pull/8343#discussion_r838836664
########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/ExpressionTransformer.java ########## @@ -65,6 +67,19 @@ public ExpressionTransformer(TableConfig tableConfig, Schema schema) { } } } + // For fields with Timestamp indexes, also generate the corresponding values during record transformation. + if (tableConfig.getFieldConfigList() != null) { + for (FieldConfig fieldConfig : tableConfig.getFieldConfigList()) { + if (fieldConfig.getIndexTypes().contains(FieldConfig.IndexType.TIMESTAMP)) { + for (TimestampIndexGranularity granularity : fieldConfig.getTimestampConfig().getGranularities()) { + expressionEvaluators.put( + TimestampIndexGranularity.getColumnNameWithGranularity(fieldConfig.getName(), granularity), + FunctionEvaluatorFactory.getExpressionEvaluator( + String.format("dateTrunc(\'%s\', %s)", granularity, fieldConfig.getName()))); Review comment: Concat instead? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org