class_docstr: Dialect for Apache Kylin
code: def convert_dttm(
      cls,
      target_type: str,
      dttm: datetime,
      db_extra: Optional[dict[str, Any]] = None,
  ) -> Optional[str]:
      sqla_type = cls.get_sqla_column_type(target_type)
  
      if isinstance(sqla_type, types.Date):
          return f"CAST('{dttm.date().isoformat()}' AS DATE)"
      if isinstance(sqla_type, types.TIMESTAMP):
          datetime_formatted = dttm.isoformat(
              sep=" ", timespec="seconds"
          )
          return f"""CAST('{datetime_formatted}' AS TIMESTAMP)"""
      return None
  
imports: from datetime import datetime
  from typing import Any, Optional
  from sqlalchemy import types
  from superset.constants import TimeGrain
  from superset.db_engine_specs.base import BaseEngineSpec
label_desc: Use image node_id 1 for calling the KylinEngineSpec obj's underlying member method code with example usage: obj.convert_dttm(cls, target_type, dttm, db_extra) and returns: None, str, dttm, str, str, datetime_formatted, str