Skip to content

Cannot shade Pinot jars due to invalid bytecode in Calcite dependencies #15119

@itschrispeck

Description

@itschrispeck

We use jarjar to shade our Pinot jars, which uses asm. When shading pinot, we get the below error

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for length 297
        at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695)
        at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711)
        at org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777)
<...>
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.eed3si9n.jarjar.MainUtil.runMain(MainUtil.java:39)
        at com.eed3si9n.jarjar.Main.main(Main.java:50)

The root cause is that recent calcite versions were released with invalid bytecode, which is documented here and reported here. We started seeing this issue with the 1.36.0 upgrade, and it's persisted since.

Metadata

Metadata

Assignees

No one assigned

    Labels

    troubleshootingHelp with diagnosing operational issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions