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

Handling of deep lists during decode with schema #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

magsv
Copy link
Contributor

@magsv magsv commented Feb 11, 2015

Added fix for handling decode of deep lists based on parsing of incoming schema

magnus added 2 commits January 27, 2015 19:02
…vro_array record and a list of avro_records
… the count was not taking into account that is was a deep list and hence the block count output in avro was wrong
@ates
Copy link
Member

ates commented Feb 21, 2015

Could you please provide a test case or how to reproduce that?

@magsv
Copy link
Contributor Author

magsv commented Mar 15, 2015

Sorry for the late reply... See that there are also similar issues when compiling the schemas haven't looked into it fully yet as I in addition neew to work on flattening of some of the schemas and remove any custom types that have been included. Starting to think that is rather the upfront jason parsing that is the issue as I see similar issues during compile time with some schemas. Below the schema that I believe I had an issue with

{
"type" : "record",
"name" : "RequestSession",
"namespace" : "Energistics.Protocol.Core",
"fields" : [ {
"name" : "requestedProtocols",
"type" : {
"type" : "array",
"items" : {
"type" : "record",
"name" : "SupportedProtocol",
"namespace" : "Energistics.Datatypes",
"fields" : [ {
"name" : "protocol",
"type" : "int"
}, {
"name" : "protocolVersion",
"type" : {
"type" : "record",
"name" : "Version",
"fields" : [ {
"name" : "major",
"type" : "int"
}, {
"name" : "minor",
"type" : "int"
}, {
"name" : "revision",
"type" : "int"
}, {
"name" : "patch",
"type" : "int"
} ],
"fullName" : "Energistics.Datatypes.Version",
"depends" : [ ]
}
}, {
"name" : "role",
"type" : "string"
}, {
"name" : "protocolCapabilities",
"type" : {
"type" : "map",
"values" : {
"type" : "record",
"name" : "DataValue",
"fields" : [ {
"name" : "item",
"type" : [ "null", "double", "float", "int", "long", "string", {
"type" : "record",
"name" : "DateTime",
"fields" : [ {
"name" : "time",
"type" : "long"
}, {
"name" : "offset",
"type" : "float"
} ],
"fullName" : "Energistics.Datatypes.DateTime",
"depends" : [ ],
"aliases" : [ "etp.dt" ]
}, {
"type" : "record",
"name" : "ArrayOfDouble",
"fields" : [ {
"name" : "values",
"type" : {
"type" : "array",
"items" : "double"
}
} ],
"fullName" : "Energistics.Datatypes.ArrayOfDouble",
"depends" : [ ]
}, "boolean" ]
} ],
"fullName" : "Energistics.Datatypes.DataValue",
"depends" : [ "Energistics.Datatypes.DateTime", "Energistics.Datatypes.ArrayOfDouble" ]
}
}
} ],
"fullName" : "Energistics.Datatypes.SupportedProtocol",
"depends" : [ "Energistics.Datatypes.Version", "Energistics.Datatypes.DataValue" ]
}
}
}, {
"name" : "applicationName",
"type" : "string"
} ],
"messageType" : "1",
"protocol" : "0",
"fullName" : "Energistics.Protocol.Core.RequestSession",
"depends" : [ "Energistics.Datatypes.SupportedProtocol" ]
}

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.

2 participants