Skip to content

Commit

Permalink
Update readme file (fixing variable name)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yair Levi committed Nov 15, 2017
1 parent 79f7453 commit 3c16364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -305,15 +305,15 @@ CREATE EXTERNAL TABLE tableWithNull
'structMissingCol' STRUCT<name : STRING> 'structMissingCol' STRUCT<name : STRING>
) )
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe' ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES ("explicit.null.value" = "true"); WITH SERDEPROPERTIES ("explicit.null" = "true");
-- JSON string: {\"stringCol\":"blabla",\"stringNullCol\":null,\"structCol\":{\"name\":\"myName\"},\"structNullCol\":{\"name\":null}} -- JSON string: {\"stringCol\":"blabla",\"stringNullCol\":null,\"structCol\":{\"name\":\"myName\"},\"structNullCol\":{\"name\":null}}
LOAD DATA LOCAL INPATH 'pathToJsonFile.json' OVERWRITE INTO TABLE tableWithNull; LOAD DATA LOCAL INPATH 'pathToJsonFile.json' OVERWRITE INTO TABLE tableWithNull;
-- The output when ("explicit.null.value" = "true"): -- The output when ("explicit.null" = "true"):
-- {\"stringCol\":"blabla",\"stringNullCol\":null,\"stringMissingCol\":null,\"structCol\":{\"name\":\"myName\"},\"structNullCol\":{\"name\":null},\"structMissingCol\":null} -- {\"stringCol\":"blabla",\"stringNullCol\":null,\"stringMissingCol\":null,\"structCol\":{\"name\":\"myName\"},\"structNullCol\":{\"name\":null},\"structMissingCol\":null}
-- The default output or when ("explicit.null.value" = "false"): -- The default output or when ("explicit.null" = "false"):
-- {\"stringCol\":"blabla",\"structCol\":{\"name\":\"myName\"},\"structNullCol\":{}} -- {\"stringCol\":"blabla",\"structCol\":{\"name\":\"myName\"},\"structNullCol\":{}}
``` ```


Expand Down
Expand Up @@ -661,7 +661,7 @@ public void testExplicitNullValue() throws SerDeException, IOException {
tbl.setProperty(serdeConstants.LIST_COLUMNS, "stringCol,nullCol,missingCol"); tbl.setProperty(serdeConstants.LIST_COLUMNS, "stringCol,nullCol,missingCol");
tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string,string,string"); tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "string,string,string");


// Set 'explicit.null.value' to true // Set 'explicit.null' to true
tbl.setProperty(JsonSerDe.PROP_EXPLICIT_NULL, "true"); tbl.setProperty(JsonSerDe.PROP_EXPLICIT_NULL, "true");


serde.initialize(conf, tbl); serde.initialize(conf, tbl);
Expand All @@ -688,7 +688,7 @@ public void testNestedExplicitNullValue() throws SerDeException, IOException {
tbl.setProperty(serdeConstants.LIST_COLUMNS, "structCol,structNullCol,missingStructCol"); tbl.setProperty(serdeConstants.LIST_COLUMNS, "structCol,structNullCol,missingStructCol");
tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "struct<name:string>,struct<name:string>,struct<name:string>"); tbl.setProperty(serdeConstants.LIST_COLUMN_TYPES, "struct<name:string>,struct<name:string>,struct<name:string>");


// Set 'explicit.null.value' to true // Set 'explicit.null' to true
tbl.setProperty(JsonSerDe.PROP_EXPLICIT_NULL, "true"); tbl.setProperty(JsonSerDe.PROP_EXPLICIT_NULL, "true");


serde.initialize(conf, tbl); serde.initialize(conf, tbl);
Expand Down

0 comments on commit 3c16364

Please sign in to comment.