You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/05/13 16:51:59 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #10763: [multistage]: Supporting Json data type & better error messages

walterddr commented on code in PR #10763:
URL: https://github.com/apache/pinot/pull/10763#discussion_r1193012876


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotQueryResource.java:
##########
@@ -108,6 +108,9 @@ public String handlePostSql(String requestJsonStr, @Context HttpHeaders httpHead
       }
       LOGGER.debug("Trace: {}, Running query: {}", traceEnabled, sqlQuery);
       return executeSqlQuery(httpHeaders, sqlQuery, traceEnabled, queryOptions, "/sql");
+    } catch (ProcessingException pe) {
+      LOGGER.error("Caught exception while processing get request {}", pe.getMessage());

Review Comment:
   this is a POST request not a get request



##########
pinot-query-planner/src/main/java/org/apache/pinot/query/type/TypeFactory.java:
##########
@@ -81,14 +81,14 @@ private RelDataType toRelDataType(FieldSpec fieldSpec) {
         return fieldSpec.isSingleValueField() ? createSqlType(SqlTypeName.DECIMAL)
             : createArrayType(createSqlType(SqlTypeName.DECIMAL), -1);
       case JSON:
-        // TODO: support JSON, JSON should be supported using a special RelDataType as it is not a simple String,
-        // nor can it be easily parsed as a STRUCT.
+        return createSqlType(SqlTypeName.VARCHAR);

Review Comment:
   let's separate the support of the JSON type into a separate PR. and for this PR let's only contribute the proper error message with unsupported datatype propagation.



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