Skip to content

Commit a1d9b7e

Browse files
Add BLOB and other types (#244)
* Add BLOB and other types * Remove unused import
1 parent f674b69 commit a1d9b7e

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

pydruid/db/sqlalchemy.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from sqlalchemy.sql import compiler
44

55
import pydruid.db
6-
from pydruid.db import exceptions
76

87
RESERVED_SCHEMAS = ["INFORMATION_SCHEMA"]
98

@@ -63,25 +62,18 @@ def visit_CHAR(self, type_, **kwargs):
6362
visit_TEXT = visit_CHAR
6463

6564
def visit_DATETIME(self, type_, **kwargs):
66-
raise exceptions.NotSupportedError("Type DATETIME is not supported")
65+
return "LONG"
6766

6867
def visit_TIME(self, type_, **kwargs):
69-
raise exceptions.NotSupportedError("Type TIME is not supported")
70-
71-
def visit_BINARY(self, type_, **kwargs):
72-
raise exceptions.NotSupportedError("Type BINARY is not supported")
73-
74-
def visit_VARBINARY(self, type_, **kwargs):
75-
raise exceptions.NotSupportedError("Type VARBINARY is not supported")
68+
return "LONG"
7669

7770
def visit_BLOB(self, type_, **kwargs):
78-
raise exceptions.NotSupportedError("Type BLOB is not supported")
79-
80-
def visit_CLOB(self, type_, **kwargs):
81-
raise exceptions.NotSupportedError("Type CBLOB is not supported")
71+
return "COMPLEX"
8272

83-
def visit_NCLOB(self, type_, **kwargs):
84-
raise exceptions.NotSupportedError("Type NCBLOB is not supported")
73+
visit_CLOB = visit_BLOB
74+
visit_NCLOB = visit_BLOB
75+
visit_VARBINARY = visit_BLOB
76+
visit_BINARY = visit_BLOB
8577

8678

8779
class DruidDialect(default.DefaultDialect):

0 commit comments

Comments
 (0)