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
postgres=# CREATE TABLE tab (
i text,
COLUMN non_existent ENCODING (compresstype=zlib)
)
with (appendonly=true, orientation=column);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
Expected behavior
I expected an error, because there is no "non_existent" column. There is code specifically to check for that, in the validateColumnStorageEncodingClauses() function:
/*
* Validate the sanity of column reference storage clauses.
*
* 1. Ensure that we only refer to columns that exist.
* 2. Ensure that each column is referenced either zero times or once.
*/
static void
validateColumnStorageEncodingClauses(List *stenc, List *columns)
{
...
/*
* All column reference storage directives without the DEFAULT
* clause should refer to real columns.
*/
foreach(lc, stenc)
{
...
if (!found)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("column \"%s\" does not exist", colname)));
But that code is not being called correctly.
The text was updated successfully, but these errors were encountered:
The other check in validateColumnStorageEncodingClauses(), for duplicated COLUMN ENCODING directives, is also broken:
postgres=# CREATE TABLE dupetab (
dupe text,
column dupe encoding (compresstype=zlib),
column dupe encoding (compresstype=none)
)
with (appendonly=true, orientation=column);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'dupe' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
Actual behavior
Expected behavior
I expected an error, because there is no "non_existent" column. There is code specifically to check for that, in the
validateColumnStorageEncodingClauses()
function:But that code is not being called correctly.
The text was updated successfully, but these errors were encountered: