xinhuitian opened a new issue, #795:
URL: https://github.com/apache/cloudberry/issues/795
### Apache Cloudberry version
1.6.0
### What happened
Hello, I'm currently testing cb with the bootcamp 000-cbdb-sandbox docker
file.
When I run a query similar as the below one:
```
gpadmin=# CREATE TABLE test_partition (
name character varying,
last_modified_date timestamp without time zone
)
WITH (appendoptimized=true, orientation=column, compresslevel=1)
DISTRIBUTED BY (name)
PARTITION BY RANGE (last_modified_date)
(
PARTITION partition_202411 START ('2024-11-01 00:00:00') INCLUSIVE END
('2024-12-01 00:00:00') EXCLUSIVE,
PARTITION partition_max START ('2024-12-01 00:00:00') INCLUSIVE END
(MAXVALUE)
);
```
I got the following error:
```
ERROR: cannot use column reference in partition bound expression
LINE 10: ...n_max START ('2024-12-01 00:00:00') INCLUSIVE END (MAXVALUE)
```
Split it to another query works fine:
```
CREATE TABLE partition_max partition of test_partition for values from
('2024-12-01 00:00:00') to (MAXVALUE);
```
Seems like MAXVALUE in the first query is parsed to a column ref. Seems like
a bug here?
### What you think should happen instead
Correctly process this kind of query without error, be more compatible with
Greenplum syntax
### How to reproduce
running such query:
```
CREATE TABLE test_partition (
name character varying,
last_modified_date timestamp without time zone
)
WITH (appendoptimized=true, orientation=column, compresslevel=1)
DISTRIBUTED BY (name)
PARTITION BY RANGE (last_modified_date)
(
PARTITION partition_202411 START ('2024-11-01 00:00:00') INCLUSIVE END
('2024-12-01 00:00:00') EXCLUSIVE,
PARTITION partition_max START ('2024-12-01 00:00:00') INCLUSIVE END
(MAXVALUE)
);
```
### Operating System
cbdb-1.6.0:rockylinux9 docker image running on Debian GNU/Linux 9 (stretch)
### Anything else
Every time
### Are you willing to submit PR?
- [X] Yes, I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/cloudberry/blob/main/CODE_OF_CONDUCT.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]