Skip to main content
Question

UDTF JAVA SDK has no UUID support. How to read UUID from PartitionReader?

  • Aug 11, 2021 8:55 PM UTC
  • 3 replies
  • 20 views

BHIFP
Forum|alt.badge.img+1
  • Participating Frequently

PartitionReader, for example, does not have native getUUID function. Any suggestion how to get UUID from input?
As an example, for int column, one would do: inputReader.getLong(argCols.get(0));

Same question for PartitionWriter.
Thanks

3 replies

BHIFP
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • Aug 13, 2021 5:28 PM UTC

To answer my own question. The following works, but probably not most efficient:

SELECT UDTF(UUID:VARCHAR) FROM T;

Then in java code, use functions like isVarchar(), addVarchar(36, "uuid")


Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • Aug 13, 2021 11:10 PM UTC

BHIFP
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • Aug 14, 2021 12:55 AM UTC

This is way I figured out. If you have better way, please let me know.