You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/03/18 04:43:00 UTC

[incubator-paimon] 19/32: [core] Rename paimon to move CodeGeneratorContext

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git

commit 63db4d8aea69516bacfac1b91172f8970c7cb4df
Author: JingsongLi <lz...@aliyun.com>
AuthorDate: Fri Mar 17 14:47:51 2023 +0800

    [core] Rename paimon to move CodeGeneratorContext
---
 .../apache/paimon/codegen/CodeGeneratorContext.scala  |  4 ++--
 .../org/apache/paimon/codegen/ExprCodeGenerator.scala |  5 ++---
 .../org/apache/paimon/codegen/SortCodeGenerator.scala |  4 ++--
 .../paimon/codegen/ComparatorCodeGenerator.scala      | 19 ++++++++++---------
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/paimon-common/src/main/java/org/apache/paimon/codegen/CodeGeneratorContext.scala b/paimon-codegen/src/main/scala/org/apache/paimon/codegen/CodeGeneratorContext.scala
similarity index 98%
rename from paimon-common/src/main/java/org/apache/paimon/codegen/CodeGeneratorContext.scala
rename to paimon-codegen/src/main/scala/org/apache/paimon/codegen/CodeGeneratorContext.scala
index ca4eae009..f817ea4e4 100644
--- a/paimon-common/src/main/java/org/apache/paimon/codegen/CodeGeneratorContext.scala
+++ b/paimon-codegen/src/main/scala/org/apache/paimon/codegen/CodeGeneratorContext.scala
@@ -15,14 +15,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.paimon.codegen
 
+import org.apache.paimon.codegen.GenerateUtils.{newName, newNames}
 import org.apache.paimon.data.serializer.InternalSerializers
 import org.apache.paimon.types.DataType
 import org.apache.paimon.utils.InstantiationUtil
 
-import GenerateUtils.{newName, newNames}
-
 import scala.collection.mutable
 
 /**
diff --git a/paimon-common/src/main/java/org/apache/paimon/codegen/ExprCodeGenerator.scala b/paimon-codegen/src/main/scala/org/apache/paimon/codegen/ExprCodeGenerator.scala
similarity index 96%
rename from paimon-common/src/main/java/org/apache/paimon/codegen/ExprCodeGenerator.scala
rename to paimon-codegen/src/main/scala/org/apache/paimon/codegen/ExprCodeGenerator.scala
index bc64276c1..28d48d23a 100644
--- a/paimon-common/src/main/java/org/apache/paimon/codegen/ExprCodeGenerator.scala
+++ b/paimon-codegen/src/main/scala/org/apache/paimon/codegen/ExprCodeGenerator.scala
@@ -17,13 +17,12 @@
  */
 package org.apache.paimon.codegen
 
+import org.apache.paimon.codegen.GenerateUtils.{DEFAULT_OUT_RECORD_TERM, DEFAULT_OUT_RECORD_WRITER_TERM, generateRecordStatement, rowSetField}
+import org.apache.paimon.codegen.GeneratedExpression.{NEVER_NULL, NO_CODE}
 import org.apache.paimon.data.{BinaryRow, InternalRow}
 import org.apache.paimon.types.{RowType, TimestampType}
 import org.apache.paimon.utils.TypeUtils.isInteroperable
 
-import GeneratedExpression.{NEVER_NULL, NO_CODE}
-import GenerateUtils.{generateRecordStatement, rowSetField, DEFAULT_OUT_RECORD_TERM, DEFAULT_OUT_RECORD_WRITER_TERM}
-
 class ExprCodeGenerator(ctx: CodeGeneratorContext) {
 
   /**
diff --git a/paimon-common/src/main/java/org/apache/paimon/codegen/SortCodeGenerator.scala b/paimon-codegen/src/main/scala/org/apache/paimon/codegen/SortCodeGenerator.scala
similarity index 99%
rename from paimon-common/src/main/java/org/apache/paimon/codegen/SortCodeGenerator.scala
rename to paimon-codegen/src/main/scala/org/apache/paimon/codegen/SortCodeGenerator.scala
index 30d3639ea..f51f833e7 100644
--- a/paimon-common/src/main/java/org/apache/paimon/codegen/SortCodeGenerator.scala
+++ b/paimon-codegen/src/main/scala/org/apache/paimon/codegen/SortCodeGenerator.scala
@@ -17,10 +17,10 @@
  */
 package org.apache.paimon.codegen
 
-import org.apache.paimon.codegen.GenerateUtils.{newName, ROW_DATA, SEGMENT}
+import org.apache.paimon.codegen.GenerateUtils.{ROW_DATA, SEGMENT, newName}
 import org.apache.paimon.data.{BinaryRow, Decimal, Timestamp}
-import org.apache.paimon.types.{DataType, DecimalType, RowType, TimestampType}
 import org.apache.paimon.types.DataTypeRoot._
+import org.apache.paimon.types.{DataType, DecimalType, RowType, TimestampType}
 import org.apache.paimon.utils.{SortUtil, TypeUtils}
 
 import scala.collection.mutable
diff --git a/paimon-common/src/main/java/org/apache/paimon/codegen/ComparatorCodeGenerator.scala b/paimon-common/src/main/java/org/apache/paimon/codegen/ComparatorCodeGenerator.scala
index b02875f70..25b4c7e4e 100644
--- a/paimon-common/src/main/java/org/apache/paimon/codegen/ComparatorCodeGenerator.scala
+++ b/paimon-common/src/main/java/org/apache/paimon/codegen/ComparatorCodeGenerator.scala
@@ -15,9 +15,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.paimon.codegen
 
-import org.apache.paimon.codegen.GenerateUtils.{newName, ROW_DATA}
+import org.apache.paimon.codegen.GenerateUtils.{ROW_DATA, newName}
 import org.apache.paimon.types.RowType
 
 /** A code generator for generating [[RecordComparator]]. */
@@ -27,19 +28,19 @@ object ComparatorCodeGenerator {
    * Generates a [[RecordComparator]] that can be passed to a Java compiler.
    *
    * @param name
-   *   Class name of the function. Does not need to be unique but has to be a valid Java class
-   *   identifier.
+   * Class name of the function. Does not need to be unique but has to be a valid Java class
+   * identifier.
    * @param inputType
-   *   input type.
+   * input type.
    * @param sortSpec
-   *   sort specification.
+   * sort specification.
    * @return
-   *   A GeneratedRecordComparator
+   * A GeneratedRecordComparator
    */
   def gen(
-      name: String,
-      inputType: RowType,
-      sortSpec: SortSpec): GeneratedClass[RecordComparator] = {
+           name: String,
+           inputType: RowType,
+           sortSpec: SortSpec): GeneratedClass[RecordComparator] = {
     val className = newName(name)
     val baseClass = classOf[RecordComparator]