From cd37a3bcaced9283c20baa52837c96b524baec54 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 10 Oct 2023 10:53:14 +0200 Subject: Merging upstream version 18.11.6. Signed-off-by: Daniel Baumann --- sqlglot/expressions.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'sqlglot/expressions.py') diff --git a/sqlglot/expressions.py b/sqlglot/expressions.py index 1e4aad6..80f1c0f 100644 --- a/sqlglot/expressions.py +++ b/sqlglot/expressions.py @@ -2040,8 +2040,12 @@ class FreespaceProperty(Property): arg_types = {"this": True, "percent": False} -class InputOutputFormat(Expression): - arg_types = {"input_format": False, "output_format": False} +class InputModelProperty(Property): + arg_types = {"this": True} + + +class OutputModelProperty(Property): + arg_types = {"this": True} class IsolatedLoadingProperty(Property): @@ -2137,6 +2141,10 @@ class PartitionedByProperty(Property): arg_types = {"this": True} +class RemoteWithConnectionModelProperty(Property): + arg_types = {"this": True} + + class ReturnsProperty(Property): arg_types = {"this": True, "is_table": False, "table": False} @@ -2211,6 +2219,10 @@ class TemporaryProperty(Property): arg_types = {} +class TransformModelProperty(Property): + arg_types = {"expressions": True} + + class TransientProperty(Property): arg_types = {"this": False} @@ -2293,6 +2305,10 @@ class Qualify(Expression): pass +class InputOutputFormat(Expression): + arg_types = {"input_format": False, "output_format": False} + + # https://www.ibm.com/docs/en/ias?topic=procedures-return-statement-in-sql class Return(Expression): pass @@ -2465,6 +2481,7 @@ class Table(Expression): "version": False, "format": False, "pattern": False, + "index": False, } @property @@ -3431,7 +3448,7 @@ class Pivot(Expression): arg_types = { "this": False, "alias": False, - "expressions": True, + "expressions": False, "field": False, "unpivot": False, "using": False, @@ -4777,6 +4794,11 @@ class Posexplode(Func): pass +# https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-predict#mlpredict_function +class Predict(Func): + arg_types = {"this": True, "expression": True, "params_struct": False} + + class Pow(Binary, Func): _sql_names = ["POWER", "POW"] -- cgit v1.2.3