snowflakedb / snowpark-java-scala

Snowflake Snowpark Java & Scala API
Apache License 2.0
18 stars 20 forks source link

SNOW-1480775 Collect Span Info from Copyable and Updatable Dataframes #119

Closed sfc-gh-bli closed 2 months ago

sfc-gh-bli commented 2 months ago
  1. Collect Span Info from Copyable and Updatable Dataframes
  2. Improve the test function to automatically detect line numbers
  3. Add Java offset to action functions
sfc-gh-bli commented 2 months ago

Looks like only a few action functions needs offset. I feel like it is a bit fragile since change of the way calling action function could break the offset. Do you think we are going to make changes on the way we call those action functions in the future?

val index = if (isScala) 4 else 5 + javaOffSet
val fileName = stacks(index).getFileName
val lineNumber = stacks(index).getLineNumber

Default stack index of Scala API is 4, and the Java One is 5. Offset is related the default Java API index(5), default value of offset is 0.

In future if the change of action function impacts those indices, we only need change the default value (4 and 5) from the action function. I will not impact the offset.