CreateQuery test (children 3)
 Identifier test
 Columns definition (children 2)
  ExpressionList (children 35)
   ColumnDeclaration timestamp (children 1)
    DataType DateTime
   ColumnDeclaration latitude (children 2)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Float32
    Function CODEC (children 1)
     ExpressionList (children 2)
      Function Gorilla
      Function ZSTD (children 1)
       ExpressionList (children 1)
        Literal UInt64_1
   ColumnDeclaration longitude (children 2)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Float32
    Function CODEC (children 1)
     ExpressionList (children 2)
      Function Gorilla
      Function ZSTD (children 1)
       ExpressionList (children 1)
        Literal UInt64_1
   ColumnDeclaration xxxx1 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType UInt8
   ColumnDeclaration xxxx2 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx3 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx4 (children 1)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Int32
   ColumnDeclaration xxxx5 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int32
   ColumnDeclaration xxxx6 (children 1)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Int32
   ColumnDeclaration xxxx7 (children 1)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Int32
   ColumnDeclaration xxxx8 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Int32
   ColumnDeclaration xxxx9 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx10 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx11 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx12 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType String
   ColumnDeclaration xxxx13 (children 1)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Float32
   ColumnDeclaration xxxx14 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType String
   ColumnDeclaration xxxx15 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType String
   ColumnDeclaration xxxx16 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType String
   ColumnDeclaration xxxx17 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType String
   ColumnDeclaration xxxx18 (children 1)
    DataType FixedString (children 1)
     ExpressionList (children 1)
      Literal UInt64_19
   ColumnDeclaration xxxx19 (children 1)
    DataType FixedString (children 1)
     ExpressionList (children 1)
      Literal UInt64_17
   ColumnDeclaration xxxx20 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType UInt8
   ColumnDeclaration xxxx21 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx22 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx23 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx24 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx25 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx26 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType Int16
   ColumnDeclaration xxxx27 (children 1)
    DataType Nullable (children 1)
     ExpressionList (children 1)
      DataType Float32
   ColumnDeclaration xxxx28 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType String
   ColumnDeclaration xxxx29 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType String
   ColumnDeclaration xxxx30 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType String
   ColumnDeclaration xxxx31 (children 1)
    DataType LowCardinality (children 1)
     ExpressionList (children 1)
      DataType Nullable (children 1)
       ExpressionList (children 1)
        DataType String
   ColumnDeclaration xxxx32 (children 1)
    DataType UInt64
  ExpressionList (children 1)
   Projection (children 1)
    ProjectionSelectQuery (children 2)
     ExpressionList (children 25)
      Identifier xxxx1
      Function toStartOfInterval (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Function toIntervalMonth (children 1)
         ExpressionList (children 1)
          Literal UInt64_1
      Function toStartOfWeek (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Literal UInt64_8
      Function toStartOfInterval (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Function toIntervalDay (children 1)
         ExpressionList (children 1)
          Literal UInt64_1
      Identifier xxxx17
      Identifier xxxx16
      Identifier xxxx14
      Identifier xxxx9
      Identifier xxxx10
      Identifier xxxx21
      Identifier xxxx22
      Identifier xxxx11
      Function sum (children 1)
       ExpressionList (children 1)
        Function multiIf (children 1)
         ExpressionList (children 3)
          Function isNull (children 1)
           ExpressionList (children 1)
            Identifier xxxx21
          Literal UInt64_0
          Literal UInt64_1
      Function sum (children 1)
       ExpressionList (children 1)
        Function multiIf (children 1)
         ExpressionList (children 3)
          Function isNull (children 1)
           ExpressionList (children 1)
            Identifier xxxx22
          Literal UInt64_0
          Literal UInt64_1
      Function sum (children 1)
       ExpressionList (children 1)
        Function multiIf (children 1)
         ExpressionList (children 3)
          Function isNull (children 1)
           ExpressionList (children 1)
            Identifier xxxx23
          Literal UInt64_0
          Literal UInt64_1
      Function max (children 1)
       ExpressionList (children 1)
        Function toStartOfInterval (children 1)
         ExpressionList (children 2)
          Identifier timestamp
          Function toIntervalDay (children 1)
           ExpressionList (children 1)
            Literal UInt64_1
      Function max (children 1)
       ExpressionList (children 1)
        Function CAST (children 1)
         ExpressionList (children 2)
          Function CAST (children 1)
           ExpressionList (children 2)
            Function toStartOfInterval (children 1)
             ExpressionList (children 2)
              Identifier timestamp
              Function toIntervalDay (children 1)
               ExpressionList (children 1)
                Literal UInt64_1
            Literal \'Nullable(DATE)\'
          Literal \'Nullable(TIMESTAMP)\'
      Function min (children 1)
       ExpressionList (children 1)
        Function toStartOfInterval (children 1)
         ExpressionList (children 2)
          Identifier timestamp
          Function toIntervalDay (children 1)
           ExpressionList (children 1)
            Literal UInt64_1
      Function min (children 1)
       ExpressionList (children 1)
        Function CAST (children 1)
         ExpressionList (children 2)
          Function CAST (children 1)
           ExpressionList (children 2)
            Function toStartOfInterval (children 1)
             ExpressionList (children 2)
              Identifier timestamp
              Function toIntervalDay (children 1)
               ExpressionList (children 1)
                Literal UInt64_1
            Literal \'Nullable(DATE)\'
          Literal \'Nullable(TIMESTAMP)\'
      Function count (children 1)
       ExpressionList
      Function sum (children 1)
       ExpressionList (children 1)
        Literal UInt64_1
      Function COUNTDistinct (children 1)
       ExpressionList (children 1)
        Identifier xxxx16
      Function COUNTDistinct (children 1)
       ExpressionList (children 1)
        Identifier xxxx31
      Function COUNTDistinct (children 1)
       ExpressionList (children 1)
        Identifier xxxx14
      Function COUNTDistinct (children 1)
       ExpressionList (children 1)
        Function CAST (children 1)
         ExpressionList (children 2)
          Function toStartOfInterval (children 1)
           ExpressionList (children 2)
            Identifier timestamp
            Function toIntervalDay (children 1)
             ExpressionList (children 1)
              Literal UInt64_1
          Literal \'Nullable(DATE)\'
     ExpressionList (children 16)
      Identifier xxxx1
      Function toStartOfInterval (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Function toIntervalMonth (children 1)
         ExpressionList (children 1)
          Literal UInt64_1
      Function toStartOfWeek (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Literal UInt64_8
      Function toStartOfInterval (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Function toIntervalDay (children 1)
         ExpressionList (children 1)
          Literal UInt64_1
      Identifier xxxx1
      Function toStartOfInterval (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Function toIntervalMonth (children 1)
         ExpressionList (children 1)
          Literal UInt64_1
      Function toStartOfWeek (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Literal UInt64_8
      Function toStartOfInterval (children 1)
       ExpressionList (children 2)
        Identifier timestamp
        Function toIntervalDay (children 1)
         ExpressionList (children 1)
          Literal UInt64_1
      Identifier xxxx17
      Identifier xxxx16
      Identifier xxxx14
      Identifier xxxx9
      Identifier xxxx10
      Identifier xxxx21
      Identifier xxxx22
      Identifier xxxx11
 Storage definition (children 3)
  Function MergeTree
  Function toYYYYMM (children 1)
   ExpressionList (children 1)
    Identifier timestamp
  Function tuple (children 1)
   ExpressionList (children 6)
    Identifier xxxx17
    Identifier xxxx14
    Identifier xxxx16
    Function toStartOfDay (children 1)
     ExpressionList (children 1)
      Identifier timestamp
    Function left (children 1)
     ExpressionList (children 2)
      Identifier xxxx19
      Literal UInt64_10
    Identifier timestamp
