You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/11/06 23:08:25 UTC

(superset) branch sc-76228 updated (f9c69756fc -> 7f6b4228b1)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a change to branch sc-76228
in repository https://gitbox.apache.org/repos/asf/superset.git


    omit f9c69756fc Add test
     new 7f6b4228b1 Add test

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f9c69756fc)
            \
             N -- N -- N   refs/heads/sc-76228 (7f6b4228b1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 superset/db_engine_specs/base.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


(superset) 01/01: Add test

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch sc-76228
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 7f6b4228b15ea9b3991102d9b2daa006b0cd5017
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Mon Nov 6 17:55:48 2023 -0500

    Add test
---
 superset/db_engine_specs/base.py                |  4 ++--
 tests/unit_tests/db_engine_specs/test_dremio.py | 16 ++++++++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/superset/db_engine_specs/base.py b/superset/db_engine_specs/base.py
index 542e73739a..6bce03d931 100644
--- a/superset/db_engine_specs/base.py
+++ b/superset/db_engine_specs/base.py
@@ -400,8 +400,8 @@ class BaseEngineSpec:  # pylint: disable=too-many-public-methods
 
     @classmethod
     def get_allows_alias_in_select(
-        cls, database: Database
-    ) -> bool:  # pylint: disable=unused-argument
+        cls, database: Database  # pylint: disable=unused-argument
+    ) -> bool:
         """
         Method for dynamic `allows_alias_in_select`.
 
diff --git a/tests/unit_tests/db_engine_specs/test_dremio.py b/tests/unit_tests/db_engine_specs/test_dremio.py
index 6b1e8203b5..eb77e7f10a 100644
--- a/tests/unit_tests/db_engine_specs/test_dremio.py
+++ b/tests/unit_tests/db_engine_specs/test_dremio.py
@@ -18,6 +18,7 @@ from datetime import datetime
 from typing import Optional
 
 import pytest
+from pytest_mock import MockerFixture
 
 from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm
 from tests.unit_tests.fixtures.common import dttm
@@ -40,3 +41,18 @@ def test_convert_dttm(
     from superset.db_engine_specs.dremio import DremioEngineSpec as spec
 
     assert_convert_dttm(spec, target_type, expected_result, dttm)
+
+
+def test_get_allows_alias_in_select(mocker: MockerFixture) -> None:
+    from superset.db_engine_specs.dremio import DremioEngineSpec
+
+    database = mocker.MagicMock()
+
+    database.get_extra.return_value = {}
+    assert DremioEngineSpec.get_allows_alias_in_select(database) is True
+
+    database.get_extra.return_value = {"version": "24.1.0"}
+    assert DremioEngineSpec.get_allows_alias_in_select(database) is True
+
+    database.get_extra.return_value = {"version": "24.0.0"}
+    assert DremioEngineSpec.get_allows_alias_in_select(database) is False