Skip to content

Commit 1bd888b

Browse files
committed
Update comments to clarify the unsupported status of UPDATE ... FROM syntax
1 parent e0e198a commit 1bd888b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

datafusion/core/tests/custom_sources_cases/dml_planning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,8 @@ async fn test_delete_target_table_scoping() -> Result<()> {
725725

726726
#[tokio::test]
727727
async fn test_update_from_drops_non_target_predicates() -> Result<()> {
728-
// UPDATE ... FROM is currently unsupported due to design limitations
729-
// See FIX_UPDATE.md and FIX_UPDATE_2.md for details
728+
// UPDATE ... FROM is currently not working
729+
// TODO fix https://github.com/apache/datafusion/issues/19950
730730
let target_provider = Arc::new(CaptureUpdateProvider::new_with_filter_pushdown(
731731
test_schema(),
732732
TableProviderFilterPushDown::Exact,

datafusion/sql/src/statement.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,8 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
10711071
}
10721072
let update_from = from_clauses.and_then(|mut f| f.pop());
10731073

1074-
// UPDATE ... FROM is currently unsupported due to design limitations
1075-
// See FIX_UPDATE.md and FIX_UPDATE_2.md for details
1076-
// Qualifier stripping breaks source column references, causing incorrect behavior
1074+
// UPDATE ... FROM is currently not working
1075+
// TODO fix https://github.com/apache/datafusion/issues/19950
10771076
if update_from.is_some() {
10781077
return not_impl_err!("UPDATE ... FROM is not supported");
10791078
}

datafusion/sqllogictest/test_files/update.slt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ insert into t2 values (1, 'updated_b', 5.0, 40), (2, 'updated_b2', 2.5, 50), (4,
8080

8181
# UPDATE ... FROM is currently unsupported - qualifier stripping breaks source column references
8282
# causing assignments like 'b = t2.b' to resolve to target table's 'b' instead of source table's 'b'
83-
# See FIX_UPDATE.md and FIX_UPDATE_2.md for details
83+
# TODO fix https://github.com/apache/datafusion/issues/19950
8484
statement error DataFusion error: This feature is not implemented: UPDATE ... FROM is not supported
8585
update t1 set b = t2.b, c = t2.a, d = 1 from t2 where t1.a = t2.a and t1.b > 'foo' and t2.c > 1.0;
8686

@@ -90,6 +90,7 @@ explain update t1 set b = t2.b, c = t3.a, d = 1 from t2, t3 where t1.a = t2.a an
9090

9191
# test table alias
9292
# UPDATE ... FROM is currently unsupported
93+
# TODO fix https://github.com/apache/datafusion/issues/19950
9394
query error DataFusion error: This feature is not implemented: UPDATE ... FROM is not supported
9495
explain update t1 as T set b = t2.b, c = t.a, d = 1 from t2 where t.a = t2.a and t.b > 'foo' and t2.c > 1.0;
9596

@@ -107,5 +108,6 @@ statement ok
107108
insert into t2 values (1, 'new_val', 2.0, 100), (2, 'new_val2', 1.5, 200);
108109

109110
# UPDATE ... FROM is currently unsupported
111+
# TODO fix https://github.com/apache/datafusion/issues/19950
110112
statement error DataFusion error: This feature is not implemented: UPDATE ... FROM is not supported
111113
update t1 as T set b = t2.b, c = t.a, d = 1 from t2 where t.a = t2.a and t.b > 'foo' and t2.c > 1.0;

0 commit comments

Comments
 (0)