[ 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org