superset/tests/unit_tests
Sujith Kumar S 7e51b200b4
fix(mssql): support top syntax for limiting queries (#18746)
* SQL-TOP Fix For Database Engines

MSSQL is not supporting LIMIT syntax in SQLs. For limiting the rows, MSSQL having a different keyword TOP. Added fixes for handling the TOP and LIMIT clauses based on the database engines.

* Teradata code for top clause handling removed from teradata.py

Teradata code for top clause handling removed from teradata.py file, since we added generic section in base engine for the same.

* Changes to handle CTE along with TOP in complex SQLs

Added changes to handle TOP command in CTEs, for DB Engines which are not supporting inline CTEs.

* Test cases for TOP unit testing in MSSQL

Added multiple unit test cases for MSSQL top command handling and also along with CTEs

* Corrected the select_keywords name key in basengine

Corrected the select_keywords name key in basengine

* Changes based on as per review.

made the required corrections based on code review to keep good code readability and code cleanliness.

* Review changes to correct lint and typo issues

Made the changes according to the review comments.

* fix linting errors

* fix teradata tests

* add coverage

* lint

* Code cleanliness

Moved the top/limit flag check from sql_lab to core.

* Changed for code cleanliness

Changes for keeping code cleanliness

* Corrected lint issue

Corrected lint issue.

* Code cleanliness

Code cleanliness

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2022-02-21 09:58:39 +02:00
..
annotation_layers chore: Test cases for annotations and annotation layers incorrect creation through API (#17246) 2021-11-03 09:11:41 +00:00
charts refactor: Moves the Explore form_data endpoint (#18151) 2022-01-25 11:14:50 -03:00
common refactor(QueryObject): decouple from superset (#17479) 2021-11-18 19:53:56 +02:00
dashboards fix: user UUIDs on export for Native Filter Configuration (#18562) 2022-02-08 13:10:40 -08:00
datasets fix: extra column in metrics (#17784) 2021-12-22 10:39:29 -08:00
db_engine_specs fix(mssql): support top syntax for limiting queries (#18746) 2022-02-21 09:58:39 +02:00
explore refactor: Moves the Explore form_data endpoint (#18151) 2022-01-25 11:14:50 -03:00
fixtures refactor: postprocessing move to unit test (#18779) 2022-02-17 20:05:41 +08:00
pandas_postprocessing fix: contribution operator meets nan value (#18782) 2022-02-18 23:28:28 +08:00
tasks fix: add fallback and validation for report and cron timezones (#17338) 2021-11-12 12:28:17 -08:00
utils refactor: move date_parser to unittest (#18810) 2022-02-18 20:15:31 +08:00
__init__.py refactor(tests): decouple unittests from integration tests (#15473) 2021-07-01 18:03:07 +03:00
conftest.py fix: column extra in import/export (#17738) 2021-12-14 18:33:52 -08:00
core_tests.py fix(csv-export): pivot v2 with verbose names (#18633) 2022-02-09 14:01:57 +02:00
dataframe_test.py feat: convert dataframe tests (#17655) 2021-12-09 09:47:53 -08:00
feature_flag_test.py chore: convert feature flag tests to unit tests (#17689) 2021-12-08 14:51:47 -08:00
memoized_tests.py chore(python-testing): move memoized tests to unit tests (#15507) 2021-07-12 10:00:18 +03:00
sql_parse_tests.py fix: revert #17654 to fix subselect table name parsing (#18017) 2022-01-12 21:28:23 -08:00