Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Vertica support in scalding-db #1655

Merged
merged 3 commits into from
Mar 24, 2017

Conversation

alambert
Copy link
Contributor

(AITOOLS-4225, ADI-2692)

I've been attempting to read data from Vertica using scalding-db. I've found that a few of Vertica's type names differ slightly from MySQL's type names, but other than that scalding-db has worked.

This pull request widens the set of mapped type names. It includes unit tests to verify the new type names are accepted. I've tested this with a simple exporter for a Vertica table containing date, varchar, and integer columns.

Copy link
Collaborator

@johnynek johnynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

val typeName = q"""
val $typeNameTerm = $rsmdTerm.getColumnTypeName(${pos + 1})
val $typeNameTerm = $rsmdTerm.getColumnTypeName(${pos + 1}).toUpperCase(java.util.Locale.US)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by this. Can you comment how this works for Vertica if it expects non upper cased?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. It's matched in the case matching below.

@benpence benpence merged commit 708b5e7 into twitter:develop Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants