Skip to content

Conversation

@nehanene15
Copy link
Collaborator

Description of changes

Revert change, which caused no columns to be picked up:
packages/ibis/expr/types/relations.py", line 1724, in select\n raise com.IbisTypeError(\nibis.common.exceptions.IbisTypeError: You must select at least one column for a valid projection\n'.

Also test updating to 'redshift' dialect since customer is getting NoSuchTable error due to internal catalog searching for PG metadata tables.

Checklist

  • I have followed the CONTRIBUTING Guide.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated any relevant documentation to reflect my changes, if applicable
  • I have added unit and/or integration tests relevant to my change as needed
  • I have already checked locally that all unit tests and linting are passing (use the tests/local_check.sh script)
  • I have manually executed end-to-end testing (E2E) with the affected databases/engines

@nehanene15
Copy link
Collaborator Author

/gcbrun

@nehanene15 nehanene15 requested a review from nj1973 January 26, 2026 22:25
password=password,
database=database,
driver=f"postgresql+{driver}",
driver=f"redshift+{driver}",
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 not sure why this change is being made. This line has not changed in 3 years. Can you explain ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's a customer seeing NoSuchTableError when the table exists in Redshift due to the driver not querying the correct metadata tables since PG and Redshift have slightly different internal catalog tables. Based on my research, it is caused bc it is not recommended to use the postrgresql+psycopg2 anymore but rather the redshift+redshift_connector.

Since psycopg2 is generally compatible, I'm trying to just update the dialect correctly to redshift. I'm also trying to find a Redshift test instance to test

query = f"TABLE {query}"
with self.begin() as con:
con.exec_driver_sql(f"CREATE VIEW {name} AS {query} WITH NO SCHEMA BINDING")
con.exec_driver_sql(f"CREATE VIEW {name} AS {query}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This appears to be a revert, so is OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants