This is an automated email from the ASF dual-hosted git repository.

Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 90b72655324 Document and test table name override on segment push 
(#19085)
90b72655324 is described below

commit 90b726553241e538f845015f3171f3019d4c832f
Author: deepinsight coder <[email protected]>
AuthorDate: Tue Aug 11 16:29:19 2026 -0700

    Document and test table name override on segment push (#19085)
---
 .../PinotSegmentUploadDownloadRestletResource.java         | 14 ++++++++++----
 .../pinot/tools/admin/command/UploadSegmentCommand.java    |  4 +++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
index af77b6ab580..599464a75af 100644
--- 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
+++ 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
@@ -830,7 +830,9 @@ public class PinotSegmentUploadDownloadRestletResource {
   // request if a multipart object is not sent. This endpoint does not move 
the segment to its final location;
   // it keeps it at the downloadURI header that is set. We will not support 
this endpoint going forward.
   public void uploadSegmentAsJson(String segmentJsonStr,
-      @ApiParam(value = "Name of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
+      @ApiParam(value = "Name of the table to upload into. Overrides 
segment.table.name in segment metadata when set "
+          + "(allows promoting a segment built for another table). Falls back 
to metadata when omitted.")
+      @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
       String tableName,
       @ApiParam(value = "Type of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_TYPE)
       @DefaultValue("OFFLINE") String tableType,
@@ -869,7 +871,9 @@ public class PinotSegmentUploadDownloadRestletResource {
   @TrackedByGauge(gauge = ControllerGauge.SEGMENT_UPLOADS_IN_PROGRESS)
   // For the multipart endpoint, we will always move segment to final location 
regardless of the segment endpoint.
   public void uploadSegmentAsMultiPart(FormDataMultiPart multiPart,
-      @ApiParam(value = "Name of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
+      @ApiParam(value = "Name of the table to upload into. Overrides 
segment.table.name in segment metadata when set "
+          + "(allows promoting a segment built for another table). Falls back 
to metadata when omitted.")
+      @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
       String tableName,
       @ApiParam(value = "Type of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_TYPE)
       @DefaultValue("OFFLINE") String tableType,
@@ -971,7 +975,8 @@ public class PinotSegmentUploadDownloadRestletResource {
   // request if a multipart object is not sent. This endpoint is recommended 
for use. It differs from the first
   // endpoint in how it moves the segment to a Pinot-determined final 
directory.
   public void uploadSegmentAsJsonV2(String segmentJsonStr,
-      @ApiParam(value = "Name of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
+      @ApiParam(value = "Name of the table to upload into. Overrides 
segment.table.name in segment metadata when set.")
+      @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
       String tableName,
       @ApiParam(value = "Type of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_TYPE)
       @DefaultValue("OFFLINE") String tableType,
@@ -1011,7 +1016,8 @@ public class PinotSegmentUploadDownloadRestletResource {
   @TrackedByGauge(gauge = ControllerGauge.SEGMENT_UPLOADS_IN_PROGRESS)
   // This behavior does not differ from v1 of the same endpoint.
   public void uploadSegmentAsMultiPartV2(FormDataMultiPart multiPart,
-      @ApiParam(value = "Name of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
+      @ApiParam(value = "Name of the table to upload into. Overrides 
segment.table.name in segment metadata when set.")
+      @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME)
       String tableName,
       @ApiParam(value = "Type of the table") 
@QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_TYPE)
       @DefaultValue("OFFLINE") String tableType,
diff --git 
a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/UploadSegmentCommand.java
 
b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/UploadSegmentCommand.java
index 4e851461624..23b502e4cee 100644
--- 
a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/UploadSegmentCommand.java
+++ 
b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/UploadSegmentCommand.java
@@ -71,7 +71,9 @@ public class UploadSegmentCommand extends 
AbstractBaseAdminCommand implements Co
   @CommandLine.Option(names = {"-segmentDir"}, required = true, description = 
"Path to segment directory.")
   private String _segmentDir = null;
 
-  @CommandLine.Option(names = {"-tableName"}, required = false, description = 
"Table name to upload")
+  @CommandLine.Option(names = {"-tableName"}, required = false,
+      description = "Table name to upload into. Overrides segment.table.name 
baked into the segment metadata "
+          + "(build once, push to staging or prod). When omitted, falls back 
to the name in segment metadata.")
   private String _tableName = null;
 
   @CommandLine.Option(names = {"-tableType"}, required = false,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to