streaming-sql-engine 0.1.4__tar.gz → 0.1.7__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.
Files changed (73) hide show
  1. streaming_sql_engine-0.1.7/DEPLOYMENT.md +155 -0
  2. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/MANIFEST.in +1 -0
  3. {streaming_sql_engine-0.1.4/streaming_sql_engine.egg-info → streaming_sql_engine-0.1.7}/PKG-INFO +1 -2
  4. streaming_sql_engine-0.1.7/QUICK_DEPLOY.md +83 -0
  5. streaming_sql_engine-0.1.7/QUICK_FIX.md +54 -0
  6. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/README.md +533 -533
  7. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/__init__.py +31 -31
  8. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/HOW_PROTOCOL_DETECTION_WORKS.md +1 -0
  9. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/OPTIMIZER_AUTOMATED.md +13 -0
  10. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/SIMPLE_PROTOCOL_GUIDE.md +23 -2
  11. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/SIMPLE_SOURCE_FUNCTIONS.md +8 -4
  12. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/WHAT_IS_WHERE_TO_PARAMS.md +11 -3
  13. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/WHY_API_CONVERTER_NEEDED.md +9 -0
  14. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/WHY_MANUAL_PARSING.md +5 -1
  15. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/WHY_PROTOCOL_IN_SOURCES.md +14 -2
  16. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/executor.py +411 -409
  17. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/optimizer.py +469 -469
  18. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/protocol_helpers.py +493 -493
  19. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/pyproject.toml +68 -62
  20. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/setup.py +69 -70
  21. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7/streaming_sql_engine.egg-info}/PKG-INFO +1 -2
  22. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/streaming_sql_engine.egg-info/SOURCES.txt +8 -0
  23. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/APACHE_DRILL_COMPARISON.md +0 -0
  24. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/API_JOIN_OPERATIONS.md +0 -0
  25. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/ARCHITECTURAL_RECOMMENDATION.md +0 -0
  26. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/ARCHITECTURE_DECISION.md +0 -0
  27. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/ARCHITECTURE_SYNCED.md +0 -0
  28. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/BEST_USE_CASES.md +0 -0
  29. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/BETTER_FILTER_APPROACH.md +0 -0
  30. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/CHANGES_SUMMARY.md +0 -0
  31. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/COMPREHENSIVE_DOCUMENTATION.md +0 -0
  32. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/DEVELOPER_GUIDE.md +0 -0
  33. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/DUCKDB_COMPARISON.md +0 -0
  34. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/FINAL_IMPLEMENTATION_RECOMMENDATIONS.md +0 -0
  35. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/FINAL_RECOMMENDATION.md +0 -0
  36. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/HOW_TO_ADD_TO_PROJECT.md +0 -0
  37. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/INSTALLATION.md +0 -0
  38. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/JSONL_EXECUTOR_ANALYSIS.md +0 -0
  39. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/JSONL_EXECUTOR_REMOVED.md +0 -0
  40. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/LIBRARY_DOCUMENTATION.md +0 -0
  41. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/MIGRATION_GUIDE.md +0 -0
  42. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/MULTI_SOURCE_EXAMPLE_README.md +0 -0
  43. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/MYSQL_USAGE.md +0 -0
  44. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/OPTIMIZATIONS_BREAKDOWN.md +0 -0
  45. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/OPTIMIZATIONS_NOT_DATABASE_ONLY.md +0 -0
  46. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/OPTIMIZATIONS_VS_POLARS.md +0 -0
  47. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/PERFORMANCE.md +0 -0
  48. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/PERFORMANCE_COMPARISON.md +0 -0
  49. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/POLARS_AND_MMAP_GUIDE.md +0 -0
  50. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/PROTOCOL_AND_OPTIMIZATIONS_EXPLAINED.md +0 -0
  51. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/PROTOCOL_EXPLANATION.md +0 -0
  52. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/PUBLISHING.md +0 -0
  53. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/PYPI_CHECKLIST.md +0 -0
  54. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/QUICK_PUBLISH.md +0 -0
  55. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/QUICK_START.md +0 -0
  56. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/SOURCE_COMBINATIONS_GUIDE.md +0 -0
  57. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/TECHNICAL_DOCUMENTATION.md +0 -0
  58. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/documentation/USER_GUIDE.md +0 -0
  59. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/engine.py +0 -0
  60. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/evaluator.py +0 -0
  61. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/mmap_index.py +0 -0
  62. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/operators.py +0 -0
  63. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/operators_mmap.py +0 -0
  64. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/operators_polars.py +0 -0
  65. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/parser.py +0 -0
  66. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/planner.py +0 -0
  67. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/polars_expression_translator.py +0 -0
  68. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/polars_operators.py +0 -0
  69. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/requirements.txt +0 -0
  70. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/setup.cfg +0 -0
  71. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/streaming_sql_engine.egg-info/dependency_links.txt +0 -0
  72. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/streaming_sql_engine.egg-info/requires.txt +0 -0
  73. {streaming_sql_engine-0.1.4 → streaming_sql_engine-0.1.7}/streaming_sql_engine.egg-info/top_level.txt +0 -0
@@ -0,0 +1,155 @@
1
+ # Deploying to PyPI
2
+
3
+ ## Prerequisites
4
+
5
+ 1. **PyPI Account**: Create an account at https://pypi.org/account/register/
6
+ 2. **TestPyPI Account** (optional, for testing): https://test.pypi.org/account/register/
7
+ 3. **Install build tools**:
8
+ ```bash
9
+ pip install build twine
10
+ ```
11
+
12
+ ## Step 1: Update Version
13
+
14
+ Before deploying, update the version in:
15
+ - `pyproject.toml` (version field)
16
+ - `setup.py` (version field)
17
+ - `__init__.py` (__version__ variable)
18
+
19
+ Current version: **0.1.4**
20
+
21
+ ## Step 2: Clean Previous Builds
22
+
23
+ ```bash
24
+ # Remove old build artifacts
25
+ rm -rf build/
26
+ rm -rf dist/
27
+ rm -rf *.egg-info
28
+ rm -rf streaming_sql_engine.egg-info/
29
+ ```
30
+
31
+ ## Step 3: Build the Package
32
+
33
+ ```bash
34
+ # Build source distribution and wheel
35
+ python -m build
36
+ ```
37
+
38
+ This creates:
39
+ - `dist/streaming-sql-engine-0.1.4.tar.gz` (source distribution)
40
+ - `dist/streaming-sql-engine-0.1.4-py3-none-any.whl` (wheel)
41
+
42
+ ## Step 4: Test the Build (Optional but Recommended)
43
+
44
+ ### Test on TestPyPI first:
45
+
46
+ ```bash
47
+ # Upload to TestPyPI
48
+ python -m twine upload --repository testpypi dist/*
49
+
50
+ # Test installation from TestPyPI
51
+ pip install --index-url https://test.pypi.org/simple/ streaming-sql-engine
52
+ ```
53
+
54
+ ### Test locally:
55
+
56
+ ```bash
57
+ # Install from local build
58
+ pip install dist/streaming-sql-engine-0.1.4-py3-none-any.whl
59
+
60
+ # Test import
61
+ python -c "from streaming_sql_engine import Engine; print('✅ Import successful!')"
62
+ ```
63
+
64
+ ## Step 5: Upload to PyPI
65
+
66
+ ### Option A: Upload to TestPyPI First (Recommended)
67
+
68
+ ```bash
69
+ # Upload to TestPyPI
70
+ python -m twine upload --repository testpypi dist/*
71
+ ```
72
+
73
+ You'll be prompted for:
74
+ - Username: Your PyPI username
75
+ - Password: Your PyPI password (or API token)
76
+
77
+ ### Option B: Upload Directly to PyPI
78
+
79
+ ```bash
80
+ # Upload to PyPI
81
+ python -m twine upload dist/*
82
+ ```
83
+
84
+ ## Step 6: Verify Installation
85
+
86
+ After uploading, wait a few minutes for PyPI to process, then test:
87
+
88
+ ```bash
89
+ # Install from PyPI
90
+ pip install streaming-sql-engine
91
+
92
+ # Or with optional dependencies
93
+ pip install streaming-sql-engine[polars]
94
+ pip install streaming-sql-engine[db]
95
+ pip install streaming-sql-engine[all]
96
+
97
+ # Test import
98
+ python -c "from streaming_sql_engine import Engine, register_file_source; print('✅ Import successful!')"
99
+ ```
100
+
101
+ ## Using API Tokens (More Secure)
102
+
103
+ Instead of using your password, create an API token:
104
+
105
+ 1. Go to https://pypi.org/manage/account/
106
+ 2. Scroll to "API tokens"
107
+ 3. Create a new token with scope "Entire account" or specific project
108
+ 4. Use the token as username: `__token__` and password: `pypi-...` (the token)
109
+
110
+ ## Troubleshooting
111
+
112
+ ### "Package already exists"
113
+ - Increment version number in `pyproject.toml`, `setup.py`, and `__init__.py`
114
+
115
+ ### "Invalid distribution"
116
+ - Make sure all required files are included
117
+ - Check `MANIFEST.in` includes necessary files
118
+ - Verify `pyproject.toml` is valid
119
+
120
+ ### "Module not found" after installation
121
+ - Check `package_dir` in `setup.py` matches your structure
122
+ - Verify `__init__.py` is in the correct location
123
+ - Check that all Python files are included
124
+
125
+ ## Quick Deploy Script
126
+
127
+ Create a `deploy.sh` script:
128
+
129
+ ```bash
130
+ #!/bin/bash
131
+ set -e
132
+
133
+ echo "🧹 Cleaning old builds..."
134
+ rm -rf build/ dist/ *.egg-info streaming_sql_engine.egg-info/
135
+
136
+ echo "📦 Building package..."
137
+ python -m build
138
+
139
+ echo "📤 Uploading to PyPI..."
140
+ python -m twine upload dist/*
141
+
142
+ echo "✅ Deployment complete!"
143
+ echo "Test with: pip install streaming-sql-engine"
144
+ ```
145
+
146
+ Make it executable: `chmod +x deploy.sh`
147
+
148
+ ## Version History
149
+
150
+ - **0.1.4** - Current version with protocol helpers and WHERE clause pushdown to joined tables
151
+ - **0.1.3** - Previous version
152
+ - **0.1.2** - Previous version
153
+ - **0.1.0** - Initial release
154
+
155
+
@@ -9,3 +9,4 @@ recursive-exclude examples __pycache__
9
9
  recursive-exclude * __pycache__
10
10
  recursive-exclude * *.pyc
11
11
 
12
+
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streaming-sql-engine
3
- Version: 0.1.4
3
+ Version: 0.1.7
4
4
  Summary: A lightweight SQL execution engine for streaming row-by-row queries with joins across multiple data sources
5
5
  Home-page: https://github.com/Ierofantis/streaming-sql-engine/tree/master
6
6
  Author: Theodore Pantazopoulo
7
7
  Author-email: Theodore Pantazopoulo <your.email@example.com>
8
- License: MIT
9
8
  Project-URL: Homepage, https://github.com/Ierofantis/streaming-sql-engine/tree/master
10
9
  Project-URL: Repository, https://github.com/Ierofantis/streaming-sql-engine/tree/master
11
10
  Project-URL: Issues, https://github.com/Ierofantis/streaming-sql-engine/issues
@@ -0,0 +1,83 @@
1
+ # Quick PyPI Deployment Guide
2
+
3
+ ## Prerequisites
4
+
5
+ Install build tools:
6
+ ```bash
7
+ pip install build twine
8
+ ```
9
+
10
+ ## Step 1: Build the Package
11
+
12
+ ```bash
13
+ # Clean old builds
14
+ rmdir /s /q build dist *.egg-info streaming_sql_engine.egg-info 2>nul
15
+
16
+ # Build package
17
+ python -m build
18
+ ```
19
+
20
+ This creates:
21
+ - `dist/streaming-sql-engine-0.1.4.tar.gz`
22
+ - `dist/streaming-sql-engine-0.1.4-py3-none-any.whl`
23
+
24
+ ## Step 2: Upload to PyPI
25
+
26
+ ### Option A: Test on TestPyPI First (Recommended)
27
+
28
+ ```bash
29
+ python -m twine upload --repository testpypi dist/*
30
+ ```
31
+
32
+ Then test installation:
33
+ ```bash
34
+ pip install --index-url https://test.pypi.org/simple/ streaming-sql-engine
35
+ ```
36
+
37
+ ### Option B: Upload to PyPI
38
+
39
+ ```bash
40
+ python -m twine upload dist/*
41
+ ```
42
+
43
+ You'll be prompted for:
44
+ - **Username**: Your PyPI username (or `__token__` for API token)
45
+ - **Password**: Your PyPI password (or API token starting with `pypi-`)
46
+
47
+ ## Step 3: Verify Installation
48
+
49
+ Wait a few minutes, then test:
50
+
51
+ ```bash
52
+ pip install streaming-sql-engine
53
+
54
+ # Or with optional dependencies
55
+ pip install streaming-sql-engine[polars]
56
+ pip install streaming-sql-engine[db]
57
+ pip install streaming-sql-engine[all]
58
+
59
+ # Test import
60
+ python -c "from streaming_sql_engine import Engine, register_file_source; print('✅ Success!')"
61
+ ```
62
+
63
+ ## Using API Tokens (More Secure)
64
+
65
+ 1. Go to https://pypi.org/manage/account/
66
+ 2. Create API token
67
+ 3. Use username: `__token__` and password: `pypi-...` (your token)
68
+
69
+ ## Current Version: 0.1.4
70
+
71
+ Updated files:
72
+ - ✅ `pyproject.toml` - version 0.1.4
73
+ - ✅ `setup.py` - version 0.1.4
74
+ - ✅ `__init__.py` - version 0.1.4
75
+
76
+ ## What's New in 0.1.4
77
+
78
+ - Protocol helpers for automatic filter pushdown and column pruning
79
+ - WHERE clause pushdown to joined tables
80
+ - Improved performance with optimized protocol detection
81
+ - Better error handling and debugging
82
+
83
+
@@ -0,0 +1,54 @@
1
+ # Quick Fix for join_required_columns Bug
2
+
3
+ ## Problem
4
+ The installed version from PyPI (0.1.4) has a bug where `join_required_columns` is assigned inside an `if debug:` block but used outside, causing `UnboundLocalError` when `debug=False`.
5
+
6
+ ## Solution 1: Patch Installed Version (Quick Fix)
7
+
8
+ Run this on your server:
9
+
10
+ ```bash
11
+ # Download the patch script
12
+ # Or copy examples/patch_executor.py to your server
13
+
14
+ # Run the patch
15
+ python3 patch_executor.py
16
+ ```
17
+
18
+ This will automatically fix the installed version.
19
+
20
+ ## Solution 2: Update Package (Recommended)
21
+
22
+ Update to version 0.1.5 which has the fix:
23
+
24
+ ```bash
25
+ pip install --upgrade streaming-sql-engine==0.1.5
26
+ ```
27
+
28
+ ## Solution 3: Manual Patch
29
+
30
+ If the automatic patch doesn't work, manually edit:
31
+
32
+ ```bash
33
+ # Find the installed package
34
+ python3 -c "import streaming_sql_engine; print(streaming_sql_engine.__file__)"
35
+
36
+ # Edit the executor.py file
37
+ # Change line ~128-130 from:
38
+ # if debug:
39
+ # # Get required columns for joined table
40
+ # join_required_columns = plan.required_columns.get(join_info.table)
41
+ #
42
+ # To:
43
+ # # Get required columns for joined table (must be outside debug block!)
44
+ # join_required_columns = plan.required_columns.get(join_info.table)
45
+ #
46
+ # if debug:
47
+ ```
48
+
49
+ ## What Was Fixed
50
+
51
+ - Moved `join_required_columns` assignment outside the `debug` block
52
+ - Fixed reconciliation script bug with `spryker_id_int` reference
53
+
54
+