// File: hyrise[P]sql-parser/src/sql/statements.cpp
// Function: hsql::operator<<(std::ostream&, hsql::ColumnType const&)
std::ostream& operator<<(std::ostream& stream, const ColumnType& column_type) {
  switch (column_type.data_type) {
    case DataType::UNKNOWN:
      stream << "UNKNOWN";
      break;
    case DataType::INT:
      stream << "INT";
      break;
    case DataType::BIGINT:
      stream << "BIGINT";
      break;
    case DataType::LONG:
      stream << "LONG";
      break;
    case DataType::FLOAT:
      stream << "FLOAT";
      break;
    case DataType::DOUBLE:
      stream << "DOUBLE";
      break;
    case DataType::REAL:
      stream << "REAL";
      break;
    case DataType::CHAR:
      stream << "CHAR(" << column_type.length << ")";
      break;
    case DataType::VARCHAR:
      stream << "VARCHAR(" << column_type.length << ")";
      break;
    case DataType::DECIMAL:
      stream << "DECIMAL";
      break;
    case DataType::TEXT:
      stream << "TEXT";
      break;
    case DataType::DATETIME:
      stream << "DATETIME";
      break;
    case DataType::DATE:
      stream << "DATE";
      break;
    case DataType::TIME:
      stream << "TIME";
      break;
    case DataType::SMALLINT:
      stream << "SMALLINT";
      break;
    case DataType::BOOLEAN:
      stream << "BOOLEAN";
      break;
  }
  return stream;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
movq %rax, (%rsp)
subq $0xf, %rax
ja 0x66820
movq (%rsp), %rax
leaq 0x17ec2(%rip), %rcx     # 0x7e550
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rdi
leaq 0x180bf(%rip), %rsi     # 0x7e762
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbe8d(%rip), %rsi      # 0x72546
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbe74(%rip), %rsi      # 0x72543
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbfec(%rip), %rsi      # 0x726d1
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbf2e(%rip), %rsi      # 0x72629
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbe75(%rip), %rsi      # 0x72586
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbe06(%rip), %rsi      # 0x7252d
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0x18030(%rip), %rsi     # 0x7e76d
callq 0x377a0
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x39cc0
movq %rax, %rdi
leaq 0x17cbe(%rip), %rsi     # 0x7e41b
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0x17ff7(%rip), %rsi     # 0x7e76a
callq 0x377a0
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x39cc0
movq %rax, %rdi
leaq 0x17c88(%rip), %rsi     # 0x7e41b
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbd89(%rip), %rsi      # 0x72532
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbf2e(%rip), %rsi      # 0x726ea
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbec2(%rip), %rsi      # 0x72691
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0x18138(%rip), %rsi     # 0x7e91a
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbea0(%rip), %rsi      # 0x72695
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbd32(%rip), %rsi      # 0x7253a
callq 0x377a0
jmp 0x66820
movq 0x10(%rsp), %rdi
leaq 0xbf85(%rip), %rsi      # 0x727a0
callq 0x377a0
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)