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

Fix Hive target max file size for partitioned tables #9557

Merged
merged 1 commit into from Oct 8, 2021

Conversation

dain
Copy link
Member

@dain dain commented Oct 7, 2021

Fixes #9434

@cla-bot cla-bot bot added the cla-signed label Oct 7, 2021
@dain dain merged commit bd55276 into trinodb:master Oct 8, 2021
@dain dain deleted the fix-hive-target-size branch October 8, 2021 06:39
@dain dain mentioned this pull request Oct 8, 2021
12 tasks
@dain dain added this to the 364 milestone Oct 8, 2021
HiveWriter writer = writers.get(writerIndex);
if (writer != null) {
// if current file not too big continue with the current writer
if (bucketFunction != null || writer.getWrittenBytes() <= targetMaxFileSize.orElse(Long.MAX_VALUE)) {
Copy link
Member

Choose a reason for hiding this comment

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

Why bucketFunction != null condition? we support multiple files per bucket.

also are there any disdvantages to calling writer.getWrittenBytes() <= targetMaxFileSize.orElse(Long.MAX_VALUE) per page position?

@Test
public void testTargetMaxFileSizePartitioned()
{
@Language("SQL") String createTableSql = "" +
Copy link
Member

Choose a reason for hiding this comment

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

nit: if you have new enough Intellij, @Language("SQL") on variables is redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

ArrayIndexOutOfBoundsException in new release during INSERT INTO
3 participants