Skip to content

Conversation

@AbhishekASLK
Copy link
Contributor

SELECT make_interval(100,11,12,13,14,14,15)
class MakeInterval(Func):
    arg_types = {
        "year": False,
        "month": False,
        "week": False,
        "day": False,
        "hour": False,
        "minute": False,
        "second": False,
    }

Databricks
Spark

Copy link
Collaborator

@VaggelisD VaggelisD left a comment

Choose a reason for hiding this comment

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

LGTM! One comment:

expr = exp.MakeInterval()

for arg_key in expr.arg_types:
for arg_key in ["year", "month", "day", "hour", "minute", "second"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whenever an array/set exceeds 3 elements we tend to extract them out of the function e.g check out bigquery.py::DQUOTES_ESCAPING_JSON_FUNCTIONS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll do that.

@georgesittas
Copy link
Collaborator

I'll get this to the finish line.

@georgesittas georgesittas merged commit aeb68b2 into tobymao:main Dec 22, 2025
9 checks passed
georgesittas pushed a commit that referenced this pull request Dec 22, 2025
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.

3 participants