mirror of https://github.com/apache/druid.git
Add jsonPath function length() to Parquet
This commit is contained in:
parent
d4b1ea4668
commit
5fa7412c7a
|
@ -46,6 +46,11 @@
|
|||
"type": "path",
|
||||
"name": "list",
|
||||
"expr": "$.listDim"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"name": "listLength",
|
||||
"expr": "$.listDim.length()"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -191,7 +191,7 @@ public class ParquetGroupJsonProvider implements JsonProvider
|
|||
@Override
|
||||
public Object unwrap(final Object o)
|
||||
{
|
||||
throw new UnsupportedOperationException("Unused");
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,6 +116,7 @@ public class FlattenSpecParquetInputTest extends BaseParquetInputTest
|
|||
Assert.assertEquals("1", rows.get(0).getDimension("dim3").get(0));
|
||||
Assert.assertEquals("listDim1v1", rows.get(0).getDimension("list").get(0));
|
||||
Assert.assertEquals("listDim1v2", rows.get(0).getDimension("list").get(1));
|
||||
Assert.assertEquals("2", rows.get(0).getDimension("listLength").get(0));
|
||||
Assert.assertEquals(1, rows.get(0).getMetric("metric1").longValue());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue