Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/818#discussion_r113825753
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/ClassGenerator.java ---
    @@ -66,7 +68,17 @@
       public static final GeneratorMapping DEFAULT_CONSTANT_MAP = 
GM("doSetup", "doSetup", null, null);
     
       static final org.slf4j.Logger logger = 
org.slf4j.LoggerFactory.getLogger(ClassGenerator.class);
    -  public static enum BlockType {SETUP, EVAL, RESET, CLEANUP};
    +
    +  /**
    +   * Field has 2 indexes within the constant pull: field item + name and 
type item.
    --- End diff --
    
    I could not make sense how you calculate this number of 26767. According to 
JVM spec [1], the constant pool table consists of 2 or more bytes "info" 
section for each item. In some case like class name, one item could use 2 
bytes, while in other cases like field, method, one item could use 4 bytes. 
Integer uses 4 bytes, and Long constants uses 8 bytes. 
    
    That is, if I have a class with fields < 26767, we may still hit the 
complain of "too many constants".    
     
    
    1. http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to