MCPcopy Create free account
hub / github.com/apache/pig / testToDelimitedString

Method testToDelimitedString

test/org/apache/pig/test/TestTuple.java:167–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

165 }
166
167 @Test
168 public void testToDelimitedString() {
169 Tuple t = mTupleFactory.newTuple();
170 t.append(new Integer(1));
171 t.append(new Long(2));
172 t.append(new Float(1.1f));
173 t.append(new Double(2.3));
174 t.append("howdy howdy howdy");
175 t.append(null);
176 t.append("woah there");
177 t.append(new Double(2000000.3000000001));
178 t.append(new Float(1000000000.1000001f));
179 t.append(new Long(2001010101));
180 t.append(new Integer(100010101));
181 try {
182 String expected = "1,2,1.1,2.3,howdy howdy howdy,,woah there,2000000.3,1.0E9,2001010101,100010101";
183 assertEquals(expected, t.toDelimitedString(","));
184 } catch (Exception e) {
185 throw new RuntimeException(e);
186 }
187 }
188
189 @Test
190 public void testTupleSerDe() throws Exception {

Callers

nothing calls this directly

Calls 4

appendMethod · 0.95
toDelimitedStringMethod · 0.95
newTupleMethod · 0.65
assertEqualsMethod · 0.45

Tested by

no test coverage detected