forked from apache/parquet-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab7df25
commit 2302fe4
Showing
35 changed files
with
2,519 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.class | ||
.project | ||
.classpath | ||
.settings | ||
target | ||
# Package Files # | ||
*.jar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
redelm-column/src/test/java/redelm/schema/TestMessageType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package redelm.schema; | ||
|
||
import junit.framework.Assert; | ||
import redelm.data.simple.example.Paper; | ||
|
||
import org.junit.Test; | ||
|
||
public class TestMessageType { | ||
@Test | ||
public void test() { | ||
System.out.println(Paper.schema.toString()); | ||
MessageType schema = MessageType.parse(Paper.schema.toString()); | ||
Assert.assertEquals(schema.toString(), Paper.schema.toString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package redelm.pig; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class BlockMetaData implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final long startIndex; | ||
private long endIndex; | ||
private List<ColumnMetaData> columns = new ArrayList<ColumnMetaData>(); | ||
private int recordCount; | ||
|
||
public BlockMetaData(long startIndex) { | ||
this.startIndex = startIndex; | ||
} | ||
|
||
public void setEndIndex(long endIndex) { | ||
this.endIndex = endIndex; | ||
} | ||
|
||
public void addColumn(ColumnMetaData column) { | ||
columns.add(column); | ||
} | ||
|
||
public long getStartIndex() { | ||
return startIndex; | ||
} | ||
|
||
public long getEndIndex() { | ||
return endIndex; | ||
} | ||
|
||
public List<ColumnMetaData> getColumns() { | ||
return columns; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BlockMetaData{" + startIndex + ", " + endIndex + " " + columns + "}"; | ||
} | ||
|
||
public int getRecordCount() { | ||
return recordCount; | ||
} | ||
|
||
public void setRecordCount(int recordCount) { | ||
this.recordCount = recordCount; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package redelm.pig; | ||
|
||
import java.util.Arrays; | ||
|
||
public class ColumnData { | ||
|
||
private final String[] path; | ||
private byte[] data; | ||
|
||
public ColumnData(String[] path, byte[] data) { | ||
super(); | ||
this.path = path; | ||
this.data = data; | ||
} | ||
|
||
public String[] getPath() { | ||
return path; | ||
} | ||
|
||
public byte[] getData() { | ||
return data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ColumnData{"+Arrays.toString(path)+" " + data.length + "B}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package redelm.pig; | ||
|
||
import java.io.Serializable; | ||
import java.util.Arrays; | ||
|
||
import redelm.schema.PrimitiveType.Primitive; | ||
|
||
public class ColumnMetaData implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private final long startIndex; | ||
private long endIndex; | ||
private final String[] path; | ||
private final Primitive type; | ||
private int recordCount; | ||
|
||
public ColumnMetaData(long startIndex, String[] path, Primitive type) { | ||
this.startIndex = startIndex; | ||
this.path = path; | ||
this.type = type; | ||
} | ||
|
||
public void setEndIndex(long endIndex) { | ||
this.endIndex = endIndex; | ||
} | ||
|
||
public long getStartIndex() { | ||
return startIndex; | ||
} | ||
|
||
public long getEndIndex() { | ||
return endIndex; | ||
} | ||
|
||
public String[] getPath() { | ||
return path; | ||
} | ||
|
||
public Primitive getType() { | ||
return type; | ||
} | ||
|
||
public int getRecordCount() { | ||
return recordCount; | ||
} | ||
|
||
public void setRecordCount(int recordCount) { | ||
this.recordCount = recordCount; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ColumnMetaData{" + startIndex + ", " + endIndex + " " + Arrays.toString(path) + "}"; | ||
} | ||
|
||
} |
Oops, something went wrong.