66
77from sqlglot import exp , parse_one
88
9- from sqlmesh .core .dialect import to_schema , transform_values
9+ from sqlmesh .core .dialect import to_schema
1010
1111from sqlmesh .core .engine_adapter .base import (
1212 InsertOverwriteStrategy ,
1717 PandasNativeFetchDFSupportMixin ,
1818)
1919from sqlmesh .core .engine_adapter .shared import (
20+ CatalogSupport ,
2021 CommentCreationTable ,
2122 CommentCreationView ,
2223 DataObject ,
2324 DataObjectType ,
2425 set_catalog ,
2526)
26- from sqlmesh .core .schema_diff import SchemaDiffer
27- from sqlmesh .utils import random_id , get_source_columns_to_types
27+ from sqlmesh .utils import random_id
2828from sqlmesh .utils .errors import (
2929 SQLMeshError ,
3030)
3131
3232if t .TYPE_CHECKING :
3333 from sqlmesh .core ._typing import SchemaName , TableName
34- from sqlmesh .core .engine_adapter ._typing import QueryOrDF , Query
34+ from sqlmesh .core .engine_adapter ._typing import QueryOrDF
3535 from sqlmesh .core .node import IntervalUnit
3636
3737logger = logging .getLogger (__name__ )
@@ -48,13 +48,18 @@ class DorisEngineAdapter(
4848 COMMENT_CREATION_VIEW = CommentCreationView .IN_SCHEMA_DEF_NO_COMMANDS
4949 MAX_TABLE_COMMENT_LENGTH = 2048
5050 MAX_COLUMN_COMMENT_LENGTH = 255
51- SUPPORTS_REPLACE_TABLE = False
51+ SUPPORTS_INDEXES = True
52+ SUPPORTS_REPLACE_TABLE = False
5253 MAX_IDENTIFIER_LENGTH = 64
5354 SUPPORTS_MATERIALIZED_VIEWS = True
5455 SUPPORTS_MATERIALIZED_VIEW_SCHEMA = True
5556 SUPPORTS_CREATE_DROP_CATALOG = False
5657 INSERT_OVERWRITE_STRATEGY = InsertOverwriteStrategy .DELETE_INSERT
5758
59+ @property
60+ def catalog_support (self ) -> CatalogSupport :
61+ return CatalogSupport .FULL_SUPPORT
62+
5863 def create_schema (
5964 self ,
6065 schema_name : SchemaName ,
@@ -289,7 +294,6 @@ def drop_view(
289294 """
290295 Drop view in Doris.
291296 """
292- # Remove cascade from kwargs as Doris doesn't support it
293297 if materialized and kwargs .get ("view_properties" ):
294298 view_properties = kwargs .pop ("view_properties" )
295299 if view_properties .get ("materialized_type" ) == "SYNC" and view_properties .get (
@@ -1116,4 +1120,4 @@ def _properties_to_expressions(self, properties: t.Dict[str, t.Any]) -> t.List[e
11161120 if not isinstance (value , exp .Expression ):
11171121 value = exp .Literal .string (str (value ))
11181122 expressions .append (exp .Property (this = exp .Literal .string (str (key )), value = value ))
1119- return expressions
1123+ return expressions
0 commit comments