Basin SQL 新增 OFFSET 支持,实现分页查询
Basin SQL, Basin - Basin SQL supports OFFSET
面向使用 Basin Catalog 处理 Iceberg 表的开发者,OFFSET 是构建稳定分页逻辑的关键能力,直接扩展了现有工具的适用范围,值得跟进。
Basin SQL is a serverless, distributed SQL engine for querying Apache Iceberg tables in Basin Catalog. It now supports OFFSET, which lets you skip a specified number of rows when retrieving query results.
Basin SQL 是一个无服务器的分布式 SQL 引擎,用于查询 Basin Catalog 中的 Apache Iceberg 表。它现在支持 OFFSET,允许在检索查询结果时跳过指定数量的行。
Use LIMIT to set the page size and OFFSET to skip earlier rows. With a page size of 100, use OFFSET 0 for the first page, OFFSET 100 for the second, and increase the offset by 100 for each later page. Add ORDER BY on a unique column to keep the row order consistent.
使用 LIMIT 设置页面大小,使用 OFFSET 跳过前面的行。当页面大小为 100 时,第一页使用 OFFSET 0,第二页使用 OFFSET 100,后续每页将偏移量增加 100。在唯一列上添加 ORDER BY 以保持行顺序一致。
For example, this query returns the second page of 100 rows:
例如,此查询返回包含 100 行的第二页:
SELECT sale_id, total_amount
FROM my_namespace.sales_data
ORDER BY sale_id
LIMIT 100 OFFSET 100For syntax and examples, refer to the OFFSET clause in the Basin SQL reference.
有关语法和示例,请参阅 Basin SQL 参考文档中的 OFFSET 子句。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力