amrishlal commented on a change in pull request #7820:
URL: https://github.com/apache/pinot/pull/7820#discussion_r760591685



##########
File path: 
pinot-core/src/test/java/org/apache/pinot/queries/JsonPathQueriesTest.java
##########
@@ -55,17 +60,37 @@
   private static final String LONG_COLUMN = "longColumn";
   private static final String STRING_COLUMN = "stringColumn";
   private static final String JSON_COLUMN = "jsonColumn";
+  private static final String RAW_JSON_COLUMN = "rawJsonColumn";
+  private static final String RAW_BYTES_COLUMN = "rawBytesColumn";
+  private static final String DICTIONARY_BYTES_COLUMN = 
"dictionaryBytesColumn";
+  private static final String RAW_STRING_COLUMN = "rawStringColumn";
+  private static final String DICTIONARY_STRING_COLUMN = 
"dictionaryStringColumn";
   private static final String JSON_COLUMN_WITHOUT_INDEX = 
"jsonColumnWithoutIndex";
 
   private static final Schema SCHEMA = new 
Schema.SchemaBuilder().setSchemaName(RAW_TABLE_NAME)
       .addSingleValueDimension(INT_COLUMN, FieldSpec.DataType.INT)
       .addSingleValueDimension(LONG_COLUMN, FieldSpec.DataType.LONG)
       .addSingleValueDimension(STRING_COLUMN, FieldSpec.DataType.STRING)
       .addSingleValueDimension(JSON_COLUMN, FieldSpec.DataType.JSON)
+      .addSingleValueDimension(RAW_JSON_COLUMN, FieldSpec.DataType.JSON)
+      .addSingleValueDimension(RAW_BYTES_COLUMN, FieldSpec.DataType.BYTES)

Review comment:
       @richardstartin This unit test file is only to test JSON path 
expressions on `JSON` column. If you are trying to validate JSON_EXTRACT_SCALAR 
function, I think a better place for it would be JsonDataTypeQueriesTest.java 
which has a lot of test cases for json_extract_scalar. I haven't looked through 
the PR in detail, so maybe I am missing something, but will look into more 
detail.
   
   @kishoreg Perhaps that was just my own personal impression at the time we 
were code reviewing JSON datatype. I suppose it should be ok to allow 
`JSON_EXTRACT_SCALAR` to work over `BYTE`, but then there is no guarantee that 
`BYTE` or `STRING` would contain JSON data (?), i.e any valid or invalid JSON 
data could be put into a `STRING` or `BYTE` column. If those byes or string are 
ingested into `JSON` datatype column, then we know for sure that it is valid 
JSON and can treat it as such during query processing, indexing, etc.




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

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



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

Reply via email to