Isn't limit stored in an order by clause, with potentially an empty list of fields to sort on? ________________________________ From: Vishal Kore <vishal.k...@rockwellautomation.com.INVALID> Sent: Tuesday, September 17, 2024 1:17:15 AM To: dev@calcite.apache.org <dev@calcite.apache.org> Cc: Harshit Dwivedi <harshit.dwiv...@rockwellautomation.com>; Dipesh Sachdev <dipesh.sach...@rockwellautomation.com>; Thomas Keller <tkel...@ra.rockwell.com> Subject: Questions Regarding Implementing LIMIT Clause Pushdown in Apache Calcite JDBC Driver
Hi Devs, I am currently working on implementing (or extending) a JDBC driver for my backend storage system using Apache Calcite. I've implemented the FilterableTable interface, which allows pushing down WHERE clause filters to the backend using the scan(DataContext ctx, List<RexNode> filters) method. However, I'm struggling to push down the LIMIT clause to ensure that only the required number of records are retrieved from the backend. I cannot figure out how to access the LIMIT clause within the scan method. Could you please guide me on how to retrieve or implement the LIMIT clause in this context? Thanks for your assistance! Best regards, Vishal Kore