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

[FLINK-2435] User-defined types in CsvReader #5862

Closed
wants to merge 2 commits into from

Conversation

DmitryKober
Copy link

[FLINK-2435] Provides the capability of specifying user-defined types in Tuple and Row 'containers' while reading from a csv file

…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.
*
Copy link

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

Copy link

@ex00 ex00 left a 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();
Copy link

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<>();
Copy link

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.");
Copy link

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"
Copy link

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
Copy link

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

@aljoscha
Copy link
Contributor

aljoscha commented Feb 5, 2020

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.

@aljoscha aljoscha closed this Feb 5, 2020
@aljoscha aljoscha self-assigned this Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants