Skip to content
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

Databricks dialect #284

Merged
merged 5 commits into from
Oct 3, 2023
Merged

Databricks dialect #284

merged 5 commits into from
Oct 3, 2023

Conversation

KantorSerhiy
Copy link

Hi @EvgSkv!

In the continuation of the discussion #236 -> I add the databricks dialect.

I am waiting for feedback from you!
Thank you.
Serhii.

Copy link
Owner

@EvgSkv EvgSkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Please see a couple requests to comment inline. Overall looks great!

@@ -0,0 +1,26 @@
library = """
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Apache compliance please add leading comment:

#!/usr/bin/python
#
# Copyright 2023 Logica Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

@@ -308,11 +310,61 @@ def DecorateCombineRule(self, rule, var):
return rule


class Databricks(Dialect):
"""Databricks dialect"""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a brief comment explaining current state of the dialect. I.e. what are critical features yet to be implemented?

E.g.:

  1. Unnesting. Does this work?
Q(x) :- x in [1,2,3];
  1. Records.
    Does this work?
P({a:1, b: ["x","y"]});

I am assuming something is yet TODO, is that so?

@KantorSerhiy
Copy link
Author

hey @EvgSkv, i add Apache compliance comment and checked Unnesting and Records.
It works.
I'm not entirely sure about the function UnnestPhrase, but for my cases - it works.

also i added minor TODO, but they are not critical.
I hope it will be useful for you!

Serhii.

@EvgSkv
Copy link
Owner

EvgSkv commented Sep 25, 2023

Looking great! I'll be resolving conflicts and merging the PR this week. Thank you @KantorSerhiy !

@EvgSkv EvgSkv merged commit e2df0ce into EvgSkv:main Oct 3, 2023
1 check passed
@rvalek rvalek mentioned this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants