Skip to content

Commit

Permalink
[format][orc] add pushdown option only for reader .
Browse files Browse the repository at this point in the history
  • Loading branch information
ranxianglei.rxl committed Nov 12, 2024
1 parent a2acbab commit e1c90c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions paimon-format/src/main/java/org/apache/orc/OrcConf.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,21 @@ public enum OrcConf {
+ "must have the filter\n"
+ "reapplied to avoid using unset values in the unselected rows.\n"
+ "If unsure please leave this as false."),

READER_ONLY_ALLOW_SARG_TO_FILTER(
"orc.reader.sarg.to.filter",
"orc.reader.sarg.to.filter",
false,
"A boolean flag to determine if a SArg is allowed to become a filter, only for reader."),
READER_ONLY_USE_SELECTED(
"orc.reader.filter.use.selected",
"orc.reader.filter.use.selected",
false,
"A boolean flag to determine if the selected vector is supported by\n"
+ "the reading application, only for reader. If false, the output of the ORC reader "
+ "must have the filter\n"
+ "reapplied to avoid using unset values in the unselected rows.\n"
+ "If unsure please leave this as false."),
ALLOW_PLUGIN_FILTER(
"orc.filter.plugin",
"orc.filter.plugin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,9 @@ private static RecordReader createRecordReader(
if (!conjunctPredicates.isEmpty()) {
// TODO fix it , if open this option,future deletion vectors would not work,
// cased by getRowNumber would be changed .
options.useSelected(OrcConf.READER_USE_SELECTED.getBoolean(conf));
options.allowSARGToFilter(OrcConf.ALLOW_SARG_TO_FILTER.getBoolean(conf));
options.useSelected(OrcConf.READER_ONLY_USE_SELECTED.getBoolean(conf));
options.allowSARGToFilter(
OrcConf.READER_ONLY_ALLOW_SARG_TO_FILTER.getBoolean(conf));
}
// configure filters
if (!conjunctPredicates.isEmpty()) {
Expand Down

0 comments on commit e1c90c7

Please sign in to comment.