Repository: reata/sqllineage

Issue:
Incorrect Result for UPDATE statement
hello reata.when i using sqllineage to analyze the follow SQL .I got a bug.
`UPDATE tablea a
	INNER JOIN (
		SELECT col2
		FROM tableb
		GROUP BY col
	) b
	ON b.col = a.col
SET a.col1 = a.col2 * b.col2
`
that SQL update tablea`s col1  using tableb`s col2 . when i running the SQLLINGAGE it returns tableb as source table but null as target table .in my view the source table should be tableb and the target table should be tablea but not null

Discussion:
codecov[bot]: # [Codecov](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=h1) Report
> Merging [#107](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=desc) (89c7466) into [master](https://codecov.io/gh/reata/sqllineage/commit/d94ca2c74c927ece4a5bfbc64b613b6c70ca5c63?el=desc) (d94ca2c) will **not change** coverage.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/reata/sqllineage/pull/107/graphs/tree.svg?width=650&height=150&src=pr&token=latkaw2Lx6)](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #107   +/-   ##
=======================================
  Coverage   96.66%   96.66%           
=======================================
  Files           8        8           
  Lines         330      330           
=======================================
  Hits          319      319           
  Misses         11       11           
```


| [Impacted Files](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [sqllineage/core.py](https://codecov.io/gh/reata/sqllineage/pull/107/diff?src=pr&el=tree#diff-c3FsbGluZWFnZS9jb3JlLnB5) | `96.15% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=footer). Last update [d94ca2c...89c7466](https://codecov.io/gh/reata/sqllineage/pull/107?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/sqllineage/core.py b/sqllineage/core.py
index f46ba1d..5d34b6b 100644
--- a/sqllineage/core.py
+++ b/sqllineage/core.py
@@ -20,7 +20,7 @@ SOURCE_TABLE_TOKENS = (
     # inspired by https://github.com/andialbrecht/sqlparse/blob/master/sqlparse/keywords.py
     r"((LEFT\s+|RIGHT\s+|FULL\s+)?(INNER\s+|OUTER\s+|STRAIGHT\s+)?|(CROSS\s+|NATURAL\s+)?)?JOIN",
 )
-TARGET_TABLE_TOKENS = ("INTO", "OVERWRITE", "TABLE", "VIEW")
+TARGET_TABLE_TOKENS = ("INTO", "OVERWRITE", "TABLE", "VIEW", "UPDATE")
 TEMP_TABLE_TOKENS = ("WITH",)
 
 


Test patch:
diff --git a/tests/test_others.py b/tests/test_others.py
index afe8852..93233dc 100644
--- a/tests/test_others.py
+++ b/tests/test_others.py
@@ -45,6 +45,18 @@ def test_create_after_drop():
     )
 
 
+def test_update():
+    helper("UPDATE tab1 SET col1='val1' WHERE col2='val2'", None, {"tab1"})
+
+
+def test_update_with_join():
+    helper(
+        "UPDATE tab1 a INNER JOIN tab2 b ON a.col1=b.col1 SET a.col2=b.col2",
+        {"tab2"},
+        {"tab1"},
+    )
+
+
 def test_drop():
     helper("DROP TABLE IF EXISTS tab1", None, None)