Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
5b413d3d
Commit
5b413d3d
authored
Jan 29, 2015
by
Harish Butani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add defineQueryResultType function to TypSystem
parent
06ade6c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
TypeSystem.java
...ain/java/org/apache/hadoop/metadata/types/TypeSystem.java
+19
-0
No files found.
typesystem/src/main/java/org/apache/hadoop/metadata/types/TypeSystem.java
View file @
5b413d3d
...
...
@@ -112,6 +112,25 @@ public class TypeSystem {
return
getDataType
(
StructType
.
class
,
structDef
.
typeName
);
}
/**
* construct a temporary StructType for a Query Result. This is not registered in the typeSystem.
* The attributes in the typeDefinition can only reference permanent types.
* @param name
* @param attrDefs
* @return
* @throws MetadataException
*/
public
StructType
defineQueryResultType
(
String
name
,
AttributeDefinition
...
attrDefs
)
throws
MetadataException
{
AttributeInfo
[]
infos
=
new
AttributeInfo
[
attrDefs
.
length
];
for
(
int
i
=
0
;
i
<
attrDefs
.
length
;
i
++)
{
infos
[
i
]
=
new
AttributeInfo
(
this
,
attrDefs
[
i
]);
}
StructType
type
=
new
StructType
(
TypeSystem
.
this
,
name
,
null
,
infos
);
return
type
;
}
public
TraitType
defineTraitType
(
HierarchicalTypeDefinition
<
TraitType
>
traitDef
)
throws
MetadataException
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment