Open novicecpp opened 5 years ago
Prioritizing this as p3 since we don't officially support Hive. It would be good to look into it regardless however, but we should prioritize the Spark driver supporting Spark idiomatically.
Will probably be fixed by #13345
This issue still prevails in V0.39.2 and was not solved by #13345.
@salsakran could you maybe shed some light on what exactly is supported under the point "SparkSQL" mentioned under "Officially supported Databases" in https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html?
@chillinger #13345 was never merged. A fix for this would likely require updating the driver #11023, which would require more work than just upgrading the driver.
@chillinger @salsakran there's a little bit of confusion here. We only support Spark built with Hive and JDBC support. Pre-built Spark binaries come with this built in. Spark implements the Hive SQL API, and we use the Hive JDBC driver for connecting to Spark clusters.
So I'd characterize what we support as "Spark+Hive" or "Spark via Hive" specifically. We don't support Hive on its own or with other things besides Spark
After looking at this I don't think this has anything to do with the JDBC driver version. We need to omit the table aliases for Fields in the order by clause which would be reasonably easy to do but has nothing to do with the JDBC driver version
This is still an issue with Metabase v0.48.6 and Hive 3.1.3.
This is a blocker because we can't use date based aggregations in "Question" style queries, as it generates an ORDER BY. Question is what makes Metabase attractive in the first place.
As said above, the workaround is simply to turn the question into an SQL query and remove the table alias in the ORDER BY close. It seems to be a reasonably challenging change to support a plethora of potential Hive users in big companies still using Hadoop.
This issue is seriously compromising the adoption of Metabase Pro I was pushing for in my team. We'll probably have to fallback to Superset.
Describe the bug For example, a table
user
with single columnid
, this SQL is not supported by hive:Hive only support order by only selected field. This query works:
The different is that table alias
t1
must not present in field name of order by clause. Hive not allow to use table alias in order by clause when use column alias in select clause.This query was generated when sort table by any field in UI.
Logs
To Reproduce
Expected behavior A SQL generated must not include table alias as a prefix
Information about your Metabase Installation: