clintropolis commented on code in PR #12564:
URL: https://github.com/apache/druid/pull/12564#discussion_r881072054


##########
processing/src/main/java/org/apache/druid/query/Query.java:
##########
@@ -110,7 +117,24 @@
    * after it is deserialized. This is because {@link BaseQuery#getContext()} 
uses
    * {@link QueryContext#getMergedParams()} for serialization, and queries 
accept a map for deserialization.
    */
-  QueryContext getQueryContext();
+  default QueryContext getQueryContext()
+  {
+    return IS_LEGACY_CONTEXT;

Review Comment:
   heh, I just left a comment about the same thing here 
https://github.com/apache/druid/pull/12396#issuecomment-1136547761
   
   I considered this, but decided against it because it didn't seem like actual 
implementations should legitimately return null and so seemed strange to mark 
`@Nullable`. Im not very attached to this though, so I could do the `null` 
thing instead, and mark it as `@Nullable` and update the javadocs to note that 
its not _actually_ nullable and is only for backwards compatibility and explain 
the implications.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to