Skip to content

Commit

Permalink
Support SingleStore metadata ingestion (JSON type fields) (open-metad…
Browse files Browse the repository at this point in the history
…ata#12623)

* Support SingleStore metadata ingestion (JSON type fields)

* Removing Collate Keyword all datatypes

---------

Co-authored-by: Vanshika Kabra <[email protected]>
Co-authored-by: Mayur Singal <[email protected]>
  • Loading branch information
3 people authored Jul 29, 2023
1 parent 786dde1 commit a0dd821
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def parse_column(self, line, state):
name, type_, args = spec["name"], spec["coltype"], spec["arg"]

try:
col_type = self.dialect.ischema_names[type_]
col_type = self.dialect.ischema_names[type_.lower()]
except KeyError:
util.warn(f"Did not recognize type '{type_}' of column '{name}'")
col_type = sqltypes.NullType
Expand All @@ -88,9 +88,9 @@ def parse_column(self, line, state):
for ikw in ("unsigned", "zerofill"):
if spec.get(ikw, False):
type_kw[ikw] = True
for ikw in ("charset", "collate"):
if spec.get(ikw, False):
type_kw[ikw] = spec[ikw]
if spec.get("charset", False):
type_kw["charset"] = spec["charset"]

if issubclass(col_type, (ENUM, SET)):
type_args = _strip_values(type_args)

Expand Down

0 comments on commit a0dd821

Please sign in to comment.