Re: Converting an InternalRow to a Row

2017-01-07 Thread Andy Dang
struct).resol > >> >>> veAndBind(); > >> >>> > >> >>> > >> >>> Andy Dang wrote > >> >>> > Hi all, > >> >>> > (cc-ing dev since I've hi

Re: Converting an InternalRow to a Row

2017-01-07 Thread Liang-Chi Hsieh
snippet: >> >>> > @Test >> >>> > public void foo() throws Exception { >> >>> > Row row = RowFactory.create(1); >> >>> >

Re: Converting an InternalRow to a Row

2017-01-06 Thread Andy Dang
; > InternalRow internalRow = enconder.toRow(row); > >>> > System.out.println("Internal row size: " + > >>> > internalRow.numFields()); > >>> > Row roundT

Re: Converting an InternalRow to a Row

2017-01-05 Thread Liang-Chi Hsieh
gt;>> > internalRow.numFields()); >>> > Row roundTrip = enconder.fromRow(internalRow); >>> > System.out.println("Round trip: " + roundTrip.size()); >>> > } >>> > >>> > The cod

Re: Converting an InternalRow to a Row

2017-01-05 Thread Andy Dang
); >> > System.out.println("Round trip: " + roundTrip.size()); >> > } >> > >> > The code fails at the line encoder.fromRow() with the exception: >> >> Caused by: java.lang.UnsupportedOperationException: Cannot evaluate >> > e

Re: Converting an InternalRow to a Row

2017-01-05 Thread Andy Dang
al(0, IntegerType) > > > > --- > > Regards, > > Andy > > > > > > - > Liang-Chi Hsieh | @viirya > Spark Technology Center > http://www.spark.tc/ > -- > View this message in context: http://apache-spark- > developers-list.1001551.n3.nabble.com/Converting-an-InternalRow-to-a-Row- > tp20460p20465.html > Sent from the Apache Spark Developers List mailing list archive at > Nabble.com. > > - > To unsubscribe e-mail: dev-unsubscr...@spark.apache.org > >

Re: Converting an InternalRow to a Row

2017-01-04 Thread Liang-Chi Hsieh
Regards, > Andy - Liang-Chi Hsieh | @viirya Spark Technology Center http://www.spark.tc/ -- View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/Converting-an-InternalRow-to-a-Row-tp20460p20465.html Sent from the Apache Spark Developers List mailing

Converting an InternalRow to a Row

2017-01-04 Thread Andy Dang
Hi all, (cc-ing dev since I've hit some developer API corner) What's the best way to convert an InternalRow to a Row if I've got an InternalRow and the corresponding Schema. Code snippet: @Test public void foo() throws Exception { Row row = RowFactory.create(1); StructType