You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #655, we added a message at the bottom of ResultSet, so users knew that the returned value is not a data frame. However, since all SQL statements return ResultSet, even statements such as CREATE TABLE will return a ResultSet, hence the new label (see here: #655 (review))
It's rarely the case that someone will want to convert the result of a create table statement into a pandas dataframe so it'd be better not to show the label to clean things up.
I don't know what's the most reliable approach, perhaps we can add a flag to hide this when the ResultSet was not generated from a SELECT statement? However, in DuckDB SELECT * FROM table is the same as FROM table, and a CTE like:
with something as (
select * from stuff
)
select * from something
is another possibility. So I'm unsure if there's a reliable way to detect SELECT and SELECT-like statements.
Perhaps we can infer this from the sqlalchemy cursor that returns the results? i.e., if there's only one result and the column is named Count, we don't show the info. But then we have to think, what do we do with UPDATE statements and others that might return the same or similar results?
The text was updated successfully, but these errors were encountered:
In #655, we added a message at the bottom of ResultSet, so users knew that the returned value is not a data frame. However, since all SQL statements return ResultSet, even statements such as
CREATE TABLE
will return a ResultSet, hence the new label (see here: #655 (review))It's rarely the case that someone will want to convert the result of a create table statement into a pandas dataframe so it'd be better not to show the label to clean things up.
I don't know what's the most reliable approach, perhaps we can add a flag to hide this when the ResultSet was not generated from a
SELECT
statement? However, in DuckDBSELECT * FROM table
is the same asFROM table
, and a CTE like:is another possibility. So I'm unsure if there's a reliable way to detect
SELECT
andSELECT
-like statements.Perhaps we can infer this from the sqlalchemy cursor that returns the results? i.e., if there's only one result and the column is named
Count
, we don't show the info. But then we have to think, what do we do with UPDATE statements and others that might return the same or similar results?The text was updated successfully, but these errors were encountered: