Skip to content

Commit 3a13583

Browse files
committed
Implement Variant encoding
1 parent 7f77908 commit 3a13583

7 files changed

Lines changed: 2308 additions & 0 deletions

File tree

parquet-variant/pom.xml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<!--
2+
~ Licensed to the Apache Software Foundation (ASF) under one
3+
~ or more contributor license agreements. See the NOTICE file
4+
~ distributed with this work for additional information
5+
~ regarding copyright ownership. The ASF licenses this file
6+
~ to you under the Apache License, Version 2.0 (the
7+
~ "License"); you may not use this file except in compliance
8+
~ with the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing,
13+
~ software distributed under the License is distributed on an
14+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
~ KIND, either express or implied. See the License for the
16+
~ specific language governing permissions and limitations
17+
~ under the License.
18+
-->
19+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
<parent>
21+
<groupId>org.apache.parquet</groupId>
22+
<artifactId>parquet</artifactId>
23+
<relativePath>../pom.xml</relativePath>
24+
<version>1.16.0-SNAPSHOT</version>
25+
</parent>
26+
27+
<modelVersion>4.0.0</modelVersion>
28+
29+
<artifactId>parquet-variant</artifactId>
30+
<packaging>jar</packaging>
31+
32+
<name>Apache Parquet Variant</name>
33+
<url>https://parquet.apache.org</url>
34+
35+
<properties>
36+
</properties>
37+
38+
<dependencies>
39+
<dependency>
40+
<groupId>org.apache.parquet</groupId>
41+
<artifactId>parquet-cli</artifactId>
42+
<version>${project.version}</version>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.apache.parquet</groupId>
46+
<artifactId>parquet-jackson</artifactId>
47+
<version>${project.version}</version>
48+
<scope>runtime</scope>
49+
</dependency>
50+
<dependency>
51+
<groupId>${jackson.groupId}</groupId>
52+
<artifactId>jackson-core</artifactId>
53+
<version>${jackson.version}</version>
54+
</dependency>
55+
<dependency>
56+
<groupId>${jackson.groupId}</groupId>
57+
<artifactId>jackson-databind</artifactId>
58+
<version>${jackson-databind.version}</version>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.google.guava</groupId>
63+
<artifactId>guava</artifactId>
64+
<version>${guava.version}</version>
65+
<scope>test</scope>
66+
</dependency>
67+
<dependency>
68+
<groupId>org.slf4j</groupId>
69+
<artifactId>slf4j-api</artifactId>
70+
<version>${slf4j.version}</version>
71+
<scope>test</scope>
72+
</dependency>
73+
</dependencies>
74+
75+
<build>
76+
<plugins>
77+
<plugin>
78+
<groupId>org.apache.maven.plugins</groupId>
79+
<artifactId>maven-jar-plugin</artifactId>
80+
</plugin>
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-shade-plugin</artifactId>
84+
</plugin>
85+
</plugins>
86+
</build>
87+
88+
</project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.parquet.variant;
18+
19+
/**
20+
* An exception indicating that the Variant is malformed.
21+
*/
22+
public class MalformedVariantException extends RuntimeException {
23+
public MalformedVariantException(String message) {
24+
super(message);
25+
}
26+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.parquet.variant;
18+
19+
/**
20+
* An exception indicating that the Variant contains an unknown type.
21+
*/
22+
public class UnknownVariantTypeException extends RuntimeException {
23+
public final int typeId;
24+
25+
/**
26+
* @param typeId the type id that was unknown
27+
*/
28+
public UnknownVariantTypeException(int typeId) {
29+
super("Unknown type in Variant. id: " + typeId);
30+
this.typeId = typeId;
31+
}
32+
33+
/**
34+
* @return the type id that was unknown
35+
*/
36+
public int typeId() {
37+
return typeId;
38+
}
39+
}

0 commit comments

Comments
 (0)