se7entyse7en opened a new issue #8010: `HiveEngineSpec.get_view_names` returns 
empty list even if corresponding function is available for hive dialect
URL: https://github.com/apache/incubator-superset/issues/8010
 
 
   **Is your feature request related to a problem? Please describe.**
   
   The `HiveEngineSpec.get_view_names` returns empty list because 
`HiveEngineSpec` inherits from `PrestoEngineSpec` where `get_view_names` is set 
to return empty list. This is because 
https://github.com/dropbox/PyHive/blob/v0.6.1/pyhive/sqlalchemy_presto.py 
doesn't have a `get_view_names` function. But this function is available for 
https://github.com/dropbox/PyHive/blob/v0.6.1/pyhive/sqlalchemy_hive.py so it 
should make sense to call it. This prevents showing the list of the views in 
the SQL Editor tab.
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...]
   
   **Describe the solution you'd like**
   
   Add the following method to `HiveEngineSpec`:
   
   ```
       @classmethod
       def get_view_names(cls, inspector, schema):
           return BaseEngineSpec.get_view_names(inspector, schema)
   ```
   
   **Describe alternatives you've considered**
   
   None.
   
   **Additional context**
   
   I was able to actually test it in a 
[project](https://github.com/src-d/sourced-ui) that is based on superset. This 
project uses a [fork of PyHive](https://github.com/src-d/PyHive/) in order to 
support SparkSQL, and has an engine spec for SparkSQL (open PR at the time of 
writing) which is simply defined as follows:
   
   ```
   class SparkSQLEngineSpec(HiveEngineSpec):
       """Reuses HiveEngineSpec functionality."""
   
       engine = "sparksql"
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to