我想从表中删除分区:
ALTER TABLE rosing_watch_sessions REMOVE PARTITIONING
但它会引发错误:
Severity: ROLLBACK,
Message: Unsupported access to table with projection expressions or aggregates,
Sqlstate: 0A000,
Routine: checkUnsupportedMaVeriCKTableError,
File: /scratch_a/release/16125/vbuild/vertica/Catalog/CatalogLookup.cpp,
Line: 1383
这个错误消息是什么意思?
P.S。
select export_objects('', 'rosing_watch_sessions')
的结果:
CREATE TABLE staging.rosing_watch_sessions
(
id IDENTITY ,
session_uid varchar(255) NOT NULL,
...
)
PARTITION BY (rosing_watch_sessions.requested_day);
ALTER TABLE staging.rosing_watch_sessions ADD CONSTRAINT C_PRIMARY PRIMARY KEY (id);
CREATE PROJECTION staging.rosing_watch_sessions_super /*+basename(rosing_watch_sessions),createtype(P)*/
(
id,
session_uid,
...
)
AS
SELECT rosing_watch_sessions.id,
rosing_watch_sessions.session_uid,
...
FROM staging.rosing_watch_sessions
ORDER BY rosing_watch_sessions.id
SEGMENTED BY hash(rosing_watch_sessions.requested_day) ALL NODES ;
CREATE PROJECTION staging.channel_coverage
(
resource_uid,
device_uid,
request_date,
num_requests,
__partition_key_value__ ENCODING RLE
)
AS
SELECT rosing_watch_sessions.resource_uid,
rosing_watch_sessions.device_uid,
date("timezone"('UTC'::varchar(3), rosing_watch_sessions.requested_at)) AS request_date,
count(rosing_watch_sessions.session_uid) AS num_requests,
max(rosing_watch_sessions.requested_day) AS __partition_key_value__
FROM staging.rosing_watch_sessions
GROUP BY rosing_watch_sessions.resource_uid,
rosing_watch_sessions.device_uid,
date("timezone"('UTC'::varchar(3), rosing_watch_sessions.requested_at))
;
SELECT MARK_DESIGN_KSAFE(0);
答案 0 :(得分:2)
实时聚合预测不支持某些操作(尚未)。
DROP PROJECTION staging.channel_coverage;
ALTER TABLE rosing_watch_sessions REMOVE PARTITIONING;
然后使用您拥有的DDL重建staging.channel_coverage
。