drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] dzamo edited a comment on pull request #2283: DRILL-7979: Self-Closing XML Tags Cause Schema Change Exceptions
Date Mon, 02 Aug 2021 15:25:56 GMT

dzamo edited a comment on pull request #2283:
URL: https://github.com/apache/drill/pull/2283#issuecomment-891086769


   Perhaps we should be trying for consistency with what Drill does with analogous JSON data.
 Querying this document
   ```json
   [
   	{
   		"foo": null
   	},
   	{
   		"foo": { "bar": 0 }
   	}
   ]
   ```
   gives you 
   ```
   foo      |
   ---------|
   {}       |
   {"bar":0}|
   ```
   .  The null value becomes an empty map, as I proposed for empty XML elements, but things
are otherwise different.  Adding an object with an int property `{"foo": 2}` returns an error,
not a map with a special key `{'__value__' : 2 }`.  Changing that second object hold `"foo":
[ 1, 2, 3 ]` makes the foo column an array.  Somehow Drill is able to delay its decision on
the column type until the ocurrence of the first non-null value.  Is this something that's
possible with Easy format plugins?


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

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



Mime
View raw message