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
[FLINK-2435] User-defined types in CsvReader #5862
Conversation
…in Tuple and Row 'containers' while reading from a csv file
@@ -89,14 +94,14 @@ | |||
* the state of this parser. | |||
* The start position within the byte array and the array's valid length is given. | |||
* The content of the value is delimited by a field delimiter. | |||
* |
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.
Could you delete excess changes
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.
Hi @DmitryKober thanks for your work, I left a few comments about you changes.
@PublicEvolving | ||
public static <X extends Tuple> TupleTypeInfo<X> getTupleTypeInfo(Class<?>... incomeTypes) { | ||
if (incomeTypes == null || incomeTypes.length == 0) { | ||
throw new IllegalArgumentException(); |
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.
I think the good idea add here message for exception.
@@ -129,7 +129,7 @@ protected TypeExtractor() { | |||
// TypeInfoFactory registry | |||
// -------------------------------------------------------------------------------------------- | |||
|
|||
private static Map<Type, Class<? extends TypeInfoFactory>> registeredTypeInfoFactories = new HashMap<>(); | |||
public static Map<Type, Class<? extends TypeInfoFactory>> registeredTypeInfoFactories = new HashMap<>(); |
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.
For what is it chages?
|
||
synchronized (CUSTOM_PARSERS) { | ||
if (CUSTOM_PARSERS.containsKey(type)) { | ||
LOG.warn("'{}' type is already registered with '{}' parser. Skipping."); |
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.
You don't provide arguments for format message to log.
@@ -473,7 +534,7 @@ private static void appendTupleTypeGenerics(StringBuilder sb, int numFields) { | |||
} | |||
|
|||
private static final String HEADER = | |||
"/*\n" | |||
"/*\n" |
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.
please revert this change
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
|
||
//CHECKSTYLE.OFF: AvoidStarImport|ImportOrder |
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.
I assume it isn't necessary changes
I'm closing this as "Abandoned", since there is no more activity and the code base has moved on quite a bit. Please re-open this if you feel otherwise and work should continue. |
[FLINK-2435] Provides the capability of specifying user-defined types in Tuple and Row 'containers' while reading from a csv file