Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,19 @@ object OrcUtils extends Logging {
}

/**
* @return Returns the result schema string based on the canPruneCols flag.
* resultSchemaString will be created using resultsSchema in case of
* canPruneCols is true and for canPruneCols as false value
* resultSchemaString will be created using the actual dataSchema.
* This method returns the result schema as string based on the canPruneCols flag.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would just write as:

Returns the result schema to read from ORC file. In addition, It sets the schema string to 'orc.mapred.input.schema' so ORC readers can use later.

and inline the details about parameters into the parameter descriptions below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that looks fine. Will update as suggested

* resultSchemaString will be created using pruned col in case of
* canPruneCols is true and for canPruneCols as false value
* resultSchemaString will be created using the actual dataSchema.
* Also as the part of this method update the MAPRED_INPUT_SCHEMA

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

update the MAPRED_INPUT_SCHEMA -> updates the MAPRED_INPUT_SCHEMA in the given 'conf'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the comment as suggested by @HyukjinKwon

*
* @param canPruneCols Flag to decide whether pruned cols schema is send to resultSchema
* or send the entire dataSchema to resultSchema.
* @param dataSchema Schema of the orc files.
* @param resultSchema Result data schema created from the query.
* @param partitionSchema Schema of partitions.
* @param conf Hadoop Configuration
* @return Returns the result schema as string
*/
def orcResultSchemaString(
canPruneCols: Boolean,
Expand Down