Skip to content

Commit 6384aec

Browse files
committed
Add final to constants.
1 parent 79d0106 commit 6384aec

File tree

1 file changed

+6
-6
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen

1 file changed

+6
-6
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,29 +1329,29 @@ abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends Loggin
13291329
object CodeGenerator extends Logging {
13301330

13311331
// This is the value of HugeMethodLimit in the OpenJDK JVM settings
1332-
val DEFAULT_JVM_HUGE_METHOD_LIMIT = 8000
1332+
final val DEFAULT_JVM_HUGE_METHOD_LIMIT = 8000
13331333

13341334
// The max valid length of method parameters in JVM.
1335-
val MAX_JVM_METHOD_PARAMS_LENGTH = 255
1335+
final val MAX_JVM_METHOD_PARAMS_LENGTH = 255
13361336

13371337
// This is the threshold over which the methods in an inner class are grouped in a single
13381338
// method which is going to be called by the outer class instead of the many small ones
1339-
val MERGE_SPLIT_METHODS_THRESHOLD = 3
1339+
final val MERGE_SPLIT_METHODS_THRESHOLD = 3
13401340

13411341
// The number of named constants that can exist in the class is limited by the Constant Pool
13421342
// limit, 65,536. We cannot know how many constants will be inserted for a class, so we use a
13431343
// threshold of 1000k bytes to determine when a function should be inlined to a private, inner
13441344
// class.
1345-
val GENERATED_CLASS_SIZE_THRESHOLD = 1000000
1345+
final val GENERATED_CLASS_SIZE_THRESHOLD = 1000000
13461346

13471347
// This is the threshold for the number of global variables, whose types are primitive type or
13481348
// complex type (e.g. more than one-dimensional array), that will be placed at the outer class
1349-
val OUTER_CLASS_VARIABLES_THRESHOLD = 10000
1349+
final val OUTER_CLASS_VARIABLES_THRESHOLD = 10000
13501350

13511351
// This is the maximum number of array elements to keep global variables in one Java array
13521352
// 32767 is the maximum integer value that does not require a constant pool entry in a Java
13531353
// bytecode instruction
1354-
val MUTABLESTATEARRAY_SIZE_LIMIT = 32768
1354+
final val MUTABLESTATEARRAY_SIZE_LIMIT = 32768
13551355

13561356
/**
13571357
* Compile the Java source code into a Java class, using Janino.

0 commit comments

Comments
 (0)