Skip to content

importccl: don't diasable nullif option when escape character is spec…#42635

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
spaskob:job-txn
Nov 21, 2019
Merged

importccl: don't diasable nullif option when escape character is spec…#42635
craig[bot] merged 1 commit intocockroachdb:masterfrom
spaskob:job-txn

Conversation

@spaskob
Copy link
Copy Markdown
Contributor

@spaskob spaskob commented Nov 21, 2019

…ified

By default the string 'NULL' is parsed as null value in DELIMITED IMPORT mode.
It's usefull to treat 'NULL' as just a normal string and parse it verbatim;
this can be accomplished by providing option WITH fields_escaped_by = '\' and
using '\N' to specify null values and so in this case the parser upon seeing
the string 'NULL' will treat it as a normal string. However if the customer
provides their own null string via WITH nullif = 'my_null' it does not make
sense to disregard it if they use escaping as well for some other purposes,
for example escaping the field separator. A typical use case is when
the empty string should be treated as null.

Fixes: https://github.com/cockroachlabs/support/issues/345.

Release note (bug fix): when custom nullif is provided always treat it as null.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@madelynnblue madelynnblue left a comment

Choose a reason for hiding this comment

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

Can you fix the commit message? The markdown is missing a backtick and the issue number for the fix is wrong.

…ified

By default the string 'NULL' is parsed as null value in DELIMITED IMPORT mode.
It's usefull to treat 'NULL' as just a normal string and parse it verbatim;
this can be accomplished by providing option `WITH fields_escaped_by = '\'` and
using '\N' to specify null values and so in this case the parser upon seeing
the string 'NULL' will treat it as a normal string. However if the customer
provides their own null string via `WITH nullif = 'my_null'` it does not make
sense to disregard it if they use escaping as well for some other purposes,
for example escaping the field separator. A typical use case is when
the empty string should be treated as null.

Fixes: cockroachlabs/support#345.

Release note (bug fix): when custom nullif is provided always treat it as null.
@spaskob
Copy link
Copy Markdown
Contributor Author

spaskob commented Nov 21, 2019

Done

@spaskob
Copy link
Copy Markdown
Contributor Author

spaskob commented Nov 21, 2019

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 21, 2019

Build failed

@spaskob
Copy link
Copy Markdown
Contributor Author

spaskob commented Nov 21, 2019

bors r+

craig bot pushed a commit that referenced this pull request Nov 21, 2019
42635: importccl: don't diasable nullif option when escape character is spec… r=spaskob a=spaskob

…ified

By default the string 'NULL' is parsed as null value in DELIMITED IMPORT mode.
It's usefull to treat 'NULL' as just a normal string and parse it verbatim;
this can be accomplished by providing option `WITH fields_escaped_by = '\'` and
using '\N' to specify null values and so in this case the parser upon seeing
the string 'NULL' will treat it as a normal string. However if the customer
provides their own null string via `WITH nullif = 'my_null'` it does not make
sense to disregard it if they use escaping as well for some other purposes,
for example escaping the field separator. A typical use case is when
the empty string should be treated as null.

Fixes: https://github.com/cockroachlabs/support/issues/345.

Release note (bug fix): when custom nullif is provided always treat it as null.

Co-authored-by: Spas Bojanov <spas@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 21, 2019

Build failed

@spaskob
Copy link
Copy Markdown
Contributor Author

spaskob commented Nov 21, 2019

bors r+

craig bot pushed a commit that referenced this pull request Nov 21, 2019
42635: importccl: don't diasable nullif option when escape character is spec… r=spaskob a=spaskob

…ified

By default the string 'NULL' is parsed as null value in DELIMITED IMPORT mode.
It's usefull to treat 'NULL' as just a normal string and parse it verbatim;
this can be accomplished by providing option `WITH fields_escaped_by = '\'` and
using '\N' to specify null values and so in this case the parser upon seeing
the string 'NULL' will treat it as a normal string. However if the customer
provides their own null string via `WITH nullif = 'my_null'` it does not make
sense to disregard it if they use escaping as well for some other purposes,
for example escaping the field separator. A typical use case is when
the empty string should be treated as null.

Fixes: https://github.com/cockroachlabs/support/issues/345.

Release note (bug fix): when custom nullif is provided always treat it as null.

Co-authored-by: Spas Bojanov <spas@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 21, 2019

Build failed

@spaskob
Copy link
Copy Markdown
Contributor Author

spaskob commented Nov 21, 2019

bors r+

craig bot pushed a commit that referenced this pull request Nov 21, 2019
41806: docs/RFCs: draft RFC for protected timestamps r=nvanbenschoten a=ajwerner

This commit provides a draft RFC for a subsystem to protect values in spans
of data alive at specific timestamps from being garbage collected.

Release note: None

42053: changefeedccl: add scan boundaries based on change in set of columns r=danhhz a=aayushshah15

Currently, the changefeed poller detects a scan boundary when 
detects that the last version of a table descriptor has a 
mutation but the current version doesn't. In case of an `ALTER TABLE
DROP COLUMN` statement, the point at which this happens is the point
at which the schema change backfill completes. This is incorrect since 
the dropped column is logically dropped before this point.

This PR corrects this problem by instead checking that the last version of the descriptor has a mutation AND that the number of columns in the current table descriptor is different from the number of columns in the last table descriptor.

Fixes #41961

Release note (bug fix): Changefeeds now emit backfill row updates for
                            dropped column when the table descriptor drops
                            that column.

42494: storage: Implement teeing Engine to test/compare pebble and rocksdb r=itsbilal a=itsbilal

This change adds a new Engine implementation: TeePebbleRocksDB, as well
as associated objects (batch, snapshots, files, iterators). This engine
type spins up instances of both pebble and rocksdb under the hood, writes
to both of them in all write paths, and compares their outputs in the
read path. A panic is thrown if there's a mismatch.

This engine can be used in practice with `--storage-engine pebble+rocksdb`, or
the related env variable `COCKROACH_STORAGE_ENGINE` as in
`COCKROACH_STORAGE_ENGINE=pebble+rocksdb make test ...`.

Fixes #42381.

Release note: None

42635: importccl: don't diasable nullif option when escape character is spec… r=spaskob a=spaskob

…ified

By default the string 'NULL' is parsed as null value in DELIMITED IMPORT mode.
It's usefull to treat 'NULL' as just a normal string and parse it verbatim;
this can be accomplished by providing option `WITH fields_escaped_by = '\'` and
using '\N' to specify null values and so in this case the parser upon seeing
the string 'NULL' will treat it as a normal string. However if the customer
provides their own null string via `WITH nullif = 'my_null'` it does not make
sense to disregard it if they use escaping as well for some other purposes,
for example escaping the field separator. A typical use case is when
the empty string should be treated as null.

Fixes: https://github.com/cockroachlabs/support/issues/345.

Release note (bug fix): when custom nullif is provided always treat it as null.

Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com>
Co-authored-by: Aayush Shah <aayush.shah15@gmail.com>
Co-authored-by: Bilal Akhtar <bilal@cockroachlabs.com>
Co-authored-by: Spas Bojanov <spas@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 21, 2019

Build succeeded

@craig craig bot merged commit 1f84874 into cockroachdb:master Nov 21, 2019
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.

4 participants