1#include "duckdb/parser/tableref/subqueryref.hpp"
2#include "duckdb/parser/transformer.hpp"
3
4namespace duckdb {
5
6unique_ptr<TableRef> Transformer::TransformRangeSubselect(duckdb_libpgquery::PGRangeSubselect &root) {
7 Transformer subquery_transformer(*this);
8 auto subquery = subquery_transformer.TransformSelect(node: root.subquery);
9 if (!subquery) {
10 return nullptr;
11 }
12 auto result = make_uniq<SubqueryRef>(args: std::move(subquery));
13 result->alias = TransformAlias(root: root.alias, column_name_alias&: result->column_name_alias);
14 if (root.sample) {
15 result->sample = TransformSampleOptions(options: root.sample);
16 }
17 return std::move(result);
18}
19
20} // namespace duckdb
21