streaming-sql-engine 0.1.13__tar.gz → 0.1.14__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 (79) hide show
  1. {streaming_sql_engine-0.1.13/streaming_sql_engine.egg-info → streaming_sql_engine-0.1.14}/PKG-INFO +1 -1
  2. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/__init__.py +1 -1
  3. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/executor.py +14 -5
  4. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/pyproject.toml +1 -1
  5. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/setup.py +1 -1
  6. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14/streaming_sql_engine.egg-info}/PKG-INFO +1 -1
  7. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/DEPLOYMENT.md +0 -0
  8. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/MANIFEST.in +0 -0
  9. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/QUICK_DEPLOY.md +0 -0
  10. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/QUICK_FIX.md +0 -0
  11. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/README.md +0 -0
  12. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/APACHE_DRILL_COMPARISON.md +0 -0
  13. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/API_JOIN_OPERATIONS.md +0 -0
  14. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/ARCHITECTURAL_RECOMMENDATION.md +0 -0
  15. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/ARCHITECTURE_DECISION.md +0 -0
  16. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/ARCHITECTURE_SYNCED.md +0 -0
  17. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/BEST_USE_CASES.md +0 -0
  18. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/BETTER_FILTER_APPROACH.md +0 -0
  19. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/CHANGES_SUMMARY.md +0 -0
  20. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/COMPREHENSIVE_ARTICLE.md +0 -0
  21. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/COMPREHENSIVE_DOCUMENTATION.md +0 -0
  22. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/DEVELOPER_GUIDE.md +0 -0
  23. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/DUCKDB_COMPARISON.md +0 -0
  24. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/FINAL_IMPLEMENTATION_RECOMMENDATIONS.md +0 -0
  25. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/FINAL_RECOMMENDATION.md +0 -0
  26. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/FIRST_MATCH_ONLY_WARNINGS.md +0 -0
  27. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/HOW_PROTOCOL_DETECTION_WORKS.md +0 -0
  28. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/HOW_TO_ADD_TO_PROJECT.md +0 -0
  29. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/INSTALLATION.md +0 -0
  30. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/JSONL_EXECUTOR_ANALYSIS.md +0 -0
  31. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/JSONL_EXECUTOR_REMOVED.md +0 -0
  32. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/LIBRARY_DOCUMENTATION.md +0 -0
  33. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/MEDIUM_ARTICLE.md +0 -0
  34. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/MIGRATION_GUIDE.md +0 -0
  35. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/MULTI_SOURCE_EXAMPLE_README.md +0 -0
  36. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/MYSQL_USAGE.md +0 -0
  37. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/OPTIMIZATIONS_BREAKDOWN.md +0 -0
  38. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/OPTIMIZATIONS_NOT_DATABASE_ONLY.md +0 -0
  39. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/OPTIMIZATIONS_VS_POLARS.md +0 -0
  40. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/OPTIMIZER_AUTOMATED.md +0 -0
  41. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/PERFORMANCE.md +0 -0
  42. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/PERFORMANCE_COMPARISON.md +0 -0
  43. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/POLARS_AND_MMAP_GUIDE.md +0 -0
  44. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/PROTOCOL_AND_OPTIMIZATIONS_EXPLAINED.md +0 -0
  45. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/PROTOCOL_EXPLANATION.md +0 -0
  46. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/PUBLISHING.md +0 -0
  47. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/PYPI_CHECKLIST.md +0 -0
  48. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/QUICK_PUBLISH.md +0 -0
  49. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/QUICK_START.md +0 -0
  50. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/SIMPLE_PROTOCOL_GUIDE.md +0 -0
  51. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/SIMPLE_SOURCE_FUNCTIONS.md +0 -0
  52. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/SOURCE_COMBINATIONS_GUIDE.md +0 -0
  53. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/TECHNICAL_DOCUMENTATION.md +0 -0
  54. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/USER_GUIDE.md +0 -0
  55. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/WHAT_IS_WHERE_TO_PARAMS.md +0 -0
  56. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/WHEN_POLARS_IS_USED.md +0 -0
  57. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/WHY_API_CONVERTER_NEEDED.md +0 -0
  58. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/WHY_MANUAL_PARSING.md +0 -0
  59. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/WHY_ORIGINAL_IS_FASTER.md +0 -0
  60. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/WHY_PROTOCOL_IN_SOURCES.md +0 -0
  61. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/documentation/XML_MONGO_USE_CASE.md +0 -0
  62. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/engine.py +0 -0
  63. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/evaluator.py +0 -0
  64. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/mmap_index.py +0 -0
  65. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/operators.py +0 -0
  66. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/operators_mmap.py +0 -0
  67. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/operators_polars.py +0 -0
  68. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/optimizer.py +0 -0
  69. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/parser.py +0 -0
  70. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/planner.py +0 -0
  71. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/polars_expression_translator.py +0 -0
  72. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/polars_operators.py +0 -0
  73. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/protocol_helpers.py +0 -0
  74. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/requirements.txt +0 -0
  75. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/setup.cfg +0 -0
  76. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/streaming_sql_engine.egg-info/SOURCES.txt +0 -0
  77. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/streaming_sql_engine.egg-info/dependency_links.txt +0 -0
  78. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/streaming_sql_engine.egg-info/requires.txt +0 -0
  79. {streaming_sql_engine-0.1.13 → streaming_sql_engine-0.1.14}/streaming_sql_engine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streaming-sql-engine
3
- Version: 0.1.13
3
+ Version: 0.1.14
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
@@ -27,5 +27,5 @@ try:
27
27
  except ImportError:
28
28
  __all__ = ["Engine"]
29
29
 
30
- __version__ = "0.1.13"
30
+ __version__ = "0.1.14"
31
31
 
@@ -294,15 +294,24 @@ def _build_join_iterator(
294
294
  # For other sources, LookupJoinIterator will handle it via ScanIterator
295
295
 
296
296
  # Check if both sides are ordered by join keys
297
- left_ordered_by = _extract_table_from_key(join_info.left_key)
297
+ # Extract left table name to check its metadata
298
+ left_table_name = _extract_table_from_key(join_info.left_key)
299
+ left_metadata = source_metadata.get(left_table_name, {}) if left_table_name else {}
300
+ left_ordered_by = left_metadata.get("ordered_by")
298
301
  right_ordered_by = right_metadata.get("ordered_by")
299
302
 
300
- # For merge join, we need both sides sorted on their respective join keys
301
- # This is a simplified check - in practice, we'd need to verify the actual
302
- # column names match
303
+ # Extract column names from join keys
304
+ left_join_column = _extract_column_from_key(join_info.left_key)
305
+ right_join_column = _extract_column_from_key(join_info.right_key)
306
+
307
+ # For merge join, we need BOTH sides sorted on their respective join keys
308
+ # Merge join REQUIRES sorted data - if data isn't sorted, it produces incorrect results
309
+ # Only use merge join when explicitly told both sides are sorted (via ordered_by metadata)
303
310
  use_merge_join = (
311
+ left_ordered_by is not None and
312
+ left_ordered_by == left_join_column and
304
313
  right_ordered_by is not None and
305
- right_ordered_by == _extract_column_from_key(join_info.right_key)
314
+ right_ordered_by == right_join_column
306
315
  )
307
316
 
308
317
  if use_merge_join:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "streaming-sql-engine"
7
- version = "0.1.13"
7
+ version = "0.1.14"
8
8
  description = "A lightweight SQL execution engine for streaming row-by-row queries with joins across multiple data sources"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -12,7 +12,7 @@ with open("requirements.txt", "r", encoding="utf-8") as fh:
12
12
 
13
13
  setup(
14
14
  name="streaming-sql-engine",
15
- version="0.1.13",
15
+ version="0.1.14",
16
16
  author="Theodore Pantazopoulo",
17
17
  author_email="your.email@example.com",
18
18
  description="A lightweight SQL execution engine for streaming row-by-row queries with joins across multiple data sources",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streaming-sql-engine
3
- Version: 0.1.13
3
+ Version: 0.1.14
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