-
Notifications
You must be signed in to change notification settings - Fork 184
First commit on supporting parquet #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 48 commits
74cbc83
79bd222
2143c99
4f1ea77
f71610b
c57a42f
1557ea3
24c474a
e1a3f35
fbbd1eb
40c5e67
ec222de
e0fbca8
6e2fc66
b4c49b7
cac552a
004d763
4b4593b
9d56c21
18ef037
bd11c67
0dbedb0
0233d54
8fc6a95
c88fb25
6c04cc7
9bdd972
924db34
271756e
f7db318
1323f63
5c87799
c53b7c5
80b9300
c54d038
c49dbaa
f95f87a
9df1c42
60fdc8a
eb7f60f
96e91cd
f1b7524
a79af62
a27e172
c58fe53
429581a
0f3c60b
60dced9
1b698bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* 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.xtable.model.config; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.Value; | ||
|
||
import org.apache.xtable.model.schema.PartitionTransformType; | ||
|
||
@Data | ||
@Value | ||
@Builder(toBuilder = true) | ||
public class InputPartitionField { | ||
String partitionFieldName; | ||
String partitionValue; | ||
PartitionTransformType transformType; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* 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.xtable.model.config; | ||
|
||
import java.util.List; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.Value; | ||
|
||
@Data | ||
@Value | ||
@Builder(toBuilder = true) | ||
public class InputPartitionFields { | ||
String sourceField; | ||
List<InputPartitionField> partitions; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,13 @@ | |
*/ | ||
|
||
package org.apache.xtable.model.stat; | ||
|
||
import java.util.Set; | ||
import lombok.Builder; | ||
import lombok.Value; | ||
|
||
import org.apache.xtable.model.schema.InternalField; | ||
import org.apache.parquet.column.Encoding; | ||
import org.apache.parquet.column.statistics.Statistics; | ||
|
||
/** | ||
* Captures column level statistics for a field. | ||
|
@@ -36,4 +38,7 @@ public class ColumnStat { | |
long numNulls; | ||
long numValues; | ||
long totalSize; | ||
long uncompressedSize; | ||
Set<Encoding> encodings; | ||
Statistics statistics; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to add these since they are not used by the other table formats. This also introduces parquet specific dependencies into the model which we should avoid There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was aware of that, and I was thinking we could select which attributes to use to build a ColumnStat object. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,8 @@ public class InternalDataFile { | |
@Builder.Default @NonNull List<ColumnStat> columnStats = Collections.emptyList(); | ||
// last modified time in millis since epoch | ||
long lastModified; | ||
|
||
public static InternalDataFileBuilder builderFrom(InternalDataFile dataFile) { | ||
return dataFile.toBuilder(); | ||
} | ||
Comment on lines
+53
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this static method required when there is already a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did I add this method? I use it nowhere in the current version of my code. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these changes coming from
mvn spotless:apply
? Wondering how latest main branch doesn't reflect these.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/apache/incubator-xtable/actions/runs/13485330237/job/37693458127?pr=650
The build failed because of spotless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regarding how to get partitionValues, I think it is best to discuss this in our meeting of today, but anyways, can it be asked from the user as YAML configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can use YAML configuration inputs.
https://github.com/apache/incubator-xtable/blob/main/README.md#running-the-bundled-jar