Package org.apache.drill.exec.compile
package org.apache.drill.exec.compile
Runtime code-generation, compilation and bytecode-manipulation utilities.
To achieve optimal performance in a dynamic schema environment, Drill
includes a complete code generation system for generating type-specific Java
code for most of its physical operators. This generated code is used for
scalar expression evaluation as well as value transfers between record
batches. As a new schema arrives at an operator, the schema change will be
detected and prompt runtime code generation. This runtime-generated code will
evaluate the expressions needed for the operator to process the incoming
data. As the same code will often be run on a number of nodes in the cluster,
compiled classes are stored in the distributed cache to avoid the need to re-
compile and JIT-optimize the same code on every machine.
-
ClassDescriptionUtilities commonly used with ASM.Class loader for "plain-old Java" generated classes.A ClassVisitor that verifies the required call sequence described in http://asm.ow2.org/asm50/javadoc/user/org/objectweb/asm/ClassVisitor.html .A MethodVisitor that verifies the required call sequence according to http://asm.ow2.org/asm50/javadoc/user/org/objectweb/asm/MethodVisitor.html .Implements the "plain Java" method of code generation and compilation.Selects between the two supported Java compilers: Janino and the build-in Java compiler.Compiles generated code, merges the resulting class with the template class, and performs byte-code cleanup on the resulting byte codes.Global code compiler mechanism shared by all threads and operators.Abstracts out the details of compiling code using the two available mechanisms.There's a bug in ASM's CheckClassAdapter.Maintains state while traversing a finite state machine described by an FsmDescriptor.Describes a finite state machine in terms of a mapping of tokens to characters, a regular expression describing the valid transitions using the characters, and an end state.An ASM ClassVisitor that strips class the access bits that are only possible on inner classes (ACC_PROTECTED, ACC_PRIVATE, and ACC_FINAL).A simple Writer that will forward whole lines (lines ending with a newline) to a Logger.Per-compilation unit class loader that holds both caching and compilation steps.An ASM ClassVisitor that allows for a late-bound delegate.Defines a code generation "template" which consist of: An interface that defines the generated class. A template class which implements the interface to provide "generic" methods that need not be generated. A signature that lists the methods and vector holders used by the template.