moose-lib 0.6.164__tar.gz → 0.6.166__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of moose-lib might be problematic. Click here for more details.
- {moose_lib-0.6.164 → moose_lib-0.6.166}/PKG-INFO +1 -1
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/olap_table.py +9 -3
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib.egg-info/PKG-INFO +1 -1
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_s3queue_config.py +6 -12
- {moose_lib-0.6.164 → moose_lib-0.6.166}/README.md +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/blocks.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/clients/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/clients/redis_client.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/commons.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/config/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/config/config_file.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/config/runtime.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/data_models.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/_registry.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/consumption.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/ingest_api.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/ingest_pipeline.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/life_cycle.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/materialized_view.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/registry.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/sql_resource.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/stream.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/types.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/view.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/web_app.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/web_app_helpers.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2/workflow.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/dmv2_serializer.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/internal.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/main.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/query_builder.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/query_param.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/secrets.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/streaming/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/streaming/streaming_function_runner.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/utilities/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib/utilities/sql.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib.egg-info/SOURCES.txt +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib.egg-info/dependency_links.txt +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib.egg-info/requires.txt +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/moose_lib.egg-info/top_level.txt +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/setup.cfg +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/setup.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/__init__.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/conftest.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_moose.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_olap_table_versioning.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_query_builder.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_redis_client.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_secrets.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_simple_aggregate.py +0 -0
- {moose_lib-0.6.164 → moose_lib-0.6.166}/tests/test_web_app.py +0 -0
|
@@ -155,9 +155,10 @@ class OlapConfig(BaseModel):
|
|
|
155
155
|
if self.engine:
|
|
156
156
|
from ..blocks import S3Engine, S3QueueEngine, BufferEngine, DistributedEngine
|
|
157
157
|
|
|
158
|
-
#
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
# S3QueueEngine, BufferEngine, and DistributedEngine don't support ORDER BY
|
|
159
|
+
# Note: S3Engine DOES support ORDER BY (unlike S3Queue)
|
|
160
|
+
engines_without_order_by = (S3QueueEngine, BufferEngine, DistributedEngine)
|
|
161
|
+
if isinstance(self.engine, engines_without_order_by):
|
|
161
162
|
engine_name = type(self.engine).__name__
|
|
162
163
|
|
|
163
164
|
if has_fields or has_expr:
|
|
@@ -166,6 +167,11 @@ class OlapConfig(BaseModel):
|
|
|
166
167
|
f"Remove order_by_fields or order_by_expression from your configuration."
|
|
167
168
|
)
|
|
168
169
|
|
|
170
|
+
# All non-MergeTree engines don't support SAMPLE BY
|
|
171
|
+
engines_without_sample_by = (S3Engine, S3QueueEngine, BufferEngine, DistributedEngine)
|
|
172
|
+
if isinstance(self.engine, engines_without_sample_by):
|
|
173
|
+
engine_name = type(self.engine).__name__
|
|
174
|
+
|
|
169
175
|
if self.sample_by_expression:
|
|
170
176
|
raise ValueError(
|
|
171
177
|
f"{engine_name} does not support SAMPLE BY clause. "
|
|
@@ -291,18 +291,12 @@ def test_non_mergetree_engines_reject_unsupported_clauses():
|
|
|
291
291
|
"""Test that non-MergeTree engines reject unsupported ORDER BY and SAMPLE BY clauses."""
|
|
292
292
|
from moose_lib.blocks import S3Engine, S3QueueEngine, BufferEngine, DistributedEngine
|
|
293
293
|
|
|
294
|
-
# Test S3Engine
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
with pytest.raises(ValueError, match="S3Engine does not support ORDER BY clauses"):
|
|
302
|
-
OlapConfig(
|
|
303
|
-
engine=S3Engine(path="s3://bucket/file.json", format="JSONEachRow"),
|
|
304
|
-
order_by_expression="(id, name)"
|
|
305
|
-
)
|
|
294
|
+
# Test S3Engine DOES support ORDER BY (should not raise)
|
|
295
|
+
config_s3_with_order_by = OlapConfig(
|
|
296
|
+
engine=S3Engine(path="s3://bucket/file.json", format="JSONEachRow"),
|
|
297
|
+
order_by_fields=["id"]
|
|
298
|
+
)
|
|
299
|
+
assert config_s3_with_order_by.order_by_fields == ["id"]
|
|
306
300
|
|
|
307
301
|
# Test S3Engine rejects SAMPLE BY
|
|
308
302
|
with pytest.raises(ValueError, match="S3Engine does not support SAMPLE BY clause"):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|