Repository: reata/sqllineage

Issue:
case-sensitive parsing
```
insert overwrite table tab_a
select * from tab_b
union all
select * from TAB_B
```

here tab_b and TAB_B will be parsed as two different tables.

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

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

```diff
@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   81.96%   81.96%           
=======================================
  Files           1        1           
  Lines         122      122           
=======================================
  Hits          100      100           
  Misses         22       22           
```


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

------

[Continue to review full report at Codecov](https://codecov.io/gh/reata/sqllineage/pull/45?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/45?src=pr&el=footer). Last update [27346e0...e0f284c](https://codecov.io/gh/reata/sqllineage/pull/45?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 059f40e..5ba4481 100644
--- a/sqllineage/core.py
+++ b/sqllineage/core.py
@@ -54,11 +54,11 @@ Target Tables:
 
     @property
     def source_tables(self) -> Set[str]:
-        return self._source_tables
+        return {t.lower() for t in self._source_tables}
 
     @property
     def target_tables(self) -> Set[str]:
-        return self._target_tables
+        return {t.lower() for t in self._target_tables}
 
     def _extract_from_DML(self, token: Token) -> None:
         source_table_token_flag = target_table_token_flag = temp_table_token_flag = False


Test patch:
diff --git a/tests/test_others.py b/tests/test_others.py
index 38956f1..f5f71f6 100644
--- a/tests/test_others.py
+++ b/tests/test_others.py
@@ -6,6 +6,13 @@ def test_use():
     helper("USE db1")
 
 
+def test_table_name_case():
+    helper("""insert overwrite table tab_a
+select * from tab_b
+union all
+select * from TAB_B""", {"tab_b"}, {"tab_a"})
+
+
 def test_create():
     helper("CREATE TABLE tab1 (col1 STRING)", None, {"tab1"})