Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORC-1059: Align findColumns behaviour between 1.6 and 1.7 release #972

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

pgaref
Copy link
Contributor

@pgaref pgaref commented Dec 15, 2021

What changes were proposed in this pull request?

When trying to bump Apache Hive to 1.7 I noticed query failures related to SArgs pushdown.
In more detail, Hive may push Partition column filters that are not part of the columns, until 1.6 recently these columns were ignored, while 1.7 throws IllegalArgumentException. ORC-741 introduced this behavior change in Apache ORC 1.7.0.

Why are the changes needed?

Align findColumns behaviour between 1.6 and 1.7 release

How was this patch tested?

Existing tests

Change-Id: I3687491a8e430609374ba259d721e98bf4359ba8
@github-actions github-actions bot added the JAVA label Dec 15, 2021
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @pgaref .

@dongjoon-hyun dongjoon-hyun merged commit aee8132 into apache:main Dec 15, 2021
@dongjoon-hyun dongjoon-hyun added this to the 1.7.2 milestone Dec 15, 2021
dongjoon-hyun pushed a commit that referenced this pull request Dec 15, 2021
When trying to bump Apache Hive to 1.7 I noticed query failures related to SArgs pushdown.
In more detail, Hive may push Partition column filters that are not part of the columns, until 1.6 recently these columns were ignored, while 1.7 throws IllegalArgumentException.

Align findColumns behaviour between 1.6 and 1.7 release

Existing tests

(cherry picked from commit aee8132)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

I cherry-picked this to branch-1.7 for Apache ORC 1.7.2 release.

@dongjoon-hyun
Copy link
Member

cc @pavibhai and @omalley

@pgaref
Copy link
Contributor Author

pgaref commented Dec 16, 2021

Thanks for the quick review @dongjoon-hyun !
This will definitely help us bump to 1.7 quickly (e.g., next 1.7 release) but I was thinking that throwing an exception when a SArg column is not found is probably a better approach than just logging.

I suggest we keep this in mind for 1.8 (and switch back to that behaviour) where we could align downstream consumers like Hive to only push SArgs for columns that are part of the schema.

@dongjoon-hyun
Copy link
Member

Is it okay when we handle multiple ORC files in Hive schema evolutions?

I was thinking that throwing an exception when a SArg column is not found is probably a better approach than just logging.

In many cases, Hive partitions might have different schemas. The simplest case is having new columns additionally in new partitions. If a user run a query for all partitions, SArg columns can have new columns which old partitions don't have.

Apache Spark checks the physical schema when we open a file and try to adjust the missing columns. Given this PR's description, Apache Hive doesn't, right?

For me, throwing an exception could be too intrusive and the AS-IS status (-1) would be enough.

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Dec 16, 2021

BTW, let me try to test the status of branch-1.7 and roll a new Apache ORC release for Apache Hive, @pgaref .

@pgaref pgaref deleted the ORC-1059 branch December 16, 2021 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants