File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
datajunction-server/datajunction_server/sql Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4780,6 +4780,25 @@ def infer_type(
47804780 return [arg .key , arg .value ]
47814781
47824782
4783+ class Range (TableFunction ):
4784+ """
4785+ range(start[, end[, step[, numSlices]]]) / range(end)
4786+ Returns a table with a single BIGINT column `id` containing values
4787+ within the specified range.
4788+ """
4789+
4790+ dialects = [Dialect .SPARK ]
4791+
4792+
4793+ @Range .register
4794+ def infer_type (
4795+ * args : ct .IntegerBase ,
4796+ ) -> List [ct .NestedField ]:
4797+ from datajunction_server .sql .parsing .ast import Name
4798+
4799+ return [ct .NestedField (name = Name ("id" ), field_type = ct .BigIntType ())]
4800+
4801+
47834802class FunctionRegistryDict (dict ):
47844803 """
47854804 Custom dictionary mapping for functions
You can’t perform that action at this time.
0 commit comments