-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sparksql engine spec #244
Add sparksql engine spec #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Let's also add an entry to the changelog, please.
It looks like some hive spec tests are now failing in travis |
Okay, I took a look at the test and it is expected to fail due to the change made. We have then two options:
The second option also reduces our changes against upstream. What do you think is better? |
I don't have a strong preference, both work for our purposes. Maybe 2 will make it easier to merge new changes from upstream until this lands in their repo. At the same time going with 1 can be better if it will be reused later to send a PR upstream. I'd like to hear you opinion too @smacker. |
|
The tests are failing because of the For our purposes we can simply put it in I'll just put the method in the |
Signed-off-by: Lou Marvin Caraig <[email protected]>
Signed-off-by: Lou Marvin Caraig <[email protected]>
Signed-off-by: Lou Marvin Caraig <[email protected]>
35ffa68
to
38459a4
Compare
I force-pushed the changes. |
Closes #227.
By connecting to
gsc
throughsparksql://gsc:10000/default
, sourced-ui is currently usingBaseEngineSpec
because that engine is the fallback for databases whose backend doesn't have a corresponding engine spec. In this case the backend for thegitbase
Database issparksql
that doesn't have a corresponding engine spec. All the engines specs are registered here.This PR adds a
SparkSQLEngineSpec
that inherits fromHiveEngineSpec
and sets the correct engine name.Using the
SparkSQLEngineSpec
fixes the bug #227, but broke the listing of the available views in the SQL Editor tab. These views are listed by calling theget_views_name
name of the corresponding engine spec, but in this case, it's shadowed by the inherited classes (more details here). This has been fixed by redefining theget_views_name
class method inHiveEngineSpec
.Additionally, the SparkSQL dialect doesn't support passing charset (nor presto, nor hive), but it shouldn't be required as thrift server uses
utf8
by default.