public static class LogicalSchema.LogicalFieldSchema extends Object
Modifier and Type | Field and Description |
---|---|
String |
alias |
LogicalSchema |
schema |
byte |
type |
long |
uid |
Constructor and Description |
---|
LogicalSchema.LogicalFieldSchema(LogicalSchema.LogicalFieldSchema fs) |
LogicalSchema.LogicalFieldSchema(String alias,
LogicalSchema schema,
byte type) |
LogicalSchema.LogicalFieldSchema(String alias,
LogicalSchema schema,
byte type,
long uid) |
Modifier and Type | Method and Description |
---|---|
static boolean |
castable(LogicalSchema.LogicalFieldSchema inFs,
LogicalSchema.LogicalFieldSchema outFs)
Check if FieldSchema inFs is castable to outFs
|
LogicalSchema.LogicalFieldSchema |
cloneUid() |
LogicalSchema.LogicalFieldSchema |
deepCopy() |
static boolean |
equals(LogicalSchema.LogicalFieldSchema fschema,
LogicalSchema.LogicalFieldSchema fother,
boolean relaxInner,
boolean relaxAlias)
Compare two field schema for equality
|
boolean |
isEqual(Object other)
Equality is defined as having the same type and either the same schema
or both null schema.
|
boolean |
isEqual(Object other,
boolean compareAlias)
Equality is defined as having the same type and either the same schema
or both null schema.
|
static boolean |
isEqualUnlessUnknown(LogicalSchema.LogicalFieldSchema fs1,
LogicalSchema.LogicalFieldSchema fs2) |
static LogicalSchema.LogicalFieldSchema |
merge(LogicalSchema.LogicalFieldSchema fs1,
LogicalSchema.LogicalFieldSchema fs2,
LogicalSchema.MergeMode mode)
Merge two LogicalFieldSchema, the behavior of merge depends on mode.
|
LogicalSchema.LogicalFieldSchema |
mergeUid(LogicalSchema.LogicalFieldSchema uidOnlyFieldSchema)
Adds the uid from FieldSchema argument to this FieldSchema
If the argument is null, it stamps this FieldSchema with uid
|
void |
normalize()
Old Pig field schema does not require a tuple schema inside a bag;
Now it is required to have that; this method is to fill the gap
|
void |
resetUid()
Rest uid of this fieldschema and inner schema
|
void |
stampFieldSchema()
Give new value for uid if uid of field schema or those in fields schema
of inner schema are -1.
|
String |
toString() |
String |
toString(boolean verbose) |
public String alias
public byte type
public long uid
public LogicalSchema schema
public LogicalSchema.LogicalFieldSchema(String alias, LogicalSchema schema, byte type)
public LogicalSchema.LogicalFieldSchema(LogicalSchema.LogicalFieldSchema fs)
public LogicalSchema.LogicalFieldSchema(String alias, LogicalSchema schema, byte type, long uid)
public boolean isEqual(Object other)
public boolean isEqual(Object other, boolean compareAlias)
other
- compareAlias
- public String toString(boolean verbose)
public void stampFieldSchema()
public LogicalSchema.LogicalFieldSchema mergeUid(LogicalSchema.LogicalFieldSchema uidOnlyFieldSchema) throws FrontendException
uidOnlyFieldSchema
- FrontendException
public void resetUid()
public LogicalSchema.LogicalFieldSchema cloneUid()
public LogicalSchema.LogicalFieldSchema deepCopy()
public static boolean equals(LogicalSchema.LogicalFieldSchema fschema, LogicalSchema.LogicalFieldSchema fother, boolean relaxInner, boolean relaxAlias)
relaxInner
- If true, we don't check inner tuple schemasrelaxAlias
- If true, we don't check aliasespublic static boolean castable(LogicalSchema.LogicalFieldSchema inFs, LogicalSchema.LogicalFieldSchema outFs)
inFs
- outFs
- public static LogicalSchema.LogicalFieldSchema merge(LogicalSchema.LogicalFieldSchema fs1, LogicalSchema.LogicalFieldSchema fs2, LogicalSchema.MergeMode mode) throws FrontendException
fs1
- In Load/Foreach, fs1 is user declared schema; in Union, fs1 is left sidefs2
- In Load/Foreach, fs1 is inferred schema; in Union, fs1 is left sidemode
- merge modeFrontendException
public static boolean isEqualUnlessUnknown(LogicalSchema.LogicalFieldSchema fs1, LogicalSchema.LogicalFieldSchema fs2) throws FrontendException
FrontendException
public void normalize()
Copyright © 2007-2012 The Apache Software Foundation