feldera 0.104.0__tar.gz → 0.106.0__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.
- {feldera-0.104.0 → feldera-0.106.0}/PKG-INFO +1 -1
- {feldera-0.104.0 → feldera-0.106.0}/feldera/pipeline.py +7 -1
- {feldera-0.104.0 → feldera-0.106.0}/feldera.egg-info/PKG-INFO +1 -1
- {feldera-0.104.0 → feldera-0.106.0}/pyproject.toml +1 -1
- {feldera-0.104.0 → feldera-0.106.0}/tests/test_shared_pipeline1.py +6 -3
- {feldera-0.104.0 → feldera-0.106.0}/tests/test_udf.py +2 -2
- {feldera-0.104.0 → feldera-0.106.0}/README.md +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/__init__.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/_callback_runner.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/_helpers.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/enums.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/output_handler.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/pipeline_builder.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/__init__.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/_helpers.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/_httprequests.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/config.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/errors.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/feldera_client.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/feldera_config.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/pipeline.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/sql_table.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/rest/sql_view.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/runtime_config.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera/stats.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera.egg-info/SOURCES.txt +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera.egg-info/dependency_links.txt +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera.egg-info/requires.txt +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/feldera.egg-info/top_level.txt +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/setup.cfg +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/tests/test_pipeline_builder.py +0 -0
- {feldera-0.104.0 → feldera-0.106.0}/tests/test_shared_pipeline0.py +0 -0
|
@@ -3,6 +3,7 @@ import time
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
import pandas
|
|
6
|
+
from uuid import UUID
|
|
6
7
|
|
|
7
8
|
from typing import List, Dict, Callable, Optional, Generator, Mapping, Any
|
|
8
9
|
from collections import deque
|
|
@@ -620,7 +621,7 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
|
|
|
620
621
|
time.sleep(0.1)
|
|
621
622
|
continue
|
|
622
623
|
|
|
623
|
-
|
|
624
|
+
break
|
|
624
625
|
|
|
625
626
|
return uuid
|
|
626
627
|
|
|
@@ -636,6 +637,8 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
|
|
|
636
637
|
resp = self.client.sync_checkpoint_status(self.name)
|
|
637
638
|
success = resp.get("success")
|
|
638
639
|
|
|
640
|
+
fail = resp.get("failure") or {}
|
|
641
|
+
|
|
639
642
|
if uuid == success:
|
|
640
643
|
return CheckpointStatus.Success
|
|
641
644
|
|
|
@@ -645,6 +648,9 @@ pipeline '{self.name}' to sync checkpoint '{uuid}'"""
|
|
|
645
648
|
failure.error = fail.get("error", "")
|
|
646
649
|
return failure
|
|
647
650
|
|
|
651
|
+
if (success is None) or UUID(uuid) > UUID(success):
|
|
652
|
+
return CheckpointStatus.InProgress
|
|
653
|
+
|
|
648
654
|
return CheckpointStatus.Unknown
|
|
649
655
|
|
|
650
656
|
def query(self, query: str) -> Generator[Mapping[str, Any], None, None]:
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import random
|
|
2
|
+
import time
|
|
1
3
|
from typing import Optional
|
|
2
4
|
from feldera.runtime_config import RuntimeConfig, Storage
|
|
3
5
|
from tests import enterprise_only
|
|
@@ -12,7 +14,7 @@ SECRET_KEY = "miniopasswd"
|
|
|
12
14
|
|
|
13
15
|
def storage_cfg(
|
|
14
16
|
endpoint: Optional[str] = None,
|
|
15
|
-
start_from_checkpoint:
|
|
17
|
+
start_from_checkpoint: Optional[str] = None,
|
|
16
18
|
auth_err: bool = False,
|
|
17
19
|
) -> dict:
|
|
18
20
|
return {
|
|
@@ -44,7 +46,8 @@ class TestCheckpointSync(SharedTestPipeline):
|
|
|
44
46
|
self.set_runtime_config(RuntimeConfig(storage=Storage(config=storage_config)))
|
|
45
47
|
self.pipeline.start()
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
random.seed(time.time())
|
|
50
|
+
data = [{"c0": i, "c1": str(i)} for i in range(1, random.randint(10, 20))]
|
|
48
51
|
self.pipeline.input_json("t0", data)
|
|
49
52
|
self.pipeline.execute("INSERT INTO t0 VALUES (4, 'exists')")
|
|
50
53
|
got_before = list(self.pipeline.query("SELECT * FROM v0"))
|
|
@@ -56,7 +59,7 @@ class TestCheckpointSync(SharedTestPipeline):
|
|
|
56
59
|
self.pipeline.clear_storage()
|
|
57
60
|
|
|
58
61
|
# Restart pipeline from checkpoint
|
|
59
|
-
storage_config = storage_cfg(start_from_checkpoint=
|
|
62
|
+
storage_config = storage_cfg(start_from_checkpoint="latest", auth_err=auth_err)
|
|
60
63
|
self.set_runtime_config(RuntimeConfig(storage=Storage(config=storage_config)))
|
|
61
64
|
self.pipeline.start()
|
|
62
65
|
got_after = list(self.pipeline.query("SELECT * FROM v0"))
|
|
@@ -211,10 +211,10 @@ pub fn var2var(i: Option<Variant>) -> Result<Option<Variant>, Box<dyn std::error
|
|
|
211
211
|
pub fn nvar2nvar(i: Variant) -> Result<Variant, Box<dyn std::error::Error>> {
|
|
212
212
|
Ok(i)
|
|
213
213
|
}
|
|
214
|
-
pub fn dec2dec(i: Option<SqlDecimal
|
|
214
|
+
pub fn dec2dec(i: Option<SqlDecimal<7, 2>>) -> Result<Option<SqlDecimal<7, 2>>, Box<dyn std::error::Error>> {
|
|
215
215
|
Ok(i)
|
|
216
216
|
}
|
|
217
|
-
pub fn ndec2ndec(i: SqlDecimal) -> Result<SqlDecimal, Box<dyn std::error::Error>> {
|
|
217
|
+
pub fn ndec2ndec(i: SqlDecimal<7, 2>) -> Result<SqlDecimal<7, 2>, Box<dyn std::error::Error>> {
|
|
218
218
|
Ok(i)
|
|
219
219
|
}
|
|
220
220
|
pub fn str2str(i: Option<SqlString>) -> Result<Option<SqlString>, Box<dyn std::error::Error>> {
|
|
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
|