diff --git a/superset/db_engine_specs/oracle.py b/superset/db_engine_specs/oracle.py index 24ebdb00d4..d12ea7983f 100644 --- a/superset/db_engine_specs/oracle.py +++ b/superset/db_engine_specs/oracle.py @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. from datetime import datetime -from typing import Optional +from typing import Any, List, Optional, Tuple from superset.db_engine_specs.base import BaseEngineSpec, LimitMethod from superset.utils import core as utils @@ -58,3 +58,16 @@ class OracleEngineSpec(BaseEngineSpec): @classmethod def epoch_ms_to_dttm(cls) -> str: return "TO_DATE('1970-01-01','YYYY-MM-DD')+(1/24/60/60/1000)*{col}" + + @classmethod + def fetch_data( + cls, cursor: Any, limit: Optional[int] = None + ) -> List[Tuple[Any, ...]]: + """ + :param cursor: Cursor instance + :param limit: Maximum number of rows to be returned by the cursor + :return: Result of query + """ + if not cursor.description: + return [] + return super().fetch_data(cursor, limit)