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

linxinyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new 157241ab3b chore: Remove duplicate JOOQ generator and libraries (#3748)
157241ab3b is described below

commit 157241ab3bd35d67a66723b2a66c02e8ea8fa655
Author: Xinyuan Lin <[email protected]>
AuthorDate: Thu Feb 26 23:26:55 2026 -0800

    chore: Remove duplicate JOOQ generator and libraries (#3748)
    
    Since the JOOQ code generator logic was merged into the sbt compiler in
    PR #3746, we no longer need a separate JOOQ generator class. This PR
    removes the redundant JOOQ generator along with its related libraries.
    
    If you look at the file changes, the files removed in this PR are
    symmetrical to those added in PR #3746. We chose not to remove
    everything in the same PR to ensure the new generator worked as expected
    before deprecating the old one, and to keep each PR minimal and focused.
    
    ---------
    
    Signed-off-by: Xinyuan Lin <[email protected]>
---
 common/dao/build.sbt                               |  2 -
 .../org/apache/texera/dao/JooqCodeGenerator.scala  | 75 ----------------------
 2 files changed, 77 deletions(-)

diff --git a/common/dao/build.sbt b/common/dao/build.sbt
index 5bedbe44a9..ca7848ecc2 100644
--- a/common/dao/build.sbt
+++ b/common/dao/build.sbt
@@ -170,7 +170,6 @@ libraryDependencies ++= Seq(
 
 libraryDependencies ++= Seq(
   "org.jooq" % "jooq" % "3.16.23",
-  "org.jooq" % "jooq-codegen" % "3.16.23"
 )
 
 /////////////////////////////////////////////////////////////////////////////
@@ -179,5 +178,4 @@ libraryDependencies ++= Seq(
 
 libraryDependencies ++= Seq(
   "org.postgresql" % "postgresql" % "42.7.4",
-  "com.typesafe" % "config" % "1.4.3"    // config reader
 )
diff --git 
a/common/dao/src/main/scala/org/apache/texera/dao/JooqCodeGenerator.scala 
b/common/dao/src/main/scala/org/apache/texera/dao/JooqCodeGenerator.scala
deleted file mode 100644
index f3aff9f3f0..0000000000
--- a/common/dao/src/main/scala/org/apache/texera/dao/JooqCodeGenerator.scala
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.texera.dao
-
-import com.typesafe.config.{Config, ConfigFactory, ConfigParseOptions}
-import org.jooq.codegen.GenerationTool
-import org.jooq.meta.jaxb.{Configuration, Jdbc}
-
-import java.io.File
-import java.nio.file.{Files, Path}
-
-object JooqCodeGenerator {
-  @throws[Exception]
-  def main(args: Array[String]): Unit = {
-    // Load jOOQ configuration XML
-    val jooqXmlPath: Path = Path
-      .of(sys.env.getOrElse("TEXERA_HOME", "."))
-      .resolve("common")
-      .resolve("dao")
-      .resolve("src")
-      .resolve("main")
-      .resolve("resources")
-      .resolve("jooq-conf.xml")
-    val jooqConfig: Configuration = 
GenerationTool.load(Files.newInputStream(jooqXmlPath))
-
-    // Load storage.conf from the specified path
-    val storageConfPath: Path = Path
-      .of(sys.env.getOrElse("TEXERA_HOME", "."))
-      .resolve("common")
-      .resolve("config")
-      .resolve("src")
-      .resolve("main")
-      .resolve("resources")
-      .resolve("storage.conf")
-
-    val conf: Config = ConfigFactory
-      .parseFile(
-        new File(storageConfPath.toString),
-        ConfigParseOptions.defaults().setAllowMissing(false)
-      )
-      .resolve()
-
-    // Extract JDBC configuration
-    val jdbcConfig = conf.getConfig("storage.jdbc")
-
-    val jooqJdbcConfig = new Jdbc
-    jooqJdbcConfig.setDriver("org.postgresql.Driver")
-    // Skip all the query params, otherwise it will omit the "texera_db." 
prefix on the field names.
-    jooqJdbcConfig.setUrl(jdbcConfig.getString("url").split('?').head)
-    jooqJdbcConfig.setUsername(jdbcConfig.getString("username"))
-    jooqJdbcConfig.setPassword(jdbcConfig.getString("password"))
-
-    jooqConfig.setJdbc(jooqJdbcConfig)
-
-    // Generate the code
-    GenerationTool.generate(jooqConfig)
-  }
-}

Reply via email to