Skip to content

Commit

Permalink
Add BLOB and other types (#244)
Browse files Browse the repository at this point in the history
* Add BLOB and other types

* Remove unused import
  • Loading branch information
betodealmeida authored Dec 9, 2020
1 parent f674b69 commit a1d9b7e
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions pydruid/db/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from sqlalchemy.sql import compiler

import pydruid.db
from pydruid.db import exceptions

RESERVED_SCHEMAS = ["INFORMATION_SCHEMA"]

Expand Down Expand Up @@ -63,25 +62,18 @@ def visit_CHAR(self, type_, **kwargs):
visit_TEXT = visit_CHAR

def visit_DATETIME(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type DATETIME is not supported")
return "LONG"

def visit_TIME(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type TIME is not supported")

def visit_BINARY(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type BINARY is not supported")

def visit_VARBINARY(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type VARBINARY is not supported")
return "LONG"

def visit_BLOB(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type BLOB is not supported")

def visit_CLOB(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type CBLOB is not supported")
return "COMPLEX"

def visit_NCLOB(self, type_, **kwargs):
raise exceptions.NotSupportedError("Type NCBLOB is not supported")
visit_CLOB = visit_BLOB
visit_NCLOB = visit_BLOB
visit_VARBINARY = visit_BLOB
visit_BINARY = visit_BLOB


class DruidDialect(default.DefaultDialect):
Expand Down

0 comments on commit a1d9b7e

Please sign in to comment.