br1ghtyang / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Querying metadata dataset Datatype for Record details does not return results #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Raman,

I tried this on the asterix code using trunk on google-code and 
hyracks-dev-next branch on 64 bit Ubuntu. Please take a look.

create dataverse test;
use dataverse test;
create type TestType as open {
id: int32,
name : string
}
create dataset(TestType) partitioned by key id;

Then from another web interface run the following queries, 

use dataverse Metadata;

for $l in dataset('Datatype')
let $x := $l.Derived
where $l.DatatypeName="TestType"
return $x.Record

Duration of all jobs: 0.0
Logical plan:

The above query fails and does not return details of the Record from the 
Datatype metadata dataset.

write [%0->$$6] -- |UNPARTITIONED|
  project ([$$6]) -- |UNPARTITIONED|
    assign [$$6] <- [function-call: asterix:field-access-by-name, Args:[%0->$$1, AString: {Record}]] -- |UNPARTITIONED|
      select (function-call: algebricks:eq, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {DatatypeName}], AString: {TestType}]) -- |UNPARTITIONED|
        assign [$$1] <- [function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {Derived}]] -- |UNPARTITIONED|
          unnest $$0 <- function-call: asterix:dataset, Args:[AString: {Datatype}] -- |UNPARTITIONED|
            empty-tuple-source -- |UNPARTITIONED|
Unsupported type UNION(NULL, open { Tag: STRING, IsAnonymous: BOOLEAN, 
EnumValues: UNION(NULL, [ STRING ]), Record: UNION(NULL, open { IsOpen: 
BOOLEAN, Fields: [ open { FieldName: STRING, FieldType: STRING } ] } ), Union: 
UNION(NULL, [ STRING ]), UnorderedList: UNION(NULL, STRING), OrderedList: 
UNION(NULL, STRING) } ) for field access expression: function-call: 
asterix:field-access-by-name, Args:[%0->$$1, AString: {Record}]

The query should have returned these Results, which it did not.

"Record": { "IsOpen": true, "Fields": [ { "FieldName": "id", "FieldType": 
"int32" }, { "FieldName": "name", "FieldType": "Field_name_in_TestType" } ] }

Regards
Khurram

Original issue reported on code.google.com by khfaraaz82 on 27 Mar 2012 at 1:49

GoogleCodeExporter commented 8 years ago
The same problem as reported above is also seen on

asterix_stabilization revision 68
hyracks_asterix_stabilization revision : 1316
on Ubuntu 64 bit platform

Input statements:

use dataverse Metadata;

for $l in dataset('Datatype')
let $x := $l.Derived
where $l.DatatypeName="TestType"
return $x.Record
Duration of all jobs: 0.0
Logical plan:

write [%0->$$6] -- |UNPARTITIONED|
  project ([$$6]) -- |UNPARTITIONED|
    assign [$$6] <- [function-call: asterix:field-access-by-name, Args:[%0->$$1, AString: {Record}]] -- |UNPARTITIONED|
      select (function-call: algebricks:eq, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {DatatypeName}], AString: {TestType}]) -- |UNPARTITIONED|
        assign [$$1] <- [function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {Derived}]] -- |UNPARTITIONED|
          unnest $$0 <- function-call: asterix:dataset, Args:[AString: {Datatype}] -- |UNPARTITIONED|
            empty-tuple-source -- |UNPARTITIONED|
Unsupported type UNION(NULL, open { Tag: STRING, IsAnonymous: BOOLEAN, 
EnumValues: UNION(NULL, [ STRING ]), Record: UNION(NULL, open { IsOpen: 
BOOLEAN, Fields: [ open { FieldName: STRING, FieldType: STRING } ] } ), Union: 
UNION(NULL, [ STRING ]), UnorderedList: UNION(NULL, STRING), OrderedList: 
UNION(NULL, STRING) } ) for field access expression: function-call: 
asterix:field-access-by-name, Args:[%0->$$1, AString: {Record}]

Original comment by khfaraaz82 on 27 Mar 2012 at 8:42

GoogleCodeExporter commented 8 years ago
Khurram,

Can you please post the results of:

for $l in dataset('Datatype')
return $l

Original comment by vinay...@gmail.com on 6 Apr 2012 at 11:05

GoogleCodeExporter commented 8 years ago
Here are the results of executing the query on hyracks_asterix_stabilization 
revision 1336 and asterix_stabilization revision 91.

use dataverse Metadata;

for $l in dataset('Datatype')
return $l

{ "DataverseName": "Metadata", "DatatypeName": "DatasetRecordType", "Derived": 
{ "Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, "Record": { 
"IsOpen": true, "Fields": [ { "FieldName": "DataverseName", "FieldType": 
"string" }, { "FieldName": "DatasetName", "FieldType": "string" }, { 
"FieldName": "DataTypeName", "FieldType": "string" }, { "FieldName": 
"DatasetType", "FieldType": "string" }, { "FieldName": "InternalDetails", 
"FieldType": "Field_InternalDetails_in_DatasetRecordType" }, { "FieldName": 
"ExternalDetails", "FieldType": "Field_ExternalDetails_in_DatasetRecordType" }, 
{ "FieldName": "FeedDetails", "FieldType": 
"Field_FeedDetails_in_DatasetRecordType" }, { "FieldName": "Timestamp", 
"FieldType": "string" } ] }, "Union": null, "UnorderedList": null, 
"OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "DatatypeRecordType", "Derived": 
{ "Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, "Record": { 
"IsOpen": true, "Fields": [ { "FieldName": "DataverseName", "FieldType": 
"string" }, { "FieldName": "DatatypeName", "FieldType": "string" }, { 
"FieldName": "Derived", "FieldType": "Field_Derived_in_DatatypeRecordType" }, { 
"FieldName": "Timestamp", "FieldType": "string" } ] }, "Union": null, 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "DataverseRecordType", 
"Derived": { "Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, 
"Record": { "IsOpen": true, "Fields": [ { "FieldName": "DataverseName", 
"FieldType": "string" }, { "FieldName": "DataFormat", "FieldType": "string" }, 
{ "FieldName": "Timestamp", "FieldType": "string" } ] }, "Union": null, 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Derived_in_DatatypeRecordType", "Derived": { "Tag": "UNION", 
"IsAnonymous": true, "EnumValues": null, "Record": null, "Union": [ "null", 
"Type_#1_UnionType_Field_Derived_in_DatatypeRecordType" ], "UnorderedList": 
null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_EnumValues_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType", 
"Derived": { "Tag": "UNION", "IsAnonymous": true, "EnumValues": null, "Record": 
null, "Union": [ "null", 
"Type_#1_UnionType_Field_EnumValues_in_Type_#1_UnionType_Field_Derived_in_Dataty
peRecordType" ], "UnorderedList": null, "OrderedList": null }, "Timestamp": 
"Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_ExternalDetails_in_DatasetRecordType", "Derived": { "Tag": "UNION", 
"IsAnonymous": true, "EnumValues": null, "Record": null, "Union": [ "null", 
"Type_#1_UnionType_Field_ExternalDetails_in_DatasetRecordType" ], 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_FeedDetails_in_DatasetRecordType", "Derived": { "Tag": "UNION", 
"IsAnonymous": true, "EnumValues": null, "Record": null, "Union": [ "null", 
"Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType" ], "UnorderedList": 
null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Fields_in_Type_#1_UnionType_Field_Record_in_Type_#1_UnionType_Field_Deriv
ed_in_DatatypeRecordType", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": 
true, "EnumValues": null, "Record": null, "Union": null, "UnorderedList": null, 
"OrderedList": 
"Field_Fields_in_Type_#1_UnionType_Field_Record_in_Type_#1_UnionType_Field_Deriv
ed_in_DatatypeRecordType_ItemType" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 
2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Fields_in_Type_#1_UnionType_Field_Record_in_Type_#1_UnionType_Field_Deriv
ed_in_DatatypeRecordType_ItemType", "Derived": { "Tag": "RECORD", 
"IsAnonymous": true, "EnumValues": null, "Record": { "IsOpen": true, "Fields": 
[ { "FieldName": "FieldName", "FieldType": "string" }, { "FieldName": 
"FieldType", "FieldType": "string" } ] }, "Union": null, "UnorderedList": null, 
"OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_FunctionParams_in_FunctionRecordType", "Derived": { "Tag": 
"ORDEREDLIST", "IsAnonymous": true, "EnumValues": null, "Record": null, 
"Union": null, "UnorderedList": null, "OrderedList": "string" }, "Timestamp": 
"Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_InternalDetails_in_DatasetRecordType", "Derived": { "Tag": "UNION", 
"IsAnonymous": true, "EnumValues": null, "Record": null, "Union": [ "null", 
"Type_#1_UnionType_Field_InternalDetails_in_DatasetRecordType" ], 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_NodeNames_in_NodeGroupRecordType", "Derived": { "Tag": "UNORDEREDLIST", 
"IsAnonymous": true, "EnumValues": null, "Record": null, "Union": null, 
"UnorderedList": "string", "OrderedList": null }, "Timestamp": "Fri Apr 06 
10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_OrderedList_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType", 
"Derived": { "Tag": "UNION", "IsAnonymous": true, "EnumValues": null, "Record": 
null, "Union": [ "null", "string" ], "UnorderedList": null, "OrderedList": null 
}, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_PartitioningKey_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordTy
pe", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": 
null, "Record": null, "Union": null, "UnorderedList": null, "OrderedList": 
"string" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_PartitioningKey_in_Type_#1_UnionType_Field_InternalDetails_in_DatasetReco
rdType", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": 
null, "Record": null, "Union": null, "UnorderedList": null, "OrderedList": 
"string" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_PrimaryKey_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType", 
"Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": null, 
"Record": null, "Union": null, "UnorderedList": null, "OrderedList": "string" 
}, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_PrimaryKey_in_Type_#1_UnionType_Field_InternalDetails_in_DatasetRecordTyp
e", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": null, 
"Record": null, "Union": null, "UnorderedList": null, "OrderedList": "string" 
}, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Properties_in_Type_#1_UnionType_Field_ExternalDetails_in_DatasetRecordTyp
e", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": null, 
"Record": null, "Union": null, "UnorderedList": null, "OrderedList": 
"Field_Properties_in_Type_#1_UnionType_Field_ExternalDetails_in_DatasetRecordTyp
e_ItemType" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Properties_in_Type_#1_UnionType_Field_ExternalDetails_in_DatasetRecordTyp
e_ItemType", "Derived": { "Tag": "RECORD", "IsAnonymous": true, "EnumValues": 
null, "Record": { "IsOpen": true, "Fields": [ { "FieldName": "Name", 
"FieldType": "string" }, { "FieldName": "Value", "FieldType": "string" } ] }, 
"Union": null, "UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri 
Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Properties_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType", 
"Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": null, 
"Record": null, "Union": null, "UnorderedList": null, "OrderedList": 
"Field_Properties_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType_It
emType" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Properties_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType_It
emType", "Derived": { "Tag": "RECORD", "IsAnonymous": true, "EnumValues": null, 
"Record": { "IsOpen": true, "Fields": [ { "FieldName": "Name", "FieldType": 
"string" }, { "FieldName": "Value", "FieldType": "string" } ] }, "Union": null, 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Record_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType", 
"Derived": { "Tag": "UNION", "IsAnonymous": true, "EnumValues": null, "Record": 
null, "Union": [ "null", 
"Type_#1_UnionType_Field_Record_in_Type_#1_UnionType_Field_Derived_in_DatatypeRe
cordType" ], "UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri 
Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_SearchKey_in_IndexRecordType", "Derived": { "Tag": "ORDEREDLIST", 
"IsAnonymous": true, "EnumValues": null, "Record": null, "Union": null, 
"UnorderedList": null, "OrderedList": "string" }, "Timestamp": "Fri Apr 06 
10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_Union_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType", 
"Derived": { "Tag": "UNION", "IsAnonymous": true, "EnumValues": null, "Record": 
null, "Union": [ "null", 
"Type_#1_UnionType_Field_Union_in_Type_#1_UnionType_Field_Derived_in_DatatypeRec
ordType" ], "UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 
06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Field_UnorderedList_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType", 
"Derived": { "Tag": "UNION", "IsAnonymous": true, "EnumValues": null, "Record": 
null, "Union": [ "null", "string" ], "UnorderedList": null, "OrderedList": null 
}, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "FunctionRecordType", "Derived": 
{ "Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, "Record": { 
"IsOpen": true, "Fields": [ { "FieldName": "DataverseName", "FieldType": 
"string" }, { "FieldName": "FunctionName", "FieldType": "string" }, { 
"FieldName": "FunctionArity", "FieldType": "string" }, { "FieldName": 
"FunctionParams", "FieldType": "Field_FunctionParams_in_FunctionRecordType" }, 
{ "FieldName": "FunctionBody", "FieldType": "string" } ] }, "Union": null, 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "IndexRecordType", "Derived": { 
"Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, "Record": { 
"IsOpen": true, "Fields": [ { "FieldName": "DataverseName", "FieldType": 
"string" }, { "FieldName": "DatasetName", "FieldType": "string" }, { 
"FieldName": "IndexName", "FieldType": "string" }, { "FieldName": 
"IndexStructure", "FieldType": "string" }, { "FieldName": "SearchKey", 
"FieldType": "Field_SearchKey_in_IndexRecordType" }, { "FieldName": 
"IsPrimary", "FieldType": "boolean" }, { "FieldName": "Timestamp", "FieldType": 
"string" } ] }, "Union": null, "UnorderedList": null, "OrderedList": null }, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "NodeGroupRecordType", 
"Derived": { "Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, 
"Record": { "IsOpen": true, "Fields": [ { "FieldName": "GroupName", 
"FieldType": "string" }, { "FieldName": "NodeNames", "FieldType": 
"Field_NodeNames_in_NodeGroupRecordType" }, { "FieldName": "Timestamp", 
"FieldType": "string" } ] }, "Union": null, "UnorderedList": null, 
"OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "NodeRecordType", "Derived": { 
"Tag": "RECORD", "IsAnonymous": false, "EnumValues": null, "Record": { 
"IsOpen": true, "Fields": [ { "FieldName": "NodeName", "FieldType": "string" }, 
{ "FieldName": "NumberOfCores", "FieldType": "int32" }, { "FieldName": 
"WorkingMemorySize", "FieldType": "int32" } ] }, "Union": null, 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_Derived_in_DatatypeRecordType", "Derived": { "Tag": 
"RECORD", "IsAnonymous": true, "EnumValues": null, "Record": { "IsOpen": true, 
"Fields": [ { "FieldName": "Tag", "FieldType": "string" }, { "FieldName": 
"IsAnonymous", "FieldType": "boolean" }, { "FieldName": "EnumValues", 
"FieldType": 
"Field_EnumValues_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType" }, 
{ "FieldName": "Record", "FieldType": 
"Field_Record_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType" }, { 
"FieldName": "Union", "FieldType": 
"Field_Union_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType" }, { 
"FieldName": "UnorderedList", "FieldType": 
"Field_UnorderedList_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType" 
}, { "FieldName": "OrderedList", "FieldType": 
"Field_OrderedList_in_Type_#1_UnionType_Field_Derived_in_DatatypeRecordType" } 
] }, "Union": null, "UnorderedList": null, "OrderedList": null }, "Timestamp": 
"Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_EnumValues_in_Type_#1_UnionType_Field_Derived_in_Dataty
peRecordType", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, 
"EnumValues": null, "Record": null, "Union": null, "UnorderedList": null, 
"OrderedList": "string" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_ExternalDetails_in_DatasetRecordType", "Derived": { 
"Tag": "RECORD", "IsAnonymous": true, "EnumValues": null, "Record": { "IsOpen": 
true, "Fields": [ { "FieldName": "Adapter", "FieldType": "string" }, { 
"FieldName": "Properties", "FieldType": 
"Field_Properties_in_Type_#1_UnionType_Field_ExternalDetails_in_DatasetRecordTyp
e" } ] }, "Union": null, "UnorderedList": null, "OrderedList": null }, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType", "Derived": { "Tag": 
"RECORD", "IsAnonymous": true, "EnumValues": null, "Record": { "IsOpen": true, 
"Fields": [ { "FieldName": "FileStructure", "FieldType": "string" }, { 
"FieldName": "PartitioningStrategy", "FieldType": "string" }, { "FieldName": 
"PartitioningKey", "FieldType": 
"Field_PartitioningKey_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordTy
pe" }, { "FieldName": "PrimaryKey", "FieldType": 
"Field_PrimaryKey_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType" 
}, { "FieldName": "GroupName", "FieldType": "string" }, { "FieldName": 
"Adapter", "FieldType": "string" }, { "FieldName": "Properties", "FieldType": 
"Field_Properties_in_Type_#1_UnionType_Field_FeedDetails_in_DatasetRecordType" 
}, { "FieldName": "Function", "FieldType": "string" }, { "FieldName": "Status", 
"FieldType": "string" } ] }, "Union": null, "UnorderedList": null, 
"OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_InternalDetails_in_DatasetRecordType", "Derived": { 
"Tag": "RECORD", "IsAnonymous": true, "EnumValues": null, "Record": { "IsOpen": 
true, "Fields": [ { "FieldName": "FileStructure", "FieldType": "string" }, { 
"FieldName": "PartitioningStrategy", "FieldType": "string" }, { "FieldName": 
"PartitioningKey", "FieldType": 
"Field_PartitioningKey_in_Type_#1_UnionType_Field_InternalDetails_in_DatasetReco
rdType" }, { "FieldName": "PrimaryKey", "FieldType": 
"Field_PrimaryKey_in_Type_#1_UnionType_Field_InternalDetails_in_DatasetRecordTyp
e" }, { "FieldName": "GroupName", "FieldType": "string" } ] }, "Union": null, 
"UnorderedList": null, "OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 
PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_Record_in_Type_#1_UnionType_Field_Derived_in_DatatypeRe
cordType", "Derived": { "Tag": "RECORD", "IsAnonymous": true, "EnumValues": 
null, "Record": { "IsOpen": true, "Fields": [ { "FieldName": "IsOpen", 
"FieldType": "boolean" }, { "FieldName": "Fields", "FieldType": 
"Field_Fields_in_Type_#1_UnionType_Field_Record_in_Type_#1_UnionType_Field_Deriv
ed_in_DatatypeRecordType" } ] }, "Union": null, "UnorderedList": null, 
"OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": 
"Type_#1_UnionType_Field_Union_in_Type_#1_UnionType_Field_Derived_in_DatatypeRec
ordType", "Derived": { "Tag": "ORDEREDLIST", "IsAnonymous": true, "EnumValues": 
null, "Record": null, "Union": null, "UnorderedList": null, "OrderedList": 
"string" }, "Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "boolean", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "circle", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "date", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "datetime", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "double", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "duration", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "float", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "int16", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "int32", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "int64", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "int8", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "line", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "null", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "point", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "point3d", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "polygon", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "rectangle", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "string", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "Metadata", "DatatypeName": "time", "Derived": null, 
"Timestamp": "Fri Apr 06 10:48:23 PDT 2012" }
{ "DataverseName": "test", "DatatypeName": "TestType", "Derived": { "Tag": 
"RECORD", "IsAnonymous": false, "EnumValues": null, "Record": { "IsOpen": true, 
"Fields": [ { "FieldName": "id", "FieldType": "int32" }, { "FieldName": "name", 
"FieldType": "string" } ] }, "Union": null, "UnorderedList": null, 
"OrderedList": null }, "Timestamp": "Fri Apr 06 10:48:44 PDT 2012" }

Original comment by khfaraaz82 on 7 Apr 2012 at 12:43

GoogleCodeExporter commented 8 years ago
An update for this issue, I tried the same test on asterix-stabilization 
(Revision: 135) branch using hyracks_asterix_stabilization (Revision: 1368) 
branches and here are the results. However, please note there are no 
errors/Exceptions written to the CC/NC logs.

drop dataverse test if exists;

create dataverse test;

use dataverse test;

create type TestType as open {
id : int32,
name : string
}

create dataset testds(TestType) partitioned by key id;

Then from another UI session, do this.

use dataverse Metadata;

for $l in dataset('Datatype')
let $x := $l.Derived
where $l.DatatypeName="TestType"
return $x.Record
Duration of all jobs: 0.0
Logical plan:

write [%0->$$6] -- |UNPARTITIONED|
  project ([$$6]) -- |UNPARTITIONED|
    assign [$$6] <- [function-call: asterix:field-access-by-name, Args:[%0->$$1, AString: {Record}]] -- |UNPARTITIONED|
      select (function-call: algebricks:eq, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {DatatypeName}], AString: {TestType}]) -- |UNPARTITIONED|
        assign [$$1] <- [function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {Derived}]] -- |UNPARTITIONED|
          unnest $$0 <- function-call: asterix:dataset, Args:[AString: {Datatype}] -- |UNPARTITIONED|
            empty-tuple-source -- |UNPARTITIONED|

Unsupported type UNION(NULL, open { Tag: STRING, IsAnonymous: BOOLEAN, 
EnumValues: UNION(NULL, [ STRING ]), Record: UNION(NULL, open { IsOpen: 
BOOLEAN, Fields: [ open { FieldName: STRING, FieldType: STRING } ] } ), Union: 
UNION(NULL, [ STRING ]), UnorderedList: UNION(NULL, STRING), OrderedList: 
UNION(NULL, STRING) } ) for field access expression: function-call: 
asterix:field-access-by-name, Args:[%0->$$1, AString: {Record}]

Original comment by khfaraaz82 on 26 Apr 2012 at 6:24

GoogleCodeExporter commented 8 years ago

Original comment by khfaraaz82 on 4 May 2012 at 10:01

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r366.

Original comment by khfaraaz82 on 7 Jun 2012 at 1:55

GoogleCodeExporter commented 8 years ago
It was an issue of object equality vs. type tag equality when checking for 
nullability of a field. The issue only surfaced when running in multiple VMs 
(i.e., in JUnit the issue was not reproducible).
I didn't add any new tests because we cannot repro in JUnit.

Original comment by khfaraaz82 on 7 Jun 2012 at 1:58