Search is not available for this dataset
repo stringclasses 49
values | issue_number int64 1 136k | category stringclasses 1
value | instance_id stringlengths 12 56 | base_commit stringlengths 40 40 | problem_statement stringlengths 1 262k | hints_text stringlengths 0 271k | issue_state stringclasses 2
values | issue_labels sequencelengths 0 18 | patch stringlengths 0 36.5M | test_patch stringlengths 0 43.7M | doc_patch stringlengths 0 92M | patch_fileNums int64 0 1.28k | test_patch_fileNums int64 0 248 | doc_patch_fileNums int64 0 284 | language stringclasses 2
values | created_at timestamp[s] | version stringclasses 1
value | environment_setup_commit stringclasses 1
value | FAIL_TO_PASS stringclasses 1
value | PASS_TO_PASS stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sqlfluff/sqlfluff | 6,181 | code_problem | sqlfluff__sqlfluff-6182 | 9cf36039428d9038b5ea0e9e43116a79dc23cd40 | No support for MANAGED location syntax on schemas in Databricks dialect### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
1. When creating up a SCHEMA with a MANAGED LOCATION option, I get an error: `Found unparsable sec... | open | [
"bug"
] | diff --git a/src/sqlfluff/dialects/dialect_databricks.py b/src/sqlfluff/dialects/dialect_databricks.py
--- a/src/sqlfluff/dialects/dialect_databricks.py
+++ b/src/sqlfluff/dialects/dialect_databricks.py
@@ -319,6 +319,28 @@ class AlterDatabaseStatementSegment(sparksql.AlterDatabaseStatementSegment):
)
+class C... | diff --git a/test/fixtures/dialects/databricks/create_database.sql b/test/fixtures/dialects/databricks/create_database.sql
new file mode 100644
index 00000000000..819f8efe9d6
--- /dev/null
+++ b/test/fixtures/dialects/databricks/create_database.sql
@@ -0,0 +1,30 @@
+-- Create database with all optional syntax
+CREATE D... | 2 | 2 | 0 | Python | 2024-09-11T13:01:37 | ||||||
sqlfluff/sqlfluff | 6,178 | code_problem | sqlfluff__sqlfluff-6179 | 9cf36039428d9038b5ea0e9e43116a79dc23cd40 | Databricks dialect does not support VOLUME syntaxes### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
When linting sql in the Databricks dialect that has commands involving VOLUMEs, sqlfluff gives an "unparsable s... | open | [
"bug",
"databricks"
] | diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ build
_build
dist
.pytest_cache
+/sqlfluff-*
# Ignore the Environment
env
diff --git a/src/sqlfluff/dialects/dialect_databricks.py b/src/sqlfluff/dialects/dialect_databricks.py
--- a/src/sqlfluff/dialects/dialect_databricks.... | diff --git a/test/fixtures/dialects/databricks/alter_volume.sql b/test/fixtures/dialects/databricks/alter_volume.sql
new file mode 100644
index 00000000000..417e74ee113
--- /dev/null
+++ b/test/fixtures/dialects/databricks/alter_volume.sql
@@ -0,0 +1,16 @@
+-- Rename a volume
+ALTER VOLUME some_vol RENAME TO some_new_v... | 4 | 18 | 0 | Python | 2024-09-10T16:07:44 | ||||||
sqlfluff/sqlfluff | 6,173 | code_problem | sqlfluff__sqlfluff-6044 | c7e791d5ff3bf681a1eb2d717a69c8e166029c42 | RF06: Case SensitivityThis PR resolves #6030, supersedes #6044 and should also fulfil the original intent of #3173 (by effectively reverting #3260).
As per the conversation on slack, there were lots of issues with RF06:
- The docs weren't particularly clear, and made it look like it was only for aliases.
- It wasn... | BTW: Who knew that DuckDB and Spark were both totally case insensitive!? I've added those details in my docs PR: #6165 # Coverage Results ✅
```
Name Stmts Miss Cover Missing
-------------------------------------
TOTAL 18167 0 100%
232 files skipped due to complete coverage.
```
[:
depending on the ``force_quote_identifier`` configuration.
When ``prefer_quoted_iden... | diff --git a/test/fixtures/rules/std_rule_cases/RF06.yml b/test/fixtures/rules/std_rule_cases/RF06.yml
--- a/test/fixtures/rules/std_rule_cases/RF06.yml
+++ b/test/fixtures/rules/std_rule_cases/RF06.yml
@@ -6,15 +6,27 @@ test_pass_column_reference:
test_fail_column_reference:
fail_str: |
- SELECT 123 AS "foo";... | 1 | 1 | 0 | Python | 2024-08-06T14:46:04 | |||||
sqlfluff/sqlfluff | 6,165 | code_problem | sqlfluff__sqlfluff-6173 | 791e0ad4115ba2b0c9cfdf69f0e4589e5e36d8b0 | More dialect documentationAfter #6153, it's more obvious that some of the dialects have more extensive documentation than others. This starts to flesh out that documentation. I originally wanted to be more complete here, but some dialects were much easier to test and find than others.
I've added details for as many ... | # Coverage Results ✅
```
Name Stmts Miss Cover Missing
-------------------------------------
TOTAL 18163 0 100%
232 files skipped due to complete coverage.
```
[](https://coveralls.io/builds/69689799)
coverage: 99.985%. remained the same... | closed | [] | diff --git a/src/sqlfluff/core/config/removed.py b/src/sqlfluff/core/config/removed.py
--- a/src/sqlfluff/core/config/removed.py
+++ b/src/sqlfluff/core/config/removed.py
@@ -140,4 +140,8 @@ def formatted_new_key(self) -> str:
("core", "recurse"),
"Removed as unused in production and unnecessary for d... | diff --git a/test/fixtures/rules/std_rule_cases/RF06.yml b/test/fixtures/rules/std_rule_cases/RF06.yml
--- a/test/fixtures/rules/std_rule_cases/RF06.yml
+++ b/test/fixtures/rules/std_rule_cases/RF06.yml
@@ -1,104 +1,106 @@
rule: RF06
-test_pass_column_reference:
- pass_str: |
- SELECT 123 AS foo;
-
-test_fail_co... | 5 | 1 | 0 | Python | 2024-09-09T10:35:24 | |||||
sqlfluff/sqlfluff | 6,156 | code_problem | sqlfluff__sqlfluff-6158 | c76818c65feaf3499c24abca88cada8166195442 | "create view if not exists v" unparsable (duckdb dialect)### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
Attempted to parse SQL statement below with dialect "duckdb" on https://online.sqlfluff.com/
```
create view... | The SQL provided works with at least DuckDB 1.0.0 and is documented: https://duckdb.org/docs/sql/statements/create_view | closed | [
"bug",
"duckdb"
] | diff --git a/src/sqlfluff/dialects/dialect_duckdb.py b/src/sqlfluff/dialects/dialect_duckdb.py
--- a/src/sqlfluff/dialects/dialect_duckdb.py
+++ b/src/sqlfluff/dialects/dialect_duckdb.py
@@ -638,3 +638,27 @@ class SimplifiedUnpivotExpressionSegment(BaseSegment):
Ref("OrderByClauseSegment", optional=True),
... | diff --git a/test/fixtures/dialects/duckdb/create_view.sql b/test/fixtures/dialects/duckdb/create_view.sql
new file mode 100644
index 00000000000..ec5f48dc8ac
--- /dev/null
+++ b/test/fixtures/dialects/duckdb/create_view.sql
@@ -0,0 +1,4 @@
+CREATE VIEW v1 AS SELECT * FROM tbl;
+CREATE OR REPLACE VIEW v1 AS SELECT 42;
... | 1 | 2 | 0 | Python | 2024-09-08T11:00:27 | |||||
sqlfluff/sqlfluff | 6,153 | code_problem | sqlfluff__sqlfluff-6165 | f24b9d6a7fc8d22f17460792e05cfe5a9c43c101 | Auto generate dialect docsThis takes what we did for rules and applies it to dialects.
I've been doing a fair bit of docs development recently and I realised that we were maintaining a list of dialects in `dialects.rst` which didn't necessarily map to the actual dialects themselves. This removes that manual list, an... | # Coverage Results ✅
```
Name Stmts Miss Cover Missing
-------------------------------------
TOTAL 18160 0 100%
232 files skipped due to complete coverage.
```
[](https://coveralls.io/builds/69670692)
coverage: 99.985%. remained the same... | closed | [] | diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py
--- a/src/sqlfluff/dialects/dialect_ansi.py
+++ b/src/sqlfluff/dialects/dialect_ansi.py
@@ -68,7 +68,11 @@
"ansi",
root_segment_name="FileSegment",
formatted_name="ANSI",
- docstring="""This is the base dialect ... | diff --git a/test/fixtures/dialects/postgres/unicode_double_quote.yml b/test/fixtures/dialects/postgres/unicode_double_quote.yml
--- a/test/fixtures/dialects/postgres/unicode_double_quote.yml
+++ b/test/fixtures/dialects/postgres/unicode_double_quote.yml
@@ -3,7 +3,7 @@
# computed by SQLFluff when running the tests. P... | diff --git a/docs/source/reference/dialects.rst b/docs/source/reference/dialects.rst
--- a/docs/source/reference/dialects.rst
+++ b/docs/source/reference/dialects.rst
@@ -36,4 +36,13 @@ current dialects available on your installation of SQLFluff.
- Will the feature I'm adding break any *downstream* dependencies
... | 12 | 1 | 1 | Python | 2024-09-08T22:59:30 | ||||
sqlfluff/sqlfluff | 6,144 | code_problem | sqlfluff__sqlfluff-6138 | f24b9d6a7fc8d22f17460792e05cfe5a9c43c101 | More robust exception handling for dbt.This is part of #6138, but the uncontroversial part. This effectively contains only quality of life improvements around dbt exceptions.
This is loosely related to #6037, but doesn't resolve it on it's own. | # Coverage Results ✅
```
Name Stmts Miss Cover Missing
-------------------------------------
TOTAL 18135 0 100%
232 files skipped due to complete coverage.
```
[](https://coveralls.io/builds/69609355)
coverage: 99.985%. remained the same... | closed | [] | diff --git a/src/sqlfluff/core/linter/runner.py b/src/sqlfluff/core/linter/runner.py
--- a/src/sqlfluff/core/linter/runner.py
+++ b/src/sqlfluff/core/linter/runner.py
@@ -8,20 +8,24 @@
"""
import bdb
-import functools
import logging
import multiprocessing
import multiprocessing.dummy
+import multiprocessing.pool... | diff --git a/test/core/linter/linter_test.py b/test/core/linter/linter_test.py
--- a/test/core/linter/linter_test.py
+++ b/test/core/linter/linter_test.py
@@ -2,6 +2,10 @@
import logging
import os
+import time
+from multiprocessing import Queue
+from queue import Empty
+from typing import Set
from unittest.mock im... | 1 | 1 | 0 | Python | 2024-09-02T23:50:25 | |||||
sqlfluff/sqlfluff | 6,142 | code_problem | sqlfluff__sqlfluff-6146 | 2ea52947f2736edd02d13b5ae2955f0827888635 | Necessary brackets for unnest function in BigQuery are removed### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
I’ve encountered another issue that seems specific to BigQuery involving unnesting within a function... | I need to highlight that this issue is not related to distinct, it's the same case without the distinct as well, meaning that the brackets are required even if there is no distinct keyword.@sherif-ghonaim mind throwing a quick example I can test with?I'm going to guess that the best similar example would be based on th... | closed | [
"bug",
"bigquery"
] | diff --git a/src/sqlfluff/rules/structure/ST08.py b/src/sqlfluff/rules/structure/ST08.py
--- a/src/sqlfluff/rules/structure/ST08.py
+++ b/src/sqlfluff/rules/structure/ST08.py
@@ -82,6 +82,8 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:
not function_name
or function_... | diff --git a/test/fixtures/rules/std_rule_cases/ST08.yml b/test/fixtures/rules/std_rule_cases/ST08.yml
--- a/test/fixtures/rules/std_rule_cases/ST08.yml
+++ b/test/fixtures/rules/std_rule_cases/ST08.yml
@@ -56,3 +56,15 @@ test_fail_distinct_concat_inside_count:
SELECT COUNT(DISTINCT(CONCAT(col1, '-', col2, '-', co... | 1 | 1 | 0 | Python | 2024-09-05T03:06:45 | |||||
sqlfluff/sqlfluff | 6,138 | code_problem | sqlfluff__sqlfluff-6144 | 31e0a5bc8225749ee571889dd4d9728cc1f11805 | Handle multi-processing dbt exceptions much better.This resolves #6037. I hit this bug myself while working on a different project.
The core problem was that even when a file wasn't successfully rendered, we still for a `partial` for it (although that partial didn't need any extra work). That partial was then pickle... | # Coverage Results ✅
```
Name Stmts Miss Cover Missing
-------------------------------------
TOTAL 18147 0 100%
232 files skipped due to complete coverage.
```
[](https://coveralls.io/builds/69599548)
coverage: 99.985%. remained the same... | open | [] | diff --git a/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py b/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
--- a/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
+++ b/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
@@ -222,18 +222,6 @@ def ... | diff --git a/plugins/sqlfluff-templater-dbt/test/.gitignore b/plugins/sqlfluff-templater-dbt/test/.gitignore
new file mode 100644
index 00000000000..98f8ff858a3
--- /dev/null
+++ b/plugins/sqlfluff-templater-dbt/test/.gitignore
@@ -0,0 +1,2 @@
+# Ignore the temporary folder for the dbt project
+temp_dbt_project/
diff -... | 1 | 2 | 0 | Python | 2024-09-04T17:36:44 | |||||
sqlfluff/sqlfluff | 6,133 | code_problem | sqlfluff__sqlfluff-6135 | 16915b5248655f3f3f88192dc13ec4dad1a7c98a | [DRAFT] Rationalise caching layer of configsThis PR is probably too big (hence draft), but I'm staging it here to run tests and then break it apart into smaller pieces. | closed | [] | diff --git a/src/sqlfluff/core/config/fluffconfig.py b/src/sqlfluff/core/config/fluffconfig.py
--- a/src/sqlfluff/core/config/fluffconfig.py
+++ b/src/sqlfluff/core/config/fluffconfig.py
@@ -19,8 +19,14 @@
import pluggy
from sqlfluff.core.config.loader import ConfigLoader, coerce_value
+from sqlfluff.core.config.ty... | diff --git a/test/core/config/loader_test.py b/test/core/config/loader_test.py
--- a/test/core/config/loader_test.py
+++ b/test/core/config/loader_test.py
@@ -111,18 +111,6 @@ def test__config__load_parent():
}
-def test__config__iter_config_elems_from_dict():
- """Test nested overwrite and order of precede... | 6 | 2 | 0 | Python | 2024-09-02T13:06:00 | ||||||
sqlfluff/sqlfluff | 6,132 | code_problem | sqlfluff__sqlfluff-6143 | 31e0a5bc8225749ee571889dd4d9728cc1f11805 | Ignoring line ranges (postgresql)### Search before asking
- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.
### What Happened
`-- noqa: enable=all` does not work in .sql script.
### Expected Behaviour
Ignoring fixed line range, start from `-- noqa: disable=all... | This looks to be an issue because of the unparsable first line. I've tested adding support for the `ENCRYPTED` keyword and the `-- noqa: disable/enable=all` works again. I'll get a PR together for the `ENCRYPTED` option. | closed | [
"bug",
"postgres"
] | diff --git a/src/sqlfluff/dialects/dialect_postgres.py b/src/sqlfluff/dialects/dialect_postgres.py
--- a/src/sqlfluff/dialects/dialect_postgres.py
+++ b/src/sqlfluff/dialects/dialect_postgres.py
@@ -1767,7 +1767,11 @@ class CreateRoleStatementSegment(ansi.CreateRoleStatementSegment):
OneOf("REPLICATION... | diff --git a/test/fixtures/dialects/postgres/create_role.sql b/test/fixtures/dialects/postgres/create_role.sql
--- a/test/fixtures/dialects/postgres/create_role.sql
+++ b/test/fixtures/dialects/postgres/create_role.sql
@@ -6,6 +6,7 @@ CREATE USER frank WITH SUPERUSER CREATEDB CREATEROLE;
CREATE USER frank WITH INHERIT... | 1 | 2 | 0 | Python | 2024-09-04T11:41:37 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3