Do not allow realtime table creation if timeColumnName is null
Issue Do not allow realtime table creation if timeColumnName is null
@@ -35,6 +35,7 @@ import org.apache.pinot.spi.config.table.SegmentsValidationAndRetentionConfig;
import org.apache.pinot.spi.config.table.TableConfig;
import org.apache.pinot.spi.config.table.TableCustomConfig;
import org.apache.pinot.spi.config.table.TableTaskConfig;
+import org.apache.pinot.spi.config.table.TableType;
import org.apache.pinot.spi.config.table.TenantConfig;
import org.apache.pinot.spi.config.table.UpsertConfig;
import org.apache.pinot.spi.config.table.assignment.InstanceAssignmentConfig;
@@ -211,6 +212,9 @@ public class TableConfigUtils {
private static void validateValidationConfig(TableConfig tableConfig) {
SegmentsValidationAndRetentionConfig validationConfig = tableConfig.getValidationConfig();
if (validationConfig != null) {
+ if (tableConfig.getTableType() == TableType.REALTIME && validationConfig.getTimeColumnName() == null) {
+ throw new IllegalStateException("Must provide time column in real-time table config");
+ }
String peerSegmentDownloadScheme = validationConfig.getPeerSegmentDownloadScheme();
if (peerSegmentDownloadScheme != null) {
if (!"http".equalsIgnoreCase(peerSegmentDownloadScheme) && !"https".equalsIgnoreCase(peerSegmentDownloadScheme)) {
