You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/11/22 08:29:49 UTC

[GitHub] clintropolis commented on a change in pull request #6654: faster flattening for non-existent paths

clintropolis commented on a change in pull request #6654: faster flattening for non-existent paths
URL: https://github.com/apache/incubator-druid/pull/6654#discussion_r235635948
 
 

 ##########
 File path: extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/GenericAvroJsonProvider.java
 ##########
 @@ -138,7 +141,9 @@ public void setArrayIndex(final Object o, final int i, final Object o1)
   @Override
   public Object getMapValue(final Object o, final String s)
   {
-    if (o instanceof GenericRecord) {
+    if (o == null) {
+      return null;
 
 Review comment:
   Actually, using `UNDEFINED` puts it back into the state where it throws `PathNotFoundException` internally, in fixing the tests I lost the performance for json flattening. I've so far returned to using `null` but in a way that doesn't break json path filter expressions, but I'm still exploring to see if there is a more elegant way to handle this, maybe my own `NOT_FOUND` object to handle specially.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org