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

Support create table as select #2

Closed
wants to merge 4 commits into from
Closed

Support create table as select #2

wants to merge 4 commits into from

Conversation

scgkiran
Copy link
Owner

No description provided.

@scgkiran scgkiran marked this pull request as ready for review September 25, 2024 15:56
@@ -168,7 +172,9 @@ def test_ctas_with_union(require):
def execute_via_substrait(connection, query):
res = connection.get_substrait(query)
proto_bytes = res.fetchone()[0]
return connection.from_substrait(proto_bytes)
con = connection.from_substrait(proto_bytes)
con.fetchall() # this is needed to force the execution
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering what will be the behavior when we call it from Gorm (i.e. when we use from icecap). If it is same as this than this needs to be fixed differently. I will spend some time to figure out what will be behavior when we call from_substrait from Gorm

SELECT name, salary FROM employees""")

expected = pd.DataFrame({"name": ["John Doe", "Jane Smith", "Alice Johnson", "Bob Brown", "Charlie Black"],
"salary": [120000.0, 80000, 50000, 95000, 60000]})
Copy link
Collaborator

Choose a reason for hiding this comment

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

imo, since salary is decimal (10,2), we should mention all expected salary values as scale 2 i.e.
[120000.00, 80000.00, 50000.00, 95000.00, 60000.00]
or may be add one of the salary as non zero scale value to make it more clear

@scgkiran
Copy link
Owner Author

will open against sundeck-io/duckdb-substrait

@scgkiran scgkiran closed this Sep 26, 2024
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