Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/824#discussion_r115105622
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java
---
@@ -680,7 +731,7 @@ private boolean tableModified(List<String> directories,
Path metaFilePath,
}
public static abstract class ParquetFileMetadata {
- @JsonIgnore public abstract String getPath();
+ @JsonIgnore public abstract ParquetPath getParquetPath();
--- End diff --
Doing this changes the on-disk format for the metadata file, doesn't it? If
we do that, we need to introduce a new file version. Since metadata is
expensive, we'd have to be able to read the existing file format. I don't see
code for any of that.
To address the issue, we can instead leave the field as a string. Treat the
string as either relative or absolute. This should be easy to detect:
"/this/is/absolute", "but/this/is/relative".
Then, create a method to set the paths. When setting paths, convert them to
relative. When retrieving them, give a base directory. Convert relative (new)
paths to absolute, leave (old) absolute paths unchanged. This is exactly how
browsers handle URLs, OS's handle paths and so on. Classic approach.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---