Skip to content

Nested with null values, number type, and integer instead of INT #2

@b-rockx

Description

@b-rockx

Error while compiling statement: FAILED: ParseException line 3:2 mismatched input 'mapInfo' expecting ) near 'STRING' in create table statement

Below you can see that the statement has a few issues.

  1. Missing commas
  2. Displaying NULLs. Maybe we could have NULLs set as STRING through an option
  3. INTEGER instead of INT
  4. NUMBER instead of INT

`CREATE TABLE test(
macAddress STRING
mapInfo STRUCT<
mapHierarchyDetails: STRUCT<
campus: NULL,
building: NULL,
floor: NULL,
floorAesUid: INTEGER,
zones: NULL
>

mapCoordinate STRUCT<
x: NUMBER,
y: NUMBER,
z: NUMBER,
unit: STRING

currentlyTracked BOOLEAN
confidenceFactor NUMBER
locComputeType STRING
statistics STRUCT<
currentServerTime: STRING,
firstLocatedTime: STRING,
lastLocatedTime: STRING

historyLogReason NULL
geoCoordinate NULL
rawLocation NULL
networkStatus STRING
changedOn INTEGER
ipAddress ARRAY
userName STRING
ssId STRING
sourceTimestamp STRING
band STRING
apMacAddress STRING
dot11Status STRING
manufacturer STRING
areaGlobalIdList NULL
detectingControllers STRING
bytesSent INTEGER
bytesReceived INTEGER
guestUser BOOLEAN
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe';`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions