Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change package from xenon.clickhouse to com.clickhouse #343

Merged
merged 3 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "xenon.clickhouse"]
arguments += ["-visitor", "-package", "com.clickhouse"]
}

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.xenon.clickhouse=DEBUG
log4j.logger.com.clickhouse=DEBUG
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
* limitations under the License.
*/

package xenon.clickhouse
package com.clickhouse

import xenon.clickhouse.base.ClickHouseSingleMixIn
import xenon.clickhouse.client.NodeClient
import xenon.clickhouse.hash._
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._

class HashSuite extends ClickHouseSingleMixIn with Logging {

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

package xenon.clickhouse

import xenon.clickhouse.base.ClickHouseSingleMixIn
package com.clickhouse

import com.clickhouse.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 xenon.clickhouse.exception;
package com.clickhouse.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 xenon.clickhouse.hash.cityhash;
package com.clickhouse.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 xenon.clickhouse.hash.cityhash;
package com.clickhouse.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 xenon.clickhouse
package com.clickhouse

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 xenon.clickhouse
package com.clickhouse

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 xenon.clickhouse
package com.clickhouse

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 xenon.clickhouse.client
package com.clickhouse.client

import xenon.clickhouse.Logging
import xenon.clickhouse.exception.CHClientException
import xenon.clickhouse.spec.ClusterSpec
import com.clickhouse.Logging
import com.clickhouse.exception.CHClientException
import com.clickhouse.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,17 +12,23 @@
* limitations under the License.
*/

package xenon.clickhouse.client
package com.clickhouse.client

import com.clickhouse.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.{
JSONCompactEachRowWithNamesAndTypesSimpleOutput,
JSONEachRowSimpleOutput,
NamesAndTypes,
SimpleOutput
}
import com.clickhouse.spec.NodeSpec
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ObjectNode
import xenon.clickhouse.Logging
import xenon.clickhouse.exception.{CHClientException, CHException, CHServerException}
import xenon.clickhouse.format._
import xenon.clickhouse.spec.NodeSpec
import com.clickhouse.format._

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

package xenon.clickhouse.client
package com.clickhouse.client

import java.util.concurrent.ConcurrentHashMap
import com.clickhouse.Logging
import com.clickhouse.spec.{NodeSpec, Nodes}

import java.util.concurrent.ConcurrentHashMap
import scala.collection.JavaConverters._
import scala.util.Random.shuffle

import xenon.clickhouse.spec.{NodeSpec, Nodes}
import xenon.clickhouse.Logging

object NodesClient {
def apply(nodes: Nodes) = new NodesClient(nodes)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* limitations under the License.
*/

package xenon.clickhouse.exception
package com.clickhouse.exception

import xenon.clickhouse.spec.NodeSpec
import com.clickhouse.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 xenon.clickhouse.expr
package com.clickhouse.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 xenon.clickhouse.format
package com.clickhouse.format

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

package xenon.clickhouse.format
package com.clickhouse.format

import com.clickhouse.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 xenon.clickhouse.JsonProtocol.om
import xenon.clickhouse.exception.CHClientException
import com.clickhouse.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 xenon.clickhouse.format
package com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.hash

import xenon.clickhouse.hash.cityhash.{CityHash_v1_0_2, UInt128}
import com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.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 xenon.clickhouse.hash
package com.clickhouse.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 xenon.clickhouse.io
package com.clickhouse.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 xenon.clickhouse.io
package com.clickhouse.io

import java.io.Writer

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

package xenon.clickhouse.io

import xenon.clickhouse.Utils
package com.clickhouse.io

import com.clickhouse.Utils
mzitnik marked this conversation as resolved.
Show resolved Hide resolved
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,15 +12,42 @@
* limitations under the License.
*/

package xenon.clickhouse.parse
package com.clickhouse.parse

import com.clickhouse.ClickHouseSQLParser.{
ColumnExprContext,
ColumnExprFunctionContext,
ColumnExprIdentifierContext,
ColumnExprListContext,
ColumnExprLiteralContext,
ColumnExprParensContext,
ColumnExprPrecedence1Context,
ColumnExprPrecedence2Context,
ColumnExprTupleContext,
ColumnsExprColumnContext,
ColumnsExprContext,
EngineClauseContext,
OrderByClauseContext,
OrderExprContext,
SettingsClauseContext
}
import com.clickhouse.expr.{Expr, FieldRef, FuncExpr, OrderExpr, StringLiteral, TupleExpr}
import com.clickhouse.spec.{
DistributedEngineSpec,
MergeTreeEngineSpec,
ReplacingMergeTreeEngineSpec,
ReplicatedMergeTreeEngineSpec,
ReplicatedReplacingMergeTreeEngineSpec,
TableEngineSpec,
UnknownTableEngineSpec
}
import com.clickhouse.{ClickHouseSQLBaseVisitor, Logging, Utils}

import scala.collection.JavaConverters._

import org.antlr.v4.runtime.tree.ParseTree
import xenon.clickhouse.{ClickHouseSQLBaseVisitor, Logging, Utils}
import xenon.clickhouse.expr._
import xenon.clickhouse.spec._
import xenon.clickhouse.ClickHouseSQLParser._
import com.clickhouse.expr._
import com.clickhouse.spec._
import com.clickhouse.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 xenon.clickhouse.parse
package com.clickhouse.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,14 +12,15 @@
* limitations under the License.
*/

package xenon.clickhouse.parse
package com.clickhouse.parse

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

class SQLParser(astVisitor: AstVisitor) extends Logging {

Expand Down
Loading