-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYSTEMDS-3135] Reader Generation for Custom Text Formats
This commit contains the the updated implementation of GIO, a system for generating efficient matrix and frame readers for custom data formats by example. Our GIO paper was published in SIGMOD 2023. The main improvements and extensions over the previous implementation are 1. Support for both frame and matrix reader generation 2. Support for projection over the selected fields 3. Improved code generation that adapts to single/multi-threaded configuration 4. Support for single/multi-line record representations Closes #1865
- Loading branch information
1 parent
3b5d17c
commit 82d9d13
Showing
133 changed files
with
31,202 additions
and
3,992 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
103 changes: 103 additions & 0 deletions
103
src/main/java/org/apache/sysds/runtime/iogen/ColIndexStructure.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,103 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.apache.sysds.runtime.iogen; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashSet; | ||
|
||
public class ColIndexStructure { | ||
|
||
public enum IndexProperties { | ||
Identity, // col number of sample raw data equal to the row index of matrix/frame | ||
CellWiseExist; // col index of every cell values are in the sample raw data | ||
@Override | ||
public String toString() { | ||
return this.name().toUpperCase(); | ||
} | ||
} | ||
|
||
public ColIndexStructure() { | ||
this.properties = null; | ||
this.keyPattern = null; | ||
this.colIndexBegin = 0; | ||
} | ||
|
||
private IndexProperties properties; | ||
|
||
private HashSet<String> endWithValueString = null; | ||
private ArrayList<String> keyPattern; | ||
private int colIndexBegin; | ||
|
||
// when the index properties is CellWiseExist: | ||
private String indexDelim; | ||
private String valueDelim; | ||
|
||
public HashSet<String> endWithValueStrings() { | ||
return endWithValueString; | ||
} | ||
|
||
public IndexProperties getProperties() { | ||
return properties; | ||
} | ||
|
||
public void setProperties(IndexProperties properties) { | ||
this.properties = properties; | ||
} | ||
|
||
public ArrayList<String> getKeyPattern() { | ||
return keyPattern; | ||
} | ||
|
||
public void setKeyPattern(ArrayList<String> keyPattern) { | ||
this.keyPattern = keyPattern; | ||
} | ||
|
||
public int getColIndexBegin() { | ||
return colIndexBegin; | ||
} | ||
|
||
public void setColIndexBegin(int colIndexBegin) { | ||
this.colIndexBegin = colIndexBegin; | ||
} | ||
|
||
public String getIndexDelim() { | ||
return indexDelim; | ||
} | ||
|
||
public void setIndexDelim(String indexDelim) { | ||
this.indexDelim = indexDelim; | ||
} | ||
|
||
public String getValueDelim() { | ||
return valueDelim; | ||
} | ||
|
||
public void setValueDelim(String valueDelim) { | ||
this.valueDelim = valueDelim; | ||
} | ||
|
||
public HashSet<String> endWithValueString() { | ||
return endWithValueString; | ||
} | ||
|
||
public void setEndWithValueString(HashSet<String> endWithValueString) { | ||
this.endWithValueString = endWithValueString; | ||
} | ||
} |
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
95 changes: 0 additions & 95 deletions
95
src/main/java/org/apache/sysds/runtime/iogen/FastStringTokenizer.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.