Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ public void accept(InnerVisitor visitor) {
public IIndentStream toString(IIndentStream builder) {
return builder.append("struct ")
.append(this.mayBeNull ? "?" : "")
.append(this.name.name());
.append(" ")
.append(this.name.name())
.append(" ")
.append(this.hashName);
Comment on lines +286 to +289
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The addition of spaces around the struct name and hash creates output like struct name hash. This spacing pattern may not match the expected format. Consider removing the extra spaces or documenting why this specific spacing is required.

Copilot uses AI. Check for mistakes.
}

/** Generate a tuple type by ignoring the struct and field names. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -890,4 +890,18 @@ CREATE TABLE example (
z ROW(x INT, y INT) NOT NULL default ROW(1, 2)
);""");
}


@Test
public void issue5390() {
this.getCCS("""
CREATE TYPE user_def AS(i1 INT);
CREATE TYPE user_def_row AS (val ROW(i1 INT));
CREATE TYPE user_def_udt AS (val user_def);

CREATE MATERIALIZED VIEW v AS SELECT
SAFE_CAST(NULL AS user_def_row) AS to_row,
SAFE_CAST(NULL AS user_def_udt) AS to_udt
;""");
}
}
Loading