You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "saurabhd336 (via GitHub)" <gi...@apache.org> on 2023/04/21 10:34:37 UTC

[GitHub] [pinot] saurabhd336 commented on a diff in pull request #10655: API to expose the contract/rules imposed by pinot on tableConfig

saurabhd336 commented on code in PR #10655:
URL: https://github.com/apache/pinot/pull/10655#discussion_r1173615900


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java:
##########
@@ -126,6 +127,22 @@ public String listConfigs() {
     }
   }
 
+  /**
+   * Gets the metadata on the valid {@link org.apache.pinot.spi.data.FieldSpec.DataType} for each
+   * {@link org.apache.pinot.spi.data.FieldSpec.FieldType} and the default null values for each combination
+   */
+  @GET
+  @Produces(MediaType.APPLICATION_JSON)
+  @Path("/tableConfigs/specMetadata")
+  @ApiOperation(value = "Get TableConfig metadata", notes = "Get TableConfig metadata")
+  public String getFieldSpecMetadata() {
+    try {
+      return JsonUtils.objectToString(FieldSpec.FIELD_SPEC_METADATA);

Review Comment:
   Return just the object. It'll automatically be jsonified.



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org