Jackie-Jiang commented on a change in pull request #7085:
URL: https://github.com/apache/pinot/pull/7085#discussion_r707556800



##########
File path: 
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/name/FixedSegmentNameGenerator.java
##########
@@ -28,6 +29,8 @@
   private final String _segmentName;
 
   public FixedSegmentNameGenerator(String segmentName) {
+    Preconditions.checkArgument(
+        segmentName != null && isValidSegmentName(segmentName));

Review comment:
       (nit) can be on the same line?

##########
File path: 
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/name/NormalizedDateSegmentNameGenerator.java
##########
@@ -53,6 +53,8 @@ public NormalizedDateSegmentNameGenerator(String tableName, 
@Nullable String seg
       boolean excludeSequenceId, @Nullable String pushType, @Nullable String 
pushFrequency,
       @Nullable DateTimeFormatSpec dateTimeFormatSpec) {
     _segmentNamePrefix = segmentNamePrefix != null ? segmentNamePrefix.trim() 
: tableName;
+    Preconditions.checkArgument(
+        _segmentNamePrefix == null || isValidSegmentName(_segmentNamePrefix));

Review comment:
       ```suggestion
           _segmentNamePrefix != null && 
isValidSegmentName(_segmentNamePrefix));
   ```




-- 
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]

Reply via email to