Skip to content
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

Adjust {Table|Column}.parse to use Value_Type #6213

Merged
merged 8 commits into from
Apr 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
javafmt
  • Loading branch information
radeusgd committed Apr 6, 2023
commit 2210dbec2af31536c70bc75c4cdbf72c4643d4a8
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
import org.enso.table.problems.WithProblems;

/**
* The type inferring parser tries to parse the given column using a set of provided parsers. It returns the result of
* the first parser that succeeds without reporting any problems.
* The type inferring parser tries to parse the given column using a set of provided parsers. It
* returns the result of the first parser that succeeds without reporting any problems.
*
* <p>If all parsers from the set reported problems, the fallback parser is used and its result is
* returned regardless of any problems.
@@ -42,7 +42,8 @@ public Object parseSingleValue(String text, ProblemAggregator problemAggregator)
public WithProblems<Storage<?>> parseColumn(String columnName, Storage<String> sourceStorage) {
// If there are no values, the Auto parser would guess some random type (the first one that is
// checked). Instead, we just return the empty column unchanged.
boolean hasNoValues = (sourceStorage.size() == 0) || (sourceStorage.countMissing() == sourceStorage.size());
boolean hasNoValues =
(sourceStorage.size() == 0) || (sourceStorage.countMissing() == sourceStorage.size());
if (hasNoValues) {
return fallbackParser.parseColumn(columnName, sourceStorage);
}