docs: private Predicate toOrcPredicate(Expression pred) {
  		if (pred instanceof Or) {
  			Predicate c1 = toOrcPredicate(((Or) pred).left());
  			Predicate c2 = toOrcPredicate(((Or) pred).right());
  			if (c1 == null || c2 == null) {
  				return null;
  			} else {
  				return new OrcRowInputFormat.Or(c1, c2);
  			}
  		} else if (pred instanceof Not) {
  			Predicate c = toOrcPredicate(((Not) pred).child());
  			if (c == null) {
  				return null;
  			} else {
  				return new OrcRowInputFormat.Not(c);
  			}
  		} else if (pred instanceof BinaryComparison) {
  
  			BinaryComparison binComp = (BinaryComparison) pred;
  
  			if (!isValid(binComp)) {
  				// not a valid predicate
  				LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  				return null;
  			}
  			PredicateLeaf.Type litType = getLiteralType(binComp);
  			if (litType == null) {
  				// unsupported literal type
  				LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  				return null;
  			}
  
  			boolean literalOnRight = literalOnRight(binComp);
  			String colName = getColumnName(binComp);
  
  			// fetch literal and ensure it is serializable
  			Object literalObj = getLiteral(binComp);
  			Serializable literal;
  			// validate that literal is serializable
  			if (literalObj instanceof Serializable) {
  				literal = (Serializable) literalObj;
  			} else {
  				LOG.warn("Encountered a non-serializable literal of type {}. " +
  						"Cannot push predicate [{}] into OrcTableSource. " +
  						"This is a bug and should be reported.",
  						literalObj.getClass().getCanonicalName(), pred);
  				return null;
  			}
  
  			if (pred instanceof EqualTo) {
  				return new OrcRowInputFormat.Equals(colName, litType, literal);
  			} else if (pred instanceof NotEqualTo) {
  				return new OrcRowInputFormat.Not(
  					new OrcRowInputFormat.Equals(colName, litType, literal));
  			} else if (pred instanceof GreaterThan) {
  				if (literalOnRight) {
  					return new OrcRowInputFormat.Not(
  						new OrcRowInputFormat.LessThanEquals(colName, litType, literal));
  				} else {
  					return new OrcRowInputFormat.LessThan(colName, litType, literal);
  				}
  			} else if (pred instanceof GreaterThanOrEqual) {
  				if (literalOnRight) {
  					return new OrcRowInputFormat.Not(
  						new OrcRowInputFormat.LessThan(colName, litType, literal));
  				} else {
  					return new OrcRowInputFormat.LessThanEquals(colName, litType, literal);
  				}
  			} else if (pred instanceof LessThan) {
  				if (literalOnRight) {
  					return new OrcRowInputFormat.LessThan(colName, litType, literal);
  				} else {
  					return new OrcRowInputFormat.Not(
  						new OrcRowInputFormat.LessThanEquals(colName, litType, literal));
  				}
  			} else if (pred instanceof LessThanOrEqual) {
  				if (literalOnRight) {
  					return new OrcRowInputFormat.LessThanEquals(colName, litType, literal);
  				} else {
  					return new OrcRowInputFormat.Not(
  						new OrcRowInputFormat.LessThan(colName, litType, literal));
  				}
  			} else {
  				// unsupported predicate
  				LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  				return null;
  			}
  		} else if (pred instanceof UnaryExpression) {
  
  			UnaryExpression unary = (UnaryExpression) pred;
  			if (!isValid(unary)) {
  				// not a valid predicate
  				LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  				return null;
  			}
  			PredicateLeaf.Type colType = toOrcType(((UnaryExpression) pred).child().resultType());
  			if (colType == null) {
  				// unsupported type
  				LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  				return null;
  			}
  
  			String colName = getColumnName(unary);
  
  			if (pred instanceof IsNull) {
  				return new OrcRowInputFormat.IsNull(colName, colType);
  			} else if (pred instanceof IsNotNull) {
  				return new OrcRowInputFormat.Not(
  					new OrcRowInputFormat.IsNull(colName, colType));
  			} else {
  				// unsupported predicate
  				LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  				return null;
  			}
  		} else {
  			// unsupported predicate
  			LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred);
  			return null;
  		}
  	}