diff options
Diffstat (limited to 'sqlglot/expressions.py')
-rw-r--r-- | sqlglot/expressions.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sqlglot/expressions.py b/sqlglot/expressions.py index 0479da0..877e9fd 100644 --- a/sqlglot/expressions.py +++ b/sqlglot/expressions.py @@ -3350,6 +3350,7 @@ class Subquery(DerivedTable, Unionable): class TableSample(Expression): arg_types = { "this": False, + "expressions": False, "method": False, "bucket_numerator": False, "bucket_denominator": False, @@ -3542,6 +3543,7 @@ class DataType(Expression): UINT = auto() UINT128 = auto() UINT256 = auto() + UMEDIUMINT = auto() UNIQUEIDENTIFIER = auto() UNKNOWN = auto() # Sentinel value, useful for type annotation USERDEFINED = "USER-DEFINED" @@ -3708,7 +3710,7 @@ class Rollback(Expression): class AlterTable(Expression): - arg_types = {"this": True, "actions": True, "exists": False} + arg_types = {"this": True, "actions": True, "exists": False, "only": False} class AddConstraint(Expression): @@ -3993,15 +3995,10 @@ class TimeUnit(Expression): # https://www.oracletutorial.com/oracle-basics/oracle-interval/ -# https://trino.io/docs/current/language/types.html#interval-year-to-month -class IntervalYearToMonthSpan(Expression): - arg_types = {} - - -# https://www.oracletutorial.com/oracle-basics/oracle-interval/ # https://trino.io/docs/current/language/types.html#interval-day-to-second -class IntervalDayToSecondSpan(Expression): - arg_types = {} +# https://docs.databricks.com/en/sql/language-manual/data-types/interval-type.html +class IntervalSpan(Expression): + arg_types = {"this": True, "expression": True} class Interval(TimeUnit): |