mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-08 10:44:20 +01:00
Merge 'DBSP: Return a parse error for a non-equality join' from Glauber Costa
We currently don't handle non equality, but end up just returning a bogus result. Let's parse error. Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3232
This commit is contained in:
@@ -1204,6 +1204,20 @@ impl DbspCompiler {
|
||||
.map(|col| col.name.clone())
|
||||
.collect();
|
||||
|
||||
// Check if there are any non-equijoin conditions in the filter
|
||||
if join.filter.is_some() {
|
||||
return Err(LimboError::ParseError(
|
||||
"Non-equijoin conditions are not supported in materialized views. Only equality joins (=) are allowed.".to_string()
|
||||
));
|
||||
}
|
||||
|
||||
// Check if we have at least one equijoin condition
|
||||
if join.on.is_empty() {
|
||||
return Err(LimboError::ParseError(
|
||||
"Joins in materialized views must have at least one equality condition.".to_string()
|
||||
));
|
||||
}
|
||||
|
||||
// Extract join key indices from join conditions
|
||||
// For now, we only support equijoin conditions
|
||||
let mut left_key_indices = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user