Fixed create table as with columns without types for redshift#2279
Open
romanoff wants to merge 1 commit intoapache:mainfrom
Open
Fixed create table as with columns without types for redshift#2279romanoff wants to merge 1 commit intoapache:mainfrom
romanoff wants to merge 1 commit intoapache:mainfrom
Conversation
iffyio
reviewed
Mar 20, 2026
Comment on lines
+511
to
+512
| "CREATE TEMP TABLE volt_tt(userid, days_played_in_last_31) AS SELECT 1, 2", | ||
| "CREATE TEMPORARY TABLE volt_tt (userid, days_played_in_last_31) AS SELECT 1, 2", |
Contributor
There was a problem hiding this comment.
this test/PR isn't related to temporary tables? if so it would probably be better to remove the temp qualifiers and we can use verified_stmt as usual?
| // CREATE TABLE t (col1, col2) AS SELECT 1, 2 | ||
| // Detect this by peeking for `( ident ,` or `( ident )` patterns. | ||
| let (columns, constraints) = | ||
| if dialect_of!(self is RedshiftSqlDialect) && self.peek_column_names_only() { |
Contributor
There was a problem hiding this comment.
Can we convert this into a dialect method?
Actually looking at the code this feature seems to be solving a similar problem to is_column_type_sqlite_unspecified - likely we can instead have that parse_column_def function optionally accept a datatype if this method is true (and can rename the method accordingly)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example query:
Spec: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_AS.html