-
Notifications
You must be signed in to change notification settings - Fork 7
[Bug] can't read from table with partitioned clustered index #85
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Hi,
I noticed some limitation when trying to query a table that has a partitioned clustered index.
in MSSQL:
CREATE PARTITION FUNCTION [pf_logs_by_month] (DATETIME2(7))
AS RANGE RIGHT
FOR VALUES (
'2026-02-01 00:00:00'
, '2026-03-01 00:00:00'
, '2026-04-01 00:00:00'
);
GO
CREATE PARTITION SCHEME [ps_logs_by_month]
AS PARTITION [pf_logs_by_month] ALL TO ([PRIMARY]);
GO
CREATE TABLE [dbo].[log](
log_ts DATETIME2(7) DEFAULT (GETUTCDATE()) NOT NULL,
message NVARCHAR(255)
);
INSERT INTO [dbo].[log] (message) VALUES ('bar');
CREATE CLUSTERED INDEX [ix_ci_log_log_ts]
ON [dbo].[log] (log_ts DESC) WITH (DATA_COMPRESSION = PAGE, OPTIMIZE_FOR_SEQUENTIAL_KEY = ON)
ON [ps_logs_by_month] (log_ts);
GOWhen trying to query it via DuckDB & mssql-extension, it fails:
SELECT * FROM attached_db.dbo.log;Catalog Error:
Column with name log_ts already exists!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request