Dataset Viewer
Auto-converted to Parquet Duplicate
repo
stringclasses
6 values
instance_id
stringlengths
20
34
base_commit
stringlengths
40
40
patch
stringlengths
278
50.6k
test_patch
stringlengths
354
42.5k
problem_statement
stringlengths
52
24.4k
hints_text
stringlengths
0
21.3k
created_at
timestamp[s]date
2019-01-20 02:31:42
2023-09-26 12:05:24
version
stringclasses
41 values
FAIL_TO_PASS
stringlengths
38
62.9k
PASS_TO_PASS
stringlengths
2
42.2k
environment_setup_commit
stringlengths
40
40
sqlfluff/sqlfluff
sqlfluff__sqlfluff-2862
447ecf862a4d2b977d0add9f444655357b9c4f1f
diff --git a/src/sqlfluff/core/linter/common.py b/src/sqlfluff/core/linter/common.py --- a/src/sqlfluff/core/linter/common.py +++ b/src/sqlfluff/core/linter/common.py @@ -67,21 +67,3 @@ class ParsedString(NamedTuple): config: FluffConfig fname: str source_str: str - - -class EnrichedFixPatch(NamedTuple):...
diff --git a/test/api/simple_test.py b/test/api/simple_test.py --- a/test/api/simple_test.py +++ b/test/api/simple_test.py @@ -72,16 +72,16 @@ "description": "Keywords must be consistently upper case.", }, { - "code": "L009", + "code": "L014", "line_no": 1, "line_pos":...
fix keep adding new line on wrong place ### Search before asking - [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues. ### What Happened To replicate this issue you can create a file eg. test.template.sql ``` {% if true %} SELECT 1 + 1 {%- endif %} ``` t...
> Version > sqlfluff, version 0.6.2 Is this correct? If so that is a VERY old version so please upgrade. Though confirmed this is still an issue in latest. But still, going to need to upgrade to get any fix for this. > > Version > > sqlfluff, version 0.6.2 > > Is this correct? If so that is a VERY old version s...
2022-03-14T19:46:08
0.10
["test/api/simple_test.py::test__api__lint_string", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_file[{%", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_file[{%-"]
["test/api/simple_test.py::test__api__lint_string_without_violations", "test/api/simple_test.py::test__api__lint_string_specific", "test/api/simple_test.py::test__api__lint_string_specific_single", "test/api/simple_test.py::test__api__lint_string_specific_exclude", "test/api/simple_test.py::test__api__lint_string_speci...
3d52e8270d82aeccf4c516d059a80a6947919aea
sqlfluff/sqlfluff
sqlfluff__sqlfluff-3436
23cd31e77a712a210c734e38488d7a34afd83a25
diff --git a/src/sqlfluff/core/templaters/slicers/tracer.py b/src/sqlfluff/core/templaters/slicers/tracer.py --- a/src/sqlfluff/core/templaters/slicers/tracer.py +++ b/src/sqlfluff/core/templaters/slicers/tracer.py @@ -40,6 +40,7 @@ class RawSliceInfo: unique_alternate_id: Optional[str] alternate_code: Option...
diff --git a/test/core/templaters/jinja_test.py b/test/core/templaters/jinja_test.py --- a/test/core/templaters/jinja_test.py +++ b/test/core/templaters/jinja_test.py @@ -1060,6 +1060,61 @@ def test__templater_jinja_slice_template(test, result): ("block_end", slice(27, 39, None), slice(13, 13, None)), ...
Fatal templating error with Jinja templater. Tracer produces odd results. ### Search before asking - [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues. ### What Happened Issue found while assessing an Airflow project. The smallest query I can make which triggers...
I'll take a look. And darn it -- first bug report against this code in the past couple months, I think. 😅 Starting to look at this. One problem I noticed (perhaps not the only one) is that the trailing literal newline in the source string has no corresponding templated slice, so it's like building the templated sli...
2022-06-07T21:36:59
0.13
["test/core/templaters/jinja_test.py::test__templater_jinja_slice_file[SELECT", "test/core/templaters/jinja_test.py::test__templater_jinja_slice_file[{%"]
["test/core/templaters/jinja_test.py::test__templater_jinja[simple]", "test/core/templaters/jinja_test.py::test__templater_jinja[unboundlocal_bugfix]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[basic_block]", "test/core/templaters/jinja_test.py::test__templater_jinja_slices[strip_left_block]", "...
6e8ce43a4958dbaa56256365c2a89d8db92e07d6
sqlfluff/sqlfluff
sqlfluff__sqlfluff-4764
a820c139ccbe6d1865d73c4a459945cd69899f8f
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -44,6 +44,7 @@ dialect_selector, dialect_readout, ) +from sqlfluff.core.linter import LintingResult from sqlfluff.core.config import progress_bar_configuration ...
diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py --- a/test/cli/commands_test.py +++ b/test/cli/commands_test.py @@ -557,6 +557,18 @@ def test__cli__command_lint_parse(command): ), 1, ), + # Test that setting --quiet with --verbose raises an error. + ( ...
Enable quiet mode/no-verbose in CLI for use in pre-commit hook There seems to be only an option to increase the level of verbosity when using SQLFluff [CLI](https://docs.sqlfluff.com/en/stable/cli.html), not to limit it further. It would be great to have an option to further limit the amount of prints when running `...
2023-04-16T14:24:42
1.4
["test/cli/commands_test.py::test__cli__fix_multiple_errors_quiet_force", "test/cli/commands_test.py::test__cli__fix_multiple_errors_quiet_no_force"]
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect", "test/cli/commands_test.py::test__cli__command_parse_error_dialect_explicit_warning", "test/cli/commands_test.py::test__cli__command_parse_error...
d19de0ecd16d298f9e3bfb91da122734c40c01e5
sqlfluff/sqlfluff
sqlfluff__sqlfluff-2336
37a993f7ad841ab3035d1db5ce6525f2e5584fd5
diff --git a/src/sqlfluff/core/rules/analysis/select.py b/src/sqlfluff/core/rules/analysis/select.py --- a/src/sqlfluff/core/rules/analysis/select.py +++ b/src/sqlfluff/core/rules/analysis/select.py @@ -124,7 +124,7 @@ def _has_value_table_function(table_expr, dialect): # We need the dialect to get the value t...
diff --git a/test/core/rules/reference_test.py b/test/core/rules/reference_test.py new file mode 100644 --- /dev/null +++ b/test/core/rules/reference_test.py @@ -0,0 +1,72 @@ +"""Test components for working with object and table references.""" +import pytest + +from sqlfluff.core.rules import reference + + +@pytest.mar...
L026: Rule incorrectly flag column does not exist in `FROM` clause in an UPDATE statement. ## Expected Behaviour L026 should not fail when a subquery in an UPDATE statement references a column from the UPDATE target. ## Observed Behaviour L026 failed due to reference was not found in the FROM clause with the f...
2022-01-17T21:35:10
0.8
["test/core/rules/reference_test.py::test_object_ref_matches_table[possible_references0-targets0-True]", "test/core/rules/reference_test.py::test_object_ref_matches_table[possible_references1-targets1-True]", "test/core/rules/reference_test.py::test_object_ref_matches_table[possible_references2-targets2-False]", "test/...
[]
a5c4eae4e3e419fe95460c9afd9cf39a35a470c4
sqlfluff/sqlfluff
sqlfluff__sqlfluff-5074
7b7fd603a19755a9f3707ebbf95d18ee635716d8
diff --git a/src/sqlfluff/core/errors.py b/src/sqlfluff/core/errors.py --- a/src/sqlfluff/core/errors.py +++ b/src/sqlfluff/core/errors.py @@ -47,9 +47,15 @@ def __init__( self.line_pos = line_pos super().__init__(self.desc()) + def __eq__(self, other) -> bool: + """Errors compare equa...
diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py --- a/test/cli/commands_test.py +++ b/test/cli/commands_test.py @@ -379,6 +379,20 @@ def test__cli__command_render_stdin(): "test/fixtures/linter/operator_errors.sql", ], ), + # Check ignoring linting (multi...
Inconsistent output depending on --processes flag when --ignore linting is used ### Search before asking - [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues. ### What Happened Depending on the value you set for the `--processes` flag when also using `--ignore linti...
This is _very_ interesting! I'll pick this one up 👍 It's worth calling out that I think part of the problem here is that the docs are also out of date - but you're still right that the return codes should be _the same_ regardless of the `processes` setting.
2023-08-08T23:31:59
2.1
["test/cli/commands_test.py::test__cli__command_lint_parse[command19]", "test/core/errors_test.py::test__lex_error_pickle[True]", "test/core/errors_test.py::test__lex_error_pickle[False]", "test/core/errors_test.py::test__parse_error_pickle[True]", "test/core/errors_test.py::test__parse_error_pickle[False]", "test/core...
["test/cli/commands_test.py::test__cli__command_directed", "test/cli/commands_test.py::test__cli__command_dialect", "test/cli/commands_test.py::test__cli__command_no_dialect", "test/cli/commands_test.py::test__cli__command_parse_error_dialect_explicit_warning", "test/cli/commands_test.py::test__cli__command_parse_error...
7b7fd603a19755a9f3707ebbf95d18ee635716d8
sqlfluff/sqlfluff
sqlfluff__sqlfluff-2849
0bbd70f38a3318b9a488d988d06e8005e222d6ac
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 @@ -522,17 +522,21 @@ def...
diff --git a/test/core/templaters/base_test.py b/test/core/templaters/base_test.py --- a/test/core/templaters/base_test.py +++ b/test/core/templaters/base_test.py @@ -134,6 +134,7 @@ def test__templated_file_get_line_pos_of_char_pos( templated_str=templated_str, sliced_file=file_slices, fname...
Lint and fix throws exception when having jinja for loop inside set ### Search before asking - [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues. ### What Happened To reproduce the error, create test.template.sql ``` {% set whitelisted= [ {'name': 'COL_1'}, ...
2022-03-12T21:48:15
0.10
["test/core/templaters/base_test.py::test__templated_file_get_line_pos_of_char_pos[01234\\n6789{{foo}}fo\\nbarss-01234\\n6789x\\nfo\\nbarfss-file_slices0-0-1-1]", "test/core/templaters/base_test.py::test__templated_file_get_line_pos_of_char_pos[01234\\n6789{{foo}}fo\\nbarss-01234\\n6789x\\nfo\\nbarfss-file_slices1-20-3...
["test/core/templaters/base_test.py::test__indices_of_newlines[-positions0]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo-positions1]", "test/core/templaters/base_test.py::test__indices_of_newlines[foo\\nbar-positions2]", "test/core/templaters/base_test.py::test__indices_of_newlines[\\nfoo\\n\\nba...
3d52e8270d82aeccf4c516d059a80a6947919aea
sqlfluff/sqlfluff
sqlfluff__sqlfluff-3700
1000cf1beae75186cadf3a586c87e86e9f30ecb2
"diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py\(...TRUNCATED)
"diff --git a/test/fixtures/rules/std_rule_cases/L042.yml b/test/fixtures/rules/std_rule_cases/L042.(...TRUNCATED)
"L042 loop limit on fixes reached when CTE itself contains a subquery\n### Search before asking\r\n\(...TRUNCATED)
"Unfortunately there is not much we can do without the SQL that produces this error (ideally a minim(...TRUNCATED)
2022-07-31T18:22:12
1.2
"[\"test/utils/analysis/test_select_crawler.py::test_select_crawler_constructor[select\", \"test/uti(...TRUNCATED)
[]
388dd01e05c7dcb880165c7241ed4027d9d0171e
sqlfluff/sqlfluff
sqlfluff__sqlfluff-3435
8e724ef8906eecce7179f4b7c52d4fc0672e4bd9
"diff --git a/src/sqlfluff/rules/L027.py b/src/sqlfluff/rules/L027.py\n--- a/src/sqlfluff/rules/L027(...TRUNCATED)
"diff --git a/test/fixtures/rules/std_rule_cases/L027.yml b/test/fixtures/rules/std_rule_cases/L027.(...TRUNCATED)
"L027: outer-level table not found in WHERE clause sub-select\n### Search before asking\r\n\r\n- [X](...TRUNCATED)
"Does L027 use `SelectCrawler`? This sounds like an issue where it may be helpful.\r\n\r\nRelated: R(...TRUNCATED)
2022-06-07T18:47:03
0.13
["test/rules/std_test.py::test__rules__std_file[L027-column_references.sql-violations16]"]
"[\"test/rules/std_test.py::test__rules__std_file[L001-indentation_errors.sql-violations0]\", \"test(...TRUNCATED)
6e8ce43a4958dbaa56256365c2a89d8db92e07d6
sqlfluff/sqlfluff
sqlfluff__sqlfluff-3608
d783e421b714ed989d9e641977ea9b3b6ffaf807
"diff --git a/src/sqlfluff/cli/__init__.py b/src/sqlfluff/cli/__init__.py\n--- a/src/sqlfluff/cli/__(...TRUNCATED)
"diff --git a/test/cli/commands_test.py b/test/cli/commands_test.py\n--- a/test/cli/commands_test.py(...TRUNCATED)
"Return codes are inconsistent\n### Search before asking\r\n\r\n- [X] I searched the [issues](https:(...TRUNCATED)
"I'm happy to contribute the changes for this one, but would appreciate views on what the error code(...TRUNCATED)
2022-07-14T15:06:34
1.1
"[\"test/cli/commands_test.py::test__cli__command_directed\", \"test/cli/commands_test.py::test__cli(...TRUNCATED)
"[\"test/cli/commands_test.py::test__cli__command_lint_stdin[command0]\", \"test/cli/commands_test.p(...TRUNCATED)
d83ab36bbb21f62cf0780d095a8be8cd366735d7
sqlfluff/sqlfluff
sqlfluff__sqlfluff-4753
24178a589c279220c6605324c446122d15ebc3fb
"diff --git a/docs/generate-rule-docs.py b/docs/generate-rule-docs.py\n--- a/docs/generate-rule-docs(...TRUNCATED)
"diff --git a/test/api/simple_test.py b/test/api/simple_test.py\n--- a/test/api/simple_test.py\n+++ (...TRUNCATED)
"layout.end-of-file is the only rule in kebab case\n### Search before asking\n\n- [X] I searched the(...TRUNCATED)
2023-04-14T12:49:53
1.4
["test/api/simple_test.py::test__api__lint_string"]
"[\"test/api/simple_test.py::test__api__lint_string_without_violations\", \"test/api/simple_test.py:(...TRUNCATED)
d19de0ecd16d298f9e3bfb91da122734c40c01e5
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7