org.apache.flink.table.expressions.Attribute Java Examples

The following examples show how to use org.apache.flink.table.expressions.Attribute. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OrcTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private String getColumnName(BinaryComparison comp) {
	if (literalOnRight(comp)) {
		return ((Attribute) comp.left()).name();
	} else {
		return ((Attribute) comp.right()).name();
	}
}
 
Example #2
Source File: OrcTableSource.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private boolean literalOnRight(BinaryComparison comp) {
	if (comp.left() instanceof Literal && comp.right() instanceof Attribute) {
		return false;
	} else if (comp.left() instanceof Attribute && comp.right() instanceof Literal) {
		return true;
	} else {
		throw new RuntimeException("Invalid binary comparison.");
	}
}
 
Example #3
Source File: OrcTableSource.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private String getColumnName(BinaryComparison comp) {
	if (literalOnRight(comp)) {
		return ((Attribute) comp.left()).name();
	} else {
		return ((Attribute) comp.right()).name();
	}
}
 
Example #4
Source File: OrcTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private boolean literalOnRight(BinaryComparison comp) {
	if (comp.left() instanceof Literal && comp.right() instanceof Attribute) {
		return false;
	} else if (comp.left() instanceof Attribute && comp.right() instanceof Literal) {
		return true;
	} else {
		throw new RuntimeException("Invalid binary comparison.");
	}
}
 
Example #5
Source File: OrcTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private boolean literalOnRight(BinaryComparison comp) {
	if (comp.left() instanceof Literal && comp.right() instanceof Attribute) {
		return false;
	} else if (comp.left() instanceof Attribute && comp.right() instanceof Literal) {
		return true;
	} else {
		throw new RuntimeException("Invalid binary comparison.");
	}
}
 
Example #6
Source File: OrcTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private String getColumnName(BinaryComparison comp) {
	if (literalOnRight(comp)) {
		return ((Attribute) comp.left()).name();
	} else {
		return ((Attribute) comp.right()).name();
	}
}
 
Example #7
Source File: ParquetTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private String getColumnName(BinaryComparison comp) {
	if (literalOnRight(comp)) {
		return ((Attribute) comp.left()).name();
	} else {
		return ((Attribute) comp.right()).name();
	}
}
 
Example #8
Source File: ParquetTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private boolean literalOnRight(BinaryComparison comp) {
	if (comp.left() instanceof Literal && comp.right() instanceof Attribute) {
		return false;
	} else if (comp.left() instanceof Attribute && comp.right() instanceof Literal) {
		return true;
	} else {
		throw new RuntimeException("Invalid binary comparison.");
	}
}
 
Example #9
Source File: ParquetTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private String getColumnName(BinaryComparison comp) {
	if (literalOnRight(comp)) {
		return ((Attribute) comp.left()).name();
	} else {
		return ((Attribute) comp.right()).name();
	}
}
 
Example #10
Source File: ParquetTableSource.java    From flink with Apache License 2.0 5 votes vote down vote up
private boolean literalOnRight(BinaryComparison comp) {
	if (comp.left() instanceof Literal && comp.right() instanceof Attribute) {
		return false;
	} else if (comp.left() instanceof Attribute && comp.right() instanceof Literal) {
		return true;
	} else {
		throw new RuntimeException("Invalid binary comparison.");
	}
}
 
Example #11
Source File: ParquetTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private boolean isValid(BinaryComparison comp) {
	return (comp.left() instanceof Literal && comp.right() instanceof Attribute) ||
		(comp.left() instanceof Attribute && comp.right() instanceof Literal);
}
 
Example #12
Source File: OrcTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private String getColumnName(UnaryExpression unary) {
	return ((Attribute) unary.child()).name();
}
 
Example #13
Source File: OrcTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private boolean isValid(BinaryComparison comp) {
	return (comp.left() instanceof Literal && comp.right() instanceof Attribute) ||
		(comp.left() instanceof Attribute && comp.right() instanceof Literal);
}
 
Example #14
Source File: OrcTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private boolean isValid(UnaryExpression unary) {
	return unary.child() instanceof Attribute;
}
 
Example #15
Source File: ParquetTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private boolean isValid(BinaryComparison comp) {
	return (comp.left() instanceof Literal && comp.right() instanceof Attribute) ||
		(comp.left() instanceof Attribute && comp.right() instanceof Literal);
}
 
Example #16
Source File: OrcTableSource.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private boolean isValid(UnaryExpression unary) {
	return unary.child() instanceof Attribute;
}
 
Example #17
Source File: OrcTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private String getColumnName(UnaryExpression unary) {
	return ((Attribute) unary.child()).name();
}
 
Example #18
Source File: OrcTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private boolean isValid(BinaryComparison comp) {
	return (comp.left() instanceof Literal && comp.right() instanceof Attribute) ||
		(comp.left() instanceof Attribute && comp.right() instanceof Literal);
}
 
Example #19
Source File: OrcTableSource.java    From flink with Apache License 2.0 4 votes vote down vote up
private boolean isValid(UnaryExpression unary) {
	return unary.child() instanceof Attribute;
}
 
Example #20
Source File: OrcTableSource.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private String getColumnName(UnaryExpression unary) {
	return ((Attribute) unary.child()).name();
}
 
Example #21
Source File: OrcTableSource.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private boolean isValid(BinaryComparison comp) {
	return (comp.left() instanceof Literal && comp.right() instanceof Attribute) ||
		(comp.left() instanceof Attribute && comp.right() instanceof Literal);
}