Skip to content

Commit

Permalink
[spark] Change SQLConfUtils to scala (#3242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy authored Apr 19, 2024
1 parent 3686cce commit 9c2e86d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
* limitations under the License.
*/

package org.apache.paimon.spark.utils;
package org.apache.paimon.spark.util

import org.apache.spark.sql.internal.SQLConf;
import org.apache.paimon.catalog.Catalog

import org.apache.spark.sql.internal.SQLConf

/** SQLConf utils. */
public class SQLConfUtils {
public static String defaultDatabase(SQLConf sqlConf) {
return sqlConf.defaultDatabase();
}
object SQLConfUtils {
def defaultDatabase(sqlConf: SQLConf): String = Catalog.DEFAULT_DATABASE
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
* limitations under the License.
*/

package org.apache.paimon.spark.utils;
package org.apache.paimon.spark.util

import org.apache.paimon.catalog.Catalog;
import org.apache.spark.sql.internal.SQLConf;
import org.apache.paimon.catalog.Catalog

import org.apache.spark.sql.internal.SQLConf

/** SQLConf utils. */
public class SQLConfUtils {
public static String defaultDatabase(SQLConf sqlConf) {
return Catalog.DEFAULT_DATABASE;
}
object SQLConfUtils {
def defaultDatabase(sqlConf: SQLConf): String = Catalog.DEFAULT_DATABASE
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
* limitations under the License.
*/

package org.apache.paimon.spark.utils;
package org.apache.paimon.spark.util

import org.apache.paimon.catalog.Catalog;
import org.apache.spark.sql.internal.SQLConf;
import org.apache.paimon.catalog.Catalog

import org.apache.spark.sql.internal.SQLConf

/** SQLConf utils. */
public class SQLConfUtils {
public static String defaultDatabase(SQLConf sqlConf) {
return Catalog.DEFAULT_DATABASE;
}
object SQLConfUtils {
def defaultDatabase(sqlConf: SQLConf): String = Catalog.DEFAULT_DATABASE
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.apache.paimon.hive.HiveCatalogOptions;
import org.apache.paimon.options.CatalogOptions;
import org.apache.paimon.spark.catalog.SparkBaseCatalog;
import org.apache.paimon.spark.utils.SQLConfUtils;
import org.apache.paimon.spark.util.SQLConfUtils;
import org.apache.paimon.utils.Preconditions;

import org.apache.hadoop.conf.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
* limitations under the License.
*/

package org.apache.paimon.spark.utils;
package org.apache.paimon.spark.util

import org.apache.paimon.catalog.Catalog;
import org.apache.spark.sql.internal.SQLConf;
import org.apache.spark.sql.internal.SQLConf

/** SQLConf utils. */
public class SQLConfUtils {
public static String defaultDatabase(SQLConf sqlConf) {
return Catalog.DEFAULT_DATABASE;
}
object SQLConfUtils {
def defaultDatabase(sqlConf: SQLConf): String = sqlConf.defaultDatabase
}

0 comments on commit 9c2e86d

Please sign in to comment.