Skip to content

Commit

Permalink
Change from com.clickhouse to com.clickhouse.spark
Browse files Browse the repository at this point in the history
  • Loading branch information
mzitnik committed Jul 21, 2024
1 parent d97ec99 commit 4a148ff
Show file tree
Hide file tree
Showing 158 changed files with 416 additions and 413 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ project(':clickhouse-core') {

generateGrammarSource {
maxHeapSize = "64m"
arguments += ["-visitor", "-package", "com.clickhouse"]
arguments += ["-visitor", "-package", "com.clickhouse.spark"]
}

test {
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-core-it/src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{

log4j.logger.org.apache.hadoop.util.Shell=ERROR
log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR
log4j.logger.com.clickhouse=DEBUG
log4j.logger.com.clickhouse.spark=DEBUG
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* limitations under the License.
*/

package com.clickhouse
package com.clickhouse.spark

import com.clickhouse.base.ClickHouseSingleMixIn
import com.clickhouse.client.NodeClient
import com.clickhouse.hash.{CityHash64, HashUtils, Murmurhash2_32, Murmurhash2_64, Murmurhash3_32, Murmurhash3_64}
import com.clickhouse.hash._
import com.clickhouse.spark.base.ClickHouseSingleMixIn
import com.clickhouse.spark.client.NodeClient
import com.clickhouse.spark.hash.{CityHash64, HashUtils, Murmurhash2_32, Murmurhash2_64, Murmurhash3_32, Murmurhash3_64}
import com.clickhouse.spark.hash._

class HashSuite extends ClickHouseSingleMixIn with Logging {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package com.clickhouse
package com.clickhouse.spark

import com.clickhouse.base.ClickHouseSingleMixIn
import com.clickhouse.spark.base.ClickHouseSingleMixIn
import java.time.{LocalDateTime, ZoneId}

class UtilsClickHouseSuite extends ClickHouseSingleMixIn with Logging {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.exception;
package com.clickhouse.spark.exception;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash.cityhash;
package com.clickhouse.spark.hash.cityhash;


// modified from https://github.com/dpoluyanov/achord/blob/master/src/main/java/com/github/mangelion/achord/CityHash_v1_0_2.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash.cityhash;
package com.clickhouse.spark.hash.cityhash;

/**
* copied from https://github.com/dpoluyanov/achord/blob/master/src/main/java/com/github/mangelion/achord/UInt128.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse
package com.clickhouse.spark

import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper, SerializationFeature}
import com.fasterxml.jackson.module.scala.ClassTagExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse
package com.clickhouse.spark

import org.slf4j.{Logger, LoggerFactory}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse
package com.clickhouse.spark

import org.apache.commons.lang3.time.FastDateFormat

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* limitations under the License.
*/

package com.clickhouse.client
package com.clickhouse.spark.client

import com.clickhouse.Logging
import com.clickhouse.exception.CHClientException
import com.clickhouse.spec.ClusterSpec
import com.clickhouse.spark.Logging
import com.clickhouse.spark.exception.CHClientException
import com.clickhouse.spark.spec.ClusterSpec

import java.util.concurrent.ConcurrentHashMap
import scala.collection.JavaConverters._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
* limitations under the License.
*/

package com.clickhouse.client
package com.clickhouse.spark.client

import com.clickhouse.Logging
import com.clickhouse.spark.Logging
import com.clickhouse.client._
import com.clickhouse.client.config.ClickHouseClientOption
import com.clickhouse.data.{ClickHouseCompression, ClickHouseFormat}
import com.clickhouse.exception.{CHClientException, CHException, CHServerException}
import com.clickhouse.format.{
import com.clickhouse.spark.exception.{CHClientException, CHException, CHServerException}
import com.clickhouse.spark.format.{
JSONCompactEachRowWithNamesAndTypesSimpleOutput,
JSONEachRowSimpleOutput,
NamesAndTypes,
SimpleOutput
}
import com.clickhouse.spec.NodeSpec
import com.clickhouse.spark.spec.NodeSpec
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.clickhouse.format._
import com.clickhouse.spark.format._

import java.io.InputStream
import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
* limitations under the License.
*/

package com.clickhouse.client
package com.clickhouse.spark.client

import com.clickhouse.Logging
import com.clickhouse.spec.{NodeSpec, Nodes}
import com.clickhouse.spark.Logging
import com.clickhouse.spark.spec.{NodeSpec, Nodes}

import java.util.concurrent.ConcurrentHashMap
import scala.collection.JavaConverters._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package com.clickhouse.exception
package com.clickhouse.spark.exception

import com.clickhouse.spec.NodeSpec
import com.clickhouse.spark.spec.NodeSpec

abstract class CHException(
val code: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.expr
package com.clickhouse.spark.expr

trait Expr extends Serializable {
def sql: String // ClickHouse dialect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* limitations under the License.
*/

package com.clickhouse.format
package com.clickhouse.spark.format

trait InputFormat
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
* limitations under the License.
*/

package com.clickhouse.format
package com.clickhouse.spark.format

import com.clickhouse.exception.CHClientException
import com.clickhouse.spark.exception.CHClientException
import java.io.InputStream

import scala.collection.immutable.ListMap
import scala.collection.JavaConverters._

import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.clickhouse.JsonProtocol.om
import com.clickhouse.spark.JsonProtocol.om

///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Simple ////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.format
package com.clickhouse.spark.format

import scala.collection.immutable.ListMap

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

import com.clickhouse.hash.cityhash.{CityHash_v1_0_2, UInt128}
import com.clickhouse.spark.hash.cityhash.{CityHash_v1_0_2, UInt128}

// https://github.com/ClickHouse/ClickHouse/blob/v23.5.3.24-stable/src/Functions/FunctionsHashing.h#L694
object CityHash64 extends HashFunc[Long] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

import java.nio.charset.StandardCharsets
import scala.reflect.ClassTag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

object HashUtils {
def intHash64Impl(x: Long): Long =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

import org.apache.commons.codec.digest.MurmurHash2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

import org.apache.commons.codec.digest.MurmurHash2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

import org.apache.commons.codec.digest.MurmurHash3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.hash
package com.clickhouse.spark.hash

import org.apache.commons.codec.digest.MurmurHash3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.io
package com.clickhouse.spark.io

import java.io.OutputStream

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.io
package com.clickhouse.spark.io

import java.io.Writer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package com.clickhouse.io
package com.clickhouse.spark.io

import com.clickhouse.Utils
import com.clickhouse.spark.Utils
import java.io.OutputStream
import java.util.concurrent.atomic.LongAdder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package com.clickhouse.parse
package com.clickhouse.spark.parse

import com.clickhouse.ClickHouseSQLParser.{
import com.clickhouse.spark.ClickHouseSQLParser.{
ColumnExprContext,
ColumnExprFunctionContext,
ColumnExprIdentifierContext,
Expand All @@ -31,8 +31,8 @@ import com.clickhouse.ClickHouseSQLParser.{
OrderExprContext,
SettingsClauseContext
}
import com.clickhouse.expr.{Expr, FieldRef, FuncExpr, OrderExpr, StringLiteral, TupleExpr}
import com.clickhouse.spec.{
import com.clickhouse.spark.expr.{Expr, FieldRef, FuncExpr, OrderExpr, StringLiteral, TupleExpr}
import com.clickhouse.spark.spec.{
DistributedEngineSpec,
MergeTreeEngineSpec,
ReplacingMergeTreeEngineSpec,
Expand All @@ -41,13 +41,13 @@ import com.clickhouse.spec.{
TableEngineSpec,
UnknownTableEngineSpec
}
import com.clickhouse.{ClickHouseSQLBaseVisitor, Logging, Utils}
import com.clickhouse.spark.{ClickHouseSQLBaseVisitor, Logging, Utils}

import scala.collection.JavaConverters._
import org.antlr.v4.runtime.tree.ParseTree
import com.clickhouse.expr._
import com.clickhouse.spec._
import com.clickhouse.ClickHouseSQLParser._
import com.clickhouse.spark.expr._
import com.clickhouse.spark.spec._
import com.clickhouse.spark.ClickHouseSQLParser._

class AstVisitor extends ClickHouseSQLBaseVisitor[AnyRef] with Logging {
import ParseUtils._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.clickhouse.parse
package com.clickhouse.spark.parse

import java.util
import org.antlr.v4.runtime.{ParserRuleContext, Token}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
* limitations under the License.
*/

package com.clickhouse.parse
package com.clickhouse.spark.parse

import com.clickhouse.{ClickHouseSQLLexer, ClickHouseSQLParser, Logging}
import com.clickhouse.expr.Expr
import com.clickhouse.spec.TableEngineSpec
import com.clickhouse.spark.{ClickHouseSQLLexer, ClickHouseSQLParser, Logging}
import com.clickhouse.spark.expr.Expr
import com.clickhouse.spark.spec.TableEngineSpec
import org.antlr.v4.runtime._
import org.antlr.v4.runtime.atn.PredictionMode
import org.antlr.v4.runtime.misc.ParseCancellationException
import com.clickhouse._
import com.clickhouse.spark._

class SQLParser(astVisitor: AstVisitor) extends Logging {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package com.clickhouse.spec
package com.clickhouse.spark.spec

import com.clickhouse.ToJson
import com.clickhouse.spark.ToJson

import java.util
import scala.collection.JavaConverters._
Expand Down
Loading

0 comments on commit 4a148ff

Please sign in to comment.