Package io.substrait.relation.files
Class ImmutableFileFormat.DelimiterSeparatedTextReadOptions
java.lang.Object
io.substrait.relation.files.FileFormat.DelimiterSeparatedTextReadOptions
io.substrait.relation.files.ImmutableFileFormat.DelimiterSeparatedTextReadOptions
- All Implemented Interfaces:
FileFormat
- Enclosing class:
- ImmutableFileFormat
public static final class ImmutableFileFormat.DelimiterSeparatedTextReadOptions
extends FileFormat.DelimiterSeparatedTextReadOptions
Immutable implementation of
FileFormat.DelimiterSeparatedTextReadOptions.
Use the builder to create immutable instances:
ImmutableFileFormat.DelimiterSeparatedTextReadOptions.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeDelimiterSeparatedTextReadOptions.Nested classes/interfaces inherited from interface io.substrait.relation.files.FileFormat
FileFormat.ArrowReadOptions, FileFormat.DelimiterSeparatedTextReadOptions, FileFormat.DwrfReadOptions, FileFormat.Extension, FileFormat.OrcReadOptions, FileFormat.ParquetReadOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forDelimiterSeparatedTextReadOptions.Creates an immutable copy of aFileFormat.DelimiterSeparatedTextReadOptionsvalue.booleanThis instance is equal to all instances ofDelimiterSeparatedTextReadOptionsthat have equal attribute values.longlonggetQuote()inthashCode()Computes a hash code from attributes:fieldDelimiter,maxLineSize,quote,headerLinesToSkip,escape,valueTreatedAsNull.toString()Prints the immutable valueDelimiterSeparatedTextReadOptionswith attribute values.withEscape(String value) Copy the current immutable object by setting a value for theescapeattribute.withFieldDelimiter(String value) Copy the current immutable object by setting a value for thefieldDelimiterattribute.withHeaderLinesToSkip(long value) Copy the current immutable object by setting a value for theheaderLinesToSkipattribute.withMaxLineSize(long value) Copy the current immutable object by setting a value for themaxLineSizeattribute.Copy the current immutable object by setting a value for thequoteattribute.withValueTreatedAsNull(String value) Copy the current immutable object by setting a present value for the optionalvalueTreatedAsNullattribute.withValueTreatedAsNull(Optional<String> optional) Copy the current immutable object by setting an optional value for thevalueTreatedAsNullattribute.
-
Method Details
-
getFieldDelimiter
- Specified by:
getFieldDelimiterin classFileFormat.DelimiterSeparatedTextReadOptions- Returns:
- The value of the
fieldDelimiterattribute
-
getMaxLineSize
public long getMaxLineSize()- Specified by:
getMaxLineSizein classFileFormat.DelimiterSeparatedTextReadOptions- Returns:
- The value of the
maxLineSizeattribute
-
getQuote
- Specified by:
getQuotein classFileFormat.DelimiterSeparatedTextReadOptions- Returns:
- The value of the
quoteattribute
-
getHeaderLinesToSkip
public long getHeaderLinesToSkip()- Specified by:
getHeaderLinesToSkipin classFileFormat.DelimiterSeparatedTextReadOptions- Returns:
- The value of the
headerLinesToSkipattribute
-
getEscape
- Specified by:
getEscapein classFileFormat.DelimiterSeparatedTextReadOptions- Returns:
- The value of the
escapeattribute
-
getValueTreatedAsNull
- Specified by:
getValueTreatedAsNullin classFileFormat.DelimiterSeparatedTextReadOptions- Returns:
- The value of the
valueTreatedAsNullattribute
-
withFieldDelimiter
Copy the current immutable object by setting a value for thefieldDelimiterattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for fieldDelimiter- Returns:
- A modified copy or the
thisobject
-
withMaxLineSize
Copy the current immutable object by setting a value for themaxLineSizeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for maxLineSize- Returns:
- A modified copy or the
thisobject
-
withQuote
Copy the current immutable object by setting a value for thequoteattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for quote- Returns:
- A modified copy or the
thisobject
-
withHeaderLinesToSkip
public final ImmutableFileFormat.DelimiterSeparatedTextReadOptions withHeaderLinesToSkip(long value) Copy the current immutable object by setting a value for theheaderLinesToSkipattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for headerLinesToSkip- Returns:
- A modified copy or the
thisobject
-
withEscape
Copy the current immutable object by setting a value for theescapeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for escape- Returns:
- A modified copy or the
thisobject
-
withValueTreatedAsNull
public final ImmutableFileFormat.DelimiterSeparatedTextReadOptions withValueTreatedAsNull(String value) Copy the current immutable object by setting a present value for the optionalvalueTreatedAsNullattribute.- Parameters:
value- The value for valueTreatedAsNull- Returns:
- A modified copy or
thisif not changed
-
withValueTreatedAsNull
public final ImmutableFileFormat.DelimiterSeparatedTextReadOptions withValueTreatedAsNull(Optional<String> optional) Copy the current immutable object by setting an optional value for thevalueTreatedAsNullattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for valueTreatedAsNull- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofDelimiterSeparatedTextReadOptionsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:fieldDelimiter,maxLineSize,quote,headerLinesToSkip,escape,valueTreatedAsNull. -
toString
Prints the immutable valueDelimiterSeparatedTextReadOptionswith attribute values. -
copyOf
public static ImmutableFileFormat.DelimiterSeparatedTextReadOptions copyOf(FileFormat.DelimiterSeparatedTextReadOptions instance) Creates an immutable copy of aFileFormat.DelimiterSeparatedTextReadOptionsvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable DelimiterSeparatedTextReadOptions instance
-
builder
Creates a builder forDelimiterSeparatedTextReadOptions.ImmutableFileFormat.DelimiterSeparatedTextReadOptions.builder() .fieldDelimiter(String) // requiredfieldDelimiter.maxLineSize(long) // requiredmaxLineSize.quote(String) // requiredquote.headerLinesToSkip(long) // requiredheaderLinesToSkip.escape(String) // requiredescape.valueTreatedAsNull(Optional<String>) // optionalvalueTreatedAsNull.build();- Returns:
- A new DelimiterSeparatedTextReadOptions builder
-