RelProtoConverter.visit(ExtensionTable) (core/src/main/java/io/substrait/relation/RelProtoConverter.java:424) never calls setFilter or setBestEffortFilter, and ProtoRelConverter.newExtensionTable (core/src/main/java/io/substrait/relation/ProtoRelConverter.java:668) never reads them. The other three read types (NamedScan, LocalFiles, VirtualTableScan) carry both filters in both directions, and the POJO models them on AbstractReadRel.
A read whose mandatory filter must remove every row therefore comes back with no filter, and a consumer returns every row with no error:
ExtensionTable rel =
ExtensionTable.from(detail)
.initialSchema(NamedStruct.of(List.of("id"), R.struct(R.I32)))
.filter(sb.bool(false))
.bestEffortFilter(sb.bool(false))
.build();
relProtoConverter.toProto(rel).getRead().hasFilter(); // false
relProtoConverter.toProto(rel).getRead().hasBestEffortFilter(); // false
Decoding a ReadRel{extension_table, filter, best_effort_filter} gives getFilter() == Optional.empty() and getBestEffortFilter() == Optional.empty().
The RelSamples ExtensionTable sample carries no filter, so no round-trip test catches it. #1278 is the copy-on-write side of the same field.
Measured on main at ca8315b. Found while reviewing #1260.
RelProtoConverter.visit(ExtensionTable)(core/src/main/java/io/substrait/relation/RelProtoConverter.java:424) never callssetFilterorsetBestEffortFilter, andProtoRelConverter.newExtensionTable(core/src/main/java/io/substrait/relation/ProtoRelConverter.java:668) never reads them. The other three read types (NamedScan,LocalFiles,VirtualTableScan) carry both filters in both directions, and the POJO models them onAbstractReadRel.A read whose mandatory filter must remove every row therefore comes back with no filter, and a consumer returns every row with no error:
Decoding a
ReadRel{extension_table, filter, best_effort_filter}givesgetFilter() == Optional.empty()andgetBestEffortFilter() == Optional.empty().The
RelSamplesExtensionTablesample carries no filter, so no round-trip test catches it. #1278 is the copy-on-write side of the same field.Measured on
mainat ca8315b. Found while reviewing #1260.