Skip to content

Instantly share code, notes, and snippets.

@masayuki038
Created November 9, 2019 12:23
Show Gist options
  • Select an option

  • Save masayuki038/fd103c7e94c060484880aa70ea9a1be3 to your computer and use it in GitHub Desktop.

Select an option

Save masayuki038/fd103c7e94c060484880aa70ea9a1be3 to your computer and use it in GitHub Desktop.
@Override
public RelDataType deriveRowType() {
List<RelDataTypeField> fieldList = getTable().getRowType().getFieldList();
RelDataTypeFactory.Builder builder = getCluster().getTypeFactory().builder();
Arrays.stream(fields).forEach(field -> builder.add(fieldList.get(field)));
return builder.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment