You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:44:20 UTC

[GitHub] [pinot] walterddr opened a new pull request #7583: add toList to JsonUtils

walterddr opened a new pull request #7583:
URL: https://github.com/apache/pinot/pull/7583


   there's no JsonUtils.toList for `String` or `InputStream` or `byte[]` input type, only for File. Adding the other 3


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


[GitHub] [pinot] walterddr commented on pull request #7583: add toList to JsonUtils

Posted by GitBox <gi...@apache.org>.
walterddr commented on pull request #7583:
URL: https://github.com/apache/pinot/pull/7583#issuecomment-945905246


   actually closing this. I think we should directly use/test the `TypeReference<..>` API. for now my need is satistified with the typereference API


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


[GitHub] [pinot] walterddr commented on a change in pull request #7583: add toList to JsonUtils

Posted by GitBox <gi...@apache.org>.
walterddr commented on a change in pull request #7583:
URL: https://github.com/apache/pinot/pull/7583#discussion_r729920407



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java
##########
@@ -82,6 +82,12 @@ private JsonUtils() {
     return DEFAULT_READER.forType(valueTypeRef).readValue(jsonString);
   }
 
+  public static <T> List<T> stringToList(String jsonString, Class<T> valueType)

Review comment:
       dont know where to add test the best, it doesn't seem like the others are tested individually either. 

##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java
##########
@@ -82,6 +82,12 @@ private JsonUtils() {
     return DEFAULT_READER.forType(valueTypeRef).readValue(jsonString);
   }
 
+  public static <T> List<T> stringToList(String jsonString, Class<T> valueType)

Review comment:
       sounds good. I take this as ok to create a separate test file entirely to cover the non-tested JsonUtils functions. will do it soon




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


[GitHub] [pinot] walterddr closed pull request #7583: add toList to JsonUtils

Posted by GitBox <gi...@apache.org>.
walterddr closed pull request #7583:
URL: https://github.com/apache/pinot/pull/7583


   


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


[GitHub] [pinot] richardstartin commented on a change in pull request #7583: add toList to JsonUtils

Posted by GitBox <gi...@apache.org>.
richardstartin commented on a change in pull request #7583:
URL: https://github.com/apache/pinot/pull/7583#discussion_r729922787



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java
##########
@@ -82,6 +82,12 @@ private JsonUtils() {
     return DEFAULT_READER.forType(valueTypeRef).readValue(jsonString);
   }
 
+  public static <T> List<T> stringToList(String jsonString, Class<T> valueType)

Review comment:
       I really think these should be tested though. If all new code is tested, coverage can't get worse.




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