[GitHub] [drill] cgivre commented on pull request #2731: DRILL-5033: Query on JSON That Has Null as Value For Each Key

2023-01-17 Thread GitBox


cgivre commented on PR #2731:
URL: https://github.com/apache/drill/pull/2731#issuecomment-1386304077

   I'm going to close this PR.  If there is any objection, we can revisit. 


-- 
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: dev-unsubscr...@drill.apache.org

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



[GitHub] [drill] cgivre commented on pull request #2731: DRILL-5033: Query on JSON That Has Null as Value For Each Key

2022-12-30 Thread GitBox


cgivre commented on PR #2731:
URL: https://github.com/apache/drill/pull/2731#issuecomment-1367977377

   > Thanks @cgivre for the clarification, but suppose the assumption that 
considering nulls as strings would solve the issue, were the changes i made 
(over the class JSONReader.java) adequate (should the methods be changed as i 
did)? i see that some tests didn't pass.
   
   For us to merge a pull request, all the unit tests have to pass.  (Or be 
modified with an explanation of why they are being modified)  Drill is a very 
complex beast with a lot of dependencies so even small changes can break things 
you didn't intend to.  Believe me... I know from experience ;-)
   
   One other thing to note is that there is another option 
`drill.exec.functions.cast_empty_string_to_null`.  Setting this to true forces 
empty strings to be treated as `null`.  This can have some unintended side 
effects,  but might also help you out. 


-- 
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: dev-unsubscr...@drill.apache.org

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



[GitHub] [drill] cgivre commented on pull request #2731: DRILL-5033: Query on JSON That Has Null as Value For Each Key

2022-12-29 Thread GitBox


cgivre commented on PR #2731:
URL: https://github.com/apache/drill/pull/2731#issuecomment-1367677557

   @unical1988 
   You actually don't have to modify the code to get this data to read 
properly.  As I mentioned on the user group, the easiest way would probably be 
to provide a schema.  The good news is that you can do this at query time.  
Take a look here: 
https://drill.apache.org/docs/plugin-configuration-basics/#specifying-the-schema-as-table-function-parameter
   
   An example query might be:
   
   ```sql
   select * from table(dfs.tmp.`file.json`(
   schema => 'inline=(col0 varchar, col1 date properties {`drill.format` = 
`-MM-dd`})
   properties {`drill.strict` = `false`}'))
   ```
   
   


-- 
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: dev-unsubscr...@drill.apache.org

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



[GitHub] [drill] cgivre commented on pull request #2731: DRILL-5033: Query on JSON That Has Null as Value For Each Key

2022-12-29 Thread GitBox


cgivre commented on PR #2731:
URL: https://github.com/apache/drill/pull/2731#issuecomment-1367526640

   I copied the JIRA into the PR description.


-- 
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: dev-unsubscr...@drill.apache.org

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