PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: reata/sqllineage (python)
Issue: column lineages from boolean expression
I have problems with some queries which contain boolean expressions (exasol-db). I only use the LineageRunner(sql_statement).get_column_lineage()-function without the gui.

The column lineages ignore the second boolean field (IS_CASE_TWO).
```
CREATE VIEW VIEW_A AS
SELECT
    TABLE_ID,
    NUMBER_01 + NUMBER_02 > 0 AS IS_CASE_ONE,
    (NUMBER_01 + NUMBER_02 > 0 AND NUMBER_03 + NUMBER_04 <= 0) AS IS_CASE_TWO
FROM
    TABLE_A
```


It is possible the following query parse with version 1.3.3. This ignore the timestamp fields in boolean expressions.
```
CREATE VIEW VIEW_B AS
SELECT
    TABLE_ID,
    (
        FIRST_TIMESTAMP IS NOT NULL
        AND FIRST_TIMESTAMP >= TO_TIMESTAMP(ADD_DAYS(CURRENT_DATE, -100))
        AND OTHER_TIMESTAMP > TO_TIMESTAMP(ADD_YEARS(CURRENT_DATE, -7))
    ) AS IS_QUALIFIED
FROM
    TABLE_B
```
I get in version 1.3.4 to many column lineages, like TABLE_B.IS -> IS_QUALIFIED or TABLE_B.NOT NULL -> IS_QUALIFIED.


Pull request description: fix: column lineage using boolean expression
Closes #236 

Patch:
diff --git a/sqllineage/core/models.py b/sqllineage/core/models.py
index 93a0af0..9dd1821 100644
--- a/sqllineage/core/models.py
+++ b/sqllineage/core/models.py
@@ -304,16 +304,12 @@ class Column:
                     ColumnQualifierTuple(token.get_real_name(), token.get_parent_name())
                 ]
         else:
-            # Handle literals other than *
-            if (
-                token.ttype is not None
-                and token.ttype[0] == T.Literal[0]
-                and token.value != "*"
-            ):
-                source_columns = []
-            else:
+            if token.ttype == T.Wildcard:
                 # select *
                 source_columns = [ColumnQualifierTuple(token.value, None)]
+            else:
+                # typically, T.Literal here
+                source_columns = []
         return source_columns
 
     def to_source_columns(self, alias_mapping: Dict[str, Union[Table, SubQuery]]):


Test patch:
diff --git a/tests/test_columns.py b/tests/test_columns.py
index 1885d6f..892034d 100644
--- a/tests/test_columns.py
+++ b/tests/test_columns.py
@@ -228,6 +228,25 @@ FROM tab2"""
     )
 
 
+def test_select_column_using_boolean_expression_in_parenthesis():
+    sql = """INSERT OVERWRITE TABLE tab1
+SELECT (col1 > 0 AND col2 > 0) AS col3
+FROM tab2"""
+    assert_column_lineage_equal(
+        sql,
+        [
+            (
+                ColumnQualifierTuple("col1", "tab2"),
+                ColumnQualifierTuple("col3", "tab1"),
+            ),
+            (
+                ColumnQualifierTuple("col2", "tab2"),
+                ColumnQualifierTuple("col3", "tab1"),
+            ),
+        ],
+    )
+
+
 def test_select_column_using_expression_with_table_qualifier_without_column_alias():
     sql = """INSERT OVERWRITE TABLE tab1
 SELECT a.col1 + a.col2 + a.col3 + a.col4
Repository: sveltejs/prettier-plugin-svelte (ts)
Issue: `<style></style>` in comment results incorrect output
source:

```svelte
<!-- <style>
.foo {
  background-image: url("x");
}
</style> -->

<style lang="scss">
.foo {
  background-image: url("x");
}

$map: (
  'alpha': 10,
  'beta': 20,
  'gamma': 30
);
</style>

<span>Hi</span>
```

result:

```svelte
<span>Hi</span>

<!-- <style ✂prettier:content✂="Ci5mb28gewogIGJhY2tncm91bmQtaW1hZ2U6IHVybCgieCIpOwp9Cg=="></style> -->
<style lang="scss">
  .foo {
    background-image: url('x');
  }

  $map: (
    'alpha': 10,
    'beta': 20,
    'gamma': 30
  );
</style>
```
Pull request description: (fix) adjust snip regex
Account for the script/style being inside a comment
Fixes #212

Patch:
diff --git a/src/lib/snipTagContent.ts b/src/lib/snipTagContent.ts
index 0f8d119..b61757a 100644
--- a/src/lib/snipTagContent.ts
+++ b/src/lib/snipTagContent.ts
@@ -1,8 +1,11 @@
 export const snippedTagContentAttribute = '✂prettier:content✂';
 
 export function snipTagContent(tagName: string, source: string, placeholder = ''): string {
-    const regex = new RegExp(`<${tagName}([^]*?)>([^]*?)<\/${tagName}>`, 'g');
-    return source.replace(regex, (_, attributes, content) => {
+    const regex = new RegExp(`<!--[^]*?-->|<${tagName}([^]*?)>([^]*?)<\/${tagName}>`, 'g');
+    return source.replace(regex, (match, attributes, content) => {
+        if (match.startsWith('<!--')) {
+            return match;
+        }
         const encodedContent = Buffer.from(content).toString('base64');
         return `<${tagName}${attributes} ${snippedTagContentAttribute}="${encodedContent}">${placeholder}</${tagName}>`;
     });


Test patch:
diff --git a/test/printer/samples/style-script-commented-out.html b/test/printer/samples/style-script-commented-out.html
new file mode 100644
index 0000000..c5648ac
--- /dev/null
+++ b/test/printer/samples/style-script-commented-out.html
@@ -0,0 +1,15 @@
+<!-- <script>
+    const a = true;
+</script> -->
+<script>
+    const a = true;
+</script>
+
+<!-- <style>
+    a { color: true }
+</style> -->
+<style>
+    a {
+        color: true;
+    }
+</style>