You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Prakhar Jain (Jira)" <ji...@apache.org> on 2022/01/26 01:59:00 UTC
[jira] [Comment Edited] (SPARK-37980) Extend METADATA column to support row indices for file based data sources
[ https://issues.apache.org/jira/browse/SPARK-37980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17482142#comment-17482142 ]
Prakhar Jain edited comment on SPARK-37980 at 1/26/22, 1:58 AM:
----------------------------------------------------------------
Yeah - this will need implementation for the underlying file format e.g. parquet/orc. We can start with parquet first and extend it to other formats after that.
[~cloud_fan] Is it possible to add the support for parquet directly via Spark codebase? Will this need changes in parquet-mr?
was (Author: prakharjain09):
Yes - this needs implementation in the underlying datasources such as parquet/orc. Also Spark uses the underlying ParquetRecordReader from parquet-mr to read a parquet file. All the row group skipping/column index filtering happens as part of parquet-mr. So I guess this will need the row index support from parquet-mr. The other way is to replicate some of the parquet-mr RecordReader code in Spark - which is not ideal.
> Extend METADATA column to support row indices for file based data sources
> -------------------------------------------------------------------------
>
> Key: SPARK-37980
> URL: https://issues.apache.org/jira/browse/SPARK-37980
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.3
> Reporter: Prakhar Jain
> Priority: Major
>
> Spark recently added hidden metadata column support for File based datasources as part of SPARK-37273.
> We should extend it to support ROW_INDEX/ROW_POSITION also.
>
> Meaning of ROW_POSITION:
> ROW_INDEX/ROW_POSITION is basically an index of a row within a file. E.g. 5th row in the file will have ROW_INDEX 5.
>
> Use cases:
> Row Indexes can be used in a variety of ways. A (fileName, rowIndex) tuple uniquely identifies row in a table. This information can be used to mark rows e.g. this can be used by indexer etc.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org