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-477: BloomFilter for ACID table does not get created #373

Merged
merged 1 commit into from Mar 22, 2019

Conversation

deniskuzZ
Copy link
Member

No description provided.

@deniskuzZ deniskuzZ force-pushed the branch-1.5 branch 3 times, most recently from bd0d862 to 5e19bdb Compare March 8, 2019 20:40
for (String column: selectedColumns.split((","))) {
TypeDescription col = findColumn(column, fieldNames, fields);
TypeDescription col = findColumn((isAcid ? "row." + column : column), fieldNames, fields);
Copy link
Contributor

Choose a reason for hiding this comment

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

This code should ideally be in the Hive codebase and ORC should interpret the selectedColumns there.

Copy link
Member Author

Choose a reason for hiding this comment

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

ACID schema generation code is under ORC SchemaEvolution class

public static TypeDescription createEventSchema(TypeDescription typeDescr) {
TypeDescription result = TypeDescription.createStruct()
.addField("operation", TypeDescription.createInt())
.addField("originalTransaction", TypeDescription.createLong())
.addField("bucket", TypeDescription.createInt())
.addField("rowId", TypeDescription.createLong())
.addField("currentTransaction", TypeDescription.createLong())
.addField("row", typeDescr.clone());
return result;
}

Copy link
Member Author

@deniskuzZ deniskuzZ Mar 8, 2019

Choose a reason for hiding this comment

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

I am thinking on simplifying this a bit by introducing extra param (isAcid) in findColumn method.

if (resultTypeDesc.getCategory() == TypeDescription.Category.STRUCT && isAcid) {
//unfold
resultTypeDesc = findColumn(columnName, resultTypeDesc.getFieldNames(), resultTypeDesc.getChildren(), false);
}

} else {
if (resultTypeDesc.getCategory() == TypeDescription.Category.STRUCT
&& fieldName.equalsIgnoreCase(StringUtils.substringBefore(columnName, DOT))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should already work if Hive sends "row." in selected columns?

Copy link
Member Author

@deniskuzZ deniskuzZ Mar 8, 2019

Choose a reason for hiding this comment

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

not completely, column decr are embedded under row struct, so we need to unfold it.

@deniskuzZ deniskuzZ force-pushed the branch-1.5 branch 3 times, most recently from 6fbd9b0 to 325d582 Compare March 9, 2019 18:25
@deniskuzZ
Copy link
Member Author

@t3rmin4t0r do you know how to configure the AppVeyor build?

The build phase is set to "MSBuild" mode (default), but no Visual Studio project or solution files were found in the root directory. If you are not building Visual Studio project switch build mode to "Script" and provide your custom build command.

@deniskuzZ deniskuzZ force-pushed the branch-1.5 branch 3 times, most recently from caa49c2 to e2db246 Compare March 11, 2019 22:10
@prasanthj prasanthj merged commit f5071f2 into apache:branch-1.5 Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants