Exemplo n.º 1
0
 public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
   assert opBinding.getOperandCount() == 1;
   final RelDataType multisetType = opBinding.getOperandType(0);
   RelDataType componentType = multisetType.getComponentType();
   assert componentType != null : "expected a multiset type: " + multisetType;
   final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
   final RelDataType type =
       typeFactory.builder().add(SqlUtil.deriveAliasFromOrdinal(0), componentType).build();
   return typeFactory.createMultisetType(type, -1);
 }