moose-lib 0.6.164__py3-none-any.whl → 0.6.166__py3-none-any.whl

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.

@@ -155,9 +155,10 @@ class OlapConfig(BaseModel):
155
155
  if self.engine:
156
156
  from ..blocks import S3Engine, S3QueueEngine, BufferEngine, DistributedEngine
157
157
 
158
- # All non-MergeTree engines don't support ORDER BY
159
- non_mergetree_engines = (S3Engine, S3QueueEngine, BufferEngine, DistributedEngine)
160
- if isinstance(self.engine, non_mergetree_engines):
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. "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moose_lib
3
- Version: 0.6.164
3
+ Version: 0.6.166
4
4
  Home-page: https://www.fiveonefour.com/moose
5
5
  Author: Fiveonefour Labs Inc.
6
6
  Author-email: support@fiveonefour.com
@@ -20,7 +20,7 @@ moose_lib/dmv2/ingest_api.py,sha256=XhvHHgGPXp-BuRpAALth-FRhanwy-zJQ_83Cg_RLolM,
20
20
  moose_lib/dmv2/ingest_pipeline.py,sha256=R8NRrfD9zkEzwWEJKIrNL9Nk18DdGc7wdAakae_2-7o,8459
21
21
  moose_lib/dmv2/life_cycle.py,sha256=wl0k6yzwU1MJ_fO_UkN29buoY5G6ChYZvfwigP9fVfM,1254
22
22
  moose_lib/dmv2/materialized_view.py,sha256=wTam1V5CC2rExt7YrdK_Cz4rRTONm2keKOF951LlCP4,4875
23
- moose_lib/dmv2/olap_table.py,sha256=AfKTH6kabyE2qzrz-9C9BdDHyQor_JOTfIqplAkP56k,37474
23
+ moose_lib/dmv2/olap_table.py,sha256=gYVuKRIKooDNFsyS9FFydbvHWpxkc716nDSw2FwXrFc,37851
24
24
  moose_lib/dmv2/registry.py,sha256=5V8HRKBJXKLIi5tdIC2tKEmsGELQ1C2fBrMjns8a3ao,2947
25
25
  moose_lib/dmv2/sql_resource.py,sha256=kUZoGqxhZMHMthtBZGYJBxTFjXkspXiWLXhJRYXgGUM,1864
26
26
  moose_lib/dmv2/stream.py,sha256=pDryS1x5zMkDSJsFlGqm8quwKTl1ctAL-a_U8ySgqQI,18043
@@ -39,11 +39,11 @@ tests/test_moose.py,sha256=mBsx_OYWmL8ppDzL_7Bd7xR6qf_i3-pCIO3wm2iQNaA,2136
39
39
  tests/test_olap_table_versioning.py,sha256=ffuJsO5TYKBd2aWV0GWDmosCwL4j518Y_MqYJdrfgDY,7041
40
40
  tests/test_query_builder.py,sha256=O3imdFSaqU13kbK1jSQaHbBgynhVmJaApT8DlRqYwJU,1116
41
41
  tests/test_redis_client.py,sha256=d9_MLYsJ4ecVil_jPB2gW3Q5aWnavxmmjZg2uYI3LVo,3256
42
- tests/test_s3queue_config.py,sha256=TSXSTAjcAVpZuvQza2i0XWGQTeaNs4mRZeH4pFCujNY,14728
42
+ tests/test_s3queue_config.py,sha256=A-17Lir2kvYoUA0qEaNczOkLKhHPzyp3glka7YqnPws,14490
43
43
  tests/test_secrets.py,sha256=g5ZjtOyT7vTz_sRUB71Vd6s715u0gMc4C-_8m_59Mtg,8347
44
44
  tests/test_simple_aggregate.py,sha256=yyFSYHUXskA1aTcwC-KQ9XmgOikeQ8wKXzntsUBIC6w,4055
45
45
  tests/test_web_app.py,sha256=iL86sg0NS2k6nP8jIGKZvrtg0BjvaqNTRp7-4T1TTck,6557
46
- moose_lib-0.6.164.dist-info/METADATA,sha256=PVwuy8RcAsf6zD6GARk1NQYQGnuqqC0L1eX2rB_pJtE,827
47
- moose_lib-0.6.164.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- moose_lib-0.6.164.dist-info/top_level.txt,sha256=XEns2-4aCmGp2XjJAeEH9TAUcGONLnSLy6ycT9FSJh8,16
49
- moose_lib-0.6.164.dist-info/RECORD,,
46
+ moose_lib-0.6.166.dist-info/METADATA,sha256=qWGgN_bNUqQBhH1_41epqkL7iUI2yVYV1M74r3bgte4,827
47
+ moose_lib-0.6.166.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ moose_lib-0.6.166.dist-info/top_level.txt,sha256=XEns2-4aCmGp2XjJAeEH9TAUcGONLnSLy6ycT9FSJh8,16
49
+ moose_lib-0.6.166.dist-info/RECORD,,
@@ -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 rejects ORDER BY
295
- with pytest.raises(ValueError, match="S3Engine does not support ORDER BY clauses"):
296
- OlapConfig(
297
- engine=S3Engine(path="s3://bucket/file.json", format="JSONEachRow"),
298
- order_by_fields=["id"]
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"):