rubenada commented on code in PR #6523:
URL: https://github.com/apache/hive/pull/6523#discussion_r3612830181


##########
druid-handler/pom.xml:
##########
@@ -353,10 +353,24 @@
                       <pattern>io.netty</pattern>
                       
<shadedPattern>org.apache.hive.druid.io.netty</shadedPattern>
                     </relocation>
+                    <!--
+                    Calcite is intentionally NOT included or relocated here.
+                    Calcite's calcite-core ships 
org/apache/calcite/runtime/SqlFunctions.class with a
+                    malformed RuntimeVisibleTypeAnnotations attribute 
(LOCAL_VARIABLE start_pc/length
+                    pointing inside instruction operands in the static 
initializer). The JVM tolerates it;
+                    ASM's ClassRemapper does not, and shading + javadoc fails 
with
+                    "Index 65536 out of bounds for length 334 [...] Error in 
ASM processing class".
+                    Present in Calcite 1.35.0 through at least 1.42.0. 
Upstream: ASM gitlab issue
+                    https://gitlab.ow2.org/asm/asm/-/issues/318008 (closed as 
invalid: root cause is on
+                    Calcite's side); Calcite ticket: 
https://issues.apache.org/jira/browse/CALCITE-6393
+                    (still unresolved). Druid 0.17.1 uses Calcite APIs 
compatible with Hive's Calcite 1.42+,
+                    so skipping this relocation is safe. If Druid is upgraded 
to an incompatible Calcite,
+                    restore the relocation (either after Calcite fixes their 
bytecode or by adding a shade
+                    filter that excludes SqlFunctions.class from remapping).

Review Comment:
   Hopefully we can get rid of the Druid module, and this adjustment won't be 
necessary



-- 
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