aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-04-12 11:56:34 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-04-12 12:04:18 +0300
commite8207cbbcd0c8f03d2bd747936c406748306856c (patch)
tree09f3d27648f2e6265aa94319f99e2dd38ff5bb1a
parent174505ce5cdff80adfba073dc3ee3528c7f0c94a (diff)
downloadydb-e8207cbbcd0c8f03d2bd747936c406748306856c.tar.gz
Intermediate changes
-rw-r--r--contrib/python/clickhouse-connect/.dist-info/METADATA2
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/__version__.py2
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py20
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py4
-rw-r--r--contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py2
-rw-r--r--contrib/python/clickhouse-connect/ya.make2
-rw-r--r--yt/yt/core/rpc/unittests/rpc_ut.cpp10
7 files changed, 31 insertions, 11 deletions
diff --git a/contrib/python/clickhouse-connect/.dist-info/METADATA b/contrib/python/clickhouse-connect/.dist-info/METADATA
index 7e568e330b..093e1bf5ed 100644
--- a/contrib/python/clickhouse-connect/.dist-info/METADATA
+++ b/contrib/python/clickhouse-connect/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: clickhouse-connect
-Version: 0.7.4
+Version: 0.7.5
Summary: ClickHouse Database Core Driver for Python, Pandas, and Superset
Home-page: https://github.com/ClickHouse/clickhouse-connect
Author: ClickHouse Inc.
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
index 33c23e6624..c584cf2c45 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
@@ -1 +1 @@
-version = '0.7.4'
+version = '0.7.5'
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py b/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py
index 598e2e5adb..483beaabe2 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py
@@ -226,6 +226,26 @@ class ReplicatedSummingMergeTree(ReplicatedMergeTree):
pass
+class SharedReplacingMergeTree(ReplacingMergeTree):
+ pass
+
+
+class SharedAggregatingMergeTree(AggregatingMergeTree):
+ pass
+
+
+class SharedSummingMergeTree(SummingMergeTree):
+ pass
+
+
+class SharedVersionedCollapsingMergeTree(VersionedCollapsingMergeTree):
+ pass
+
+
+class SharedGraphiteMergeTree(GraphiteMergeTree):
+ pass
+
+
def build_engine(full_engine: str) -> Optional[TableEngine]:
"""
Factory function to create TableEngine class from ClickHouse full_engine expression
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py
index 2d34f71ba8..be78e4e2bc 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py
@@ -35,7 +35,7 @@ class ExternalFile:
self.file_name = file_name
if file_name != path_name and path_base != self.name:
logger.warning('External data name %s and file_path %s use different names', file_name, path_name)
- elif data:
+ elif data is not None:
if not file_name:
raise ProgrammingError('Name is required for query external data')
self.data = data
@@ -85,7 +85,7 @@ class ExternalData:
structure: Optional[Union[str, Sequence[str]]] = None,
mime_type: Optional[str] = None):
self.files: list[ExternalFile] = []
- if file_path or data:
+ if file_path or data is not None:
first_file = ExternalFile(file_path=file_path,
file_name=file_name,
data=data,
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
index 6ad3fae9f1..235fe5e7de 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
@@ -412,7 +412,7 @@ def format_query_value(value: Any, server_tz: tzinfo = pytz.UTC):
return format_query_value(value.value, server_tz)
if isinstance(value, (uuid.UUID, ipaddress.IPv4Address, ipaddress.IPv6Address)):
return f"'{value}'"
- return str(value)
+ return value
# pylint: disable=too-many-branches
diff --git a/contrib/python/clickhouse-connect/ya.make b/contrib/python/clickhouse-connect/ya.make
index cd5de03ec7..6bd170d5af 100644
--- a/contrib/python/clickhouse-connect/ya.make
+++ b/contrib/python/clickhouse-connect/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(0.7.4)
+VERSION(0.7.5)
LICENSE(Apache-2.0)
diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp
index eb3e393603..bf4a23928c 100644
--- a/yt/yt/core/rpc/unittests/rpc_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp
@@ -529,7 +529,7 @@ TYPED_TEST(TNotGrpcTest, TrackedRegularAttachments)
// header + body = 110 bytes.
// attachments = 22 bytes.
// sum is 4228 bytes.
- EXPECT_EQ(4228 + 32768, memoryUsageTracker->GetTotalUsage());
+ EXPECT_TRUE(4228 + 32768 <= memoryUsageTracker->GetTotalUsage());
EXPECT_EQ(3u, attachments.size());
EXPECT_EQ("Hello_", StringFromSharedRef(attachments[0]));
EXPECT_EQ("from_", StringFromSharedRef(attachments[1]));
@@ -595,7 +595,7 @@ TYPED_TEST(TNotGrpcTest, Compression)
// attachmentStrings[1].size() = 36 * 2 bytes from decoder.
// attachmentStrings[2].size() = 90 * 2 bytes from decoder.
// sum is 4591 bytes.
- EXPECT_EQ(4591 + 32768, memoryUsageTracker->GetTotalUsage());
+ EXPECT_TRUE(4591 + 32768 <= memoryUsageTracker->GetTotalUsage());
EXPECT_TRUE(rsp->message() == message);
EXPECT_TRUE(rsp->GetResponseMessage().Size() >= 2);
const auto& serializedResponseBody = SerializeProtoToRefWithCompression(*rsp, responseCodecId);
@@ -846,7 +846,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking)
// 1261568 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 110 (header + body).
// 32768 - socket buffers, 4096 - default size per request.
- EXPECT_EQ(rpcUsage, 1294568);
+ EXPECT_TRUE(rpcUsage >= 1294568);
}
}
@@ -866,7 +866,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
// 11059200 / 300 = 36974 = 32768 + 4096 + 110 (header + body).
// 4 KB - stub for request.
// See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
- EXPECT_EQ(11092200, memoryUsageTracker->GetTotalUsage());
+ EXPECT_TRUE(11092200 <= memoryUsageTracker->GetTotalUsage());
}
}
@@ -922,7 +922,7 @@ TYPED_TEST(TNotGrpcTest, MemoryOvercommit)
// default stub = 4096.
// header + body = 110 bytes.
// attachments = 6_KB kbytes.
- EXPECT_EQ(rpcUsage, 32768 + 4096 + 6144 + 110);
+ EXPECT_TRUE(rpcUsage >= 32768 + 4096 + 6144 + 110);
}
}