public static boolean isFlat(RexCall call) {
    boolean flat = false;
    if (call.operands != null && call.operands.size() > 2) {
      SqlOperator op = call.getOperator();
      if (op.getKind() == SqlKind.AND || op.getKind() == SqlKind.OR) {
        flat = true;
      }
    }

    return flat;
  }
Assumption:<br>
1. Project will always be child of Sort.<br>
2. In Calcite every projection in Project is uniquely named
(unambiguous) without using table qualifier (table name).<br>

@param order
         Hive Sort Node
@return Schema
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java