You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "gabrywu (Jira)" <ji...@apache.org> on 2022/12/17 05:19:00 UTC

[jira] [Comment Edited] (SPARK-41556) input_file_positon

    [ https://issues.apache.org/jira/browse/SPARK-41556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17648856#comment-17648856 ] 

gabrywu edited comment on SPARK-41556 at 12/17/22 5:18 AM:
-----------------------------------------------------------

[~yumwang] [~petertoth]  What do you think of it?


was (Author: gabry.wu):
[~yumwang] [~ptoth] What do you think of it?

> input_file_positon
> ------------------
>
>                 Key: SPARK-41556
>                 URL: https://issues.apache.org/jira/browse/SPARK-41556
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.3.1
>            Reporter: gabrywu
>            Priority: Trivial
>
> As for now, we have 3 built-in UDFs related to input files and blocks.  So can we provide a new UDF to return current record position of a file or block? Sometimes, it's useful and we can consider this position (called ROWID in oracle) as a physical primary key.
>  
> |input_file_block_length()|Returns the length of the block being read, or -1 if not available.|
> |input_file_block_start()|Returns the start offset of the block being read, or -1 if not available.|
> |input_file_name()|Returns the name of the file being read, or empty string if not available.|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org