Skip to content

Handle nulls in fixture tables using setNull to fix Teradata failures#322

Merged
benilovj merged 1 commit intomasterfrom
handle-nulls-in-teradata-fixture-tables
Jun 16, 2014
Merged

Handle nulls in fixture tables using setNull to fix Teradata failures#322
benilovj merged 1 commit intomasterfrom
handle-nulls-in-teradata-fixture-tables

Conversation

@MMatten
Copy link
Copy Markdown
Contributor

@MMatten MMatten commented Jun 13, 2014

This change fixes some of the null handing issues with the Teradata adapter.

This also allows us to use the CoreTests suite as there are no null parameters (set via Set Parameter) used.

Partially resolves #318.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The general convention is to use {} braces in if/else statements.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, I guess that's safer to always use them. Will update.

@MMatten
Copy link
Copy Markdown
Contributor Author

MMatten commented Jun 15, 2014

Style changed applied.

I've updated the comments too. Is this too much, or just right?

@javornikolov
Copy link
Copy Markdown
Contributor

I've updated the comments too. Is this too much, or just right?

I think it's a bit too much now (previous comment was enough). Also - changing the comment is not quite in sync with the title of the last commit.

@MMatten
Copy link
Copy Markdown
Contributor Author

MMatten commented Jun 15, 2014

Ok. I'll update.

What I was hinting at was that also we can't use setObject(index, obj, sqlType, lengthOrPrecision) (http://docs.oracle.com/javase/7/docs/api/java/sql/PreparedStatement.html#setObject(int,%20java.lang.Object,%20int,%20int))

But the comments might be confusing. I'll update it to the first original text.

@javornikolov
Copy link
Copy Markdown
Contributor

Basically - setObject without extra args is simpler that the other overrides with extra args. So I suppose that's why we prefer it instead of other longer options.

@MMatten
Copy link
Copy Markdown
Contributor Author

MMatten commented Jun 15, 2014

Updated.

I've reused the commit comment from the first commit as the title and added sub text.

Do you chaps have any standards for commit comments?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@javornikolov
Copy link
Copy Markdown
Contributor

Do you chaps have any standards for commit comments?

No hard standard right now but the message should describe the change in the commit. E.g. it should help to understand what's going on when you look at https://github.com/dbfit/dbfit/pull/322/commits

@javornikolov
Copy link
Copy Markdown
Contributor

Since most commits after 1st one here are not something new but are fix-ups on top of the initial one: it's good to squash them in single commit.

http://git-scm.com/book/en/Git-Tools-Rewriting-History

@javornikolov
Copy link
Copy Markdown
Contributor

Since most commits after 1st one here are not something new but are fix-ups on top of the initial one: it's good to squash them in single commit.

http://git-scm.com/book/en/Git-Tools-Rewriting-History

Besides that, looks good to me.

@MMatten
Copy link
Copy Markdown
Contributor Author

MMatten commented Jun 15, 2014

Since most commits after 1st one here are not something new but are fix-ups on top of the initial one: it's good to squash them in single commit.

I've tied git rebase -i HEAD~3 then selected fixup for the last 2 commits. The git status tells me:

Your branch and 'origin/handle-nulls-in-teradata-fixture-tables' have diverged, and have 1 and 3 different commits each, respectively.

I can't git push because:

! [rejected] handle-nulls-in-teradata-fixture-tables -> handle-nulls-in-teradata-fixture-tables (non-fast-forward)
error: failed to push some refs to 'https://github.com/dbfit/dbfit.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.

And if I git pull then the commits from origin get re-added to my commit history.

Can I still rebase now I've pushed the first 3 commits?

@javornikolov
Copy link
Copy Markdown
Contributor

I think your rebase was OK. But after that, since it indeed rewrites history, the way to push is via --force option.

@MMatten
Copy link
Copy Markdown
Contributor Author

MMatten commented Jun 15, 2014

Right, I think I've finally got it right.

@javornikolov
Copy link
Copy Markdown
Contributor

👍

benilovj added a commit that referenced this pull request Jun 16, 2014
…ables

Handle nulls in fixture tables using setNull to fix Teradata failures
@benilovj benilovj merged commit 71417c9 into master Jun 16, 2014
@benilovj benilovj deleted the handle-nulls-in-teradata-fixture-tables branch June 16, 2014 17:23
@benilovj benilovj added this to the Next Release milestone Jun 16, 2014
This was referenced Sep 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teradata adapter fails to handle NULL

3 participants