Skip to content

Commit

Permalink
[FLINK-21927][table-planner-blink] Resolve ExpressionReducer compile …
Browse files Browse the repository at this point in the history
…fail when running long term (apache#15354)

This commit replaces CodeGenUtils#nameCounter from AtomicInteger to AtomicLong to resolve
Integer overflow issue
  • Loading branch information
xmarker committed Apr 2, 2021
1 parent b96e67a commit 56f275c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package org.apache.flink.table.planner.codegen

import java.lang.reflect.Method
import java.lang.{Boolean => JBoolean, Byte => JByte, Double => JDouble, Float => JFloat, Integer => JInt, Long => JLong, Object => JObject, Short => JShort}
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicLong

import org.apache.flink.api.common.ExecutionConfig
import org.apache.flink.api.common.functions.RuntimeContext
Expand Down Expand Up @@ -116,7 +116,7 @@ object CodeGenUtils {

// ----------------------------------------------------------------------------------------

private val nameCounter = new AtomicInteger
private val nameCounter = new AtomicLong

def newName(name: String): String = {
s"$name$$${nameCounter.getAndIncrement}"
Expand Down

0 comments on commit 56f275c

Please sign in to comment.