Skip to content

Commit c7ceb97

Browse files
authored
Added change to datalake (Azure#13948)
1 parent c2c189c commit c7ceb97

File tree

4 files changed

+37
-34
lines changed

4 files changed

+37
-34
lines changed

sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQueryDelimitedSerialization.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
/**
77
* Defines the input or output delimited (CSV) serialization for a blob quick query request.
88
*/
9-
public class FileQueryDelimitedSerialization extends FileQuerySerialization {
9+
public class FileQueryDelimitedSerialization implements FileQuerySerialization {
1010

1111
private char columnSeparator;
1212
private char fieldQuote;
1313
private char escapeChar;
1414
private boolean headersPresent;
15+
private char recordSeparator;
1516

1617
/**
1718
* Gets the column separator.
@@ -85,9 +86,22 @@ public FileQueryDelimitedSerialization setHeadersPresent(boolean headersPresent)
8586
return this;
8687
}
8788

88-
@Override
89+
/**
90+
* Gets the record separator.
91+
*
92+
* @return the record separator.
93+
*/
94+
public char getRecordSeparator() {
95+
return recordSeparator;
96+
}
97+
98+
/**
99+
* Sets the record separator.
100+
* @param recordSeparator the record separator.
101+
* @return the updated FileQueryDelimitedSerialization object.
102+
*/
89103
public FileQueryDelimitedSerialization setRecordSeparator(char recordSeparator) {
90-
super.setRecordSeparator(recordSeparator);
104+
this.recordSeparator = recordSeparator;
91105
return this;
92106
}
93107
}

sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQueryJsonSerialization.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@
66
/**
77
* Defines the input or output JSON serialization for a file query request.
88
*/
9-
public class FileQueryJsonSerialization extends FileQuerySerialization {
9+
public class FileQueryJsonSerialization implements FileQuerySerialization {
1010

11-
@Override
11+
private char recordSeparator;
12+
13+
/**
14+
* Gets the record separator.
15+
*
16+
* @return the record separator.
17+
*/
18+
public char getRecordSeparator() {
19+
return recordSeparator;
20+
}
21+
22+
/**
23+
* Sets the record separator.
24+
* @param recordSeparator the record separator.
25+
* @return the updated FileQueryJsonSerialization object.
26+
*/
1227
public FileQueryJsonSerialization setRecordSeparator(char recordSeparator) {
13-
super.setRecordSeparator(recordSeparator);
28+
this.recordSeparator = recordSeparator;
1429
return this;
1530
}
1631
}

sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/FileQuerySerialization.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,5 @@
77
* Defines the input and output serialization for a file query request.
88
* either {@link FileQueryJsonSerialization} or {@link FileQueryDelimitedSerialization}
99
*/
10-
public abstract class FileQuerySerialization {
11-
12-
private char recordSeparator;
13-
14-
/**
15-
* Gets the record separator.
16-
*
17-
* @return the record separator.
18-
*/
19-
public char getRecordSeparator() {
20-
return recordSeparator;
21-
}
22-
23-
/**
24-
* Sets the record separator.
25-
* @param recordSeparator the record separator.
26-
* @return the updated FileQuerySerialization object.
27-
*/
28-
public FileQuerySerialization setRecordSeparator(char recordSeparator) {
29-
this.recordSeparator = recordSeparator;
30-
return this;
31-
}
10+
public interface FileQuerySerialization {
3211
}

sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/FileAPITest.groovy

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3373,11 +3373,6 @@ class FileAPITest extends APISpec {
33733373
}
33743374
}
33753375

3376-
class RandomOtherSerialization extends FileQuerySerialization {
3377-
@Override
3378-
public RandomOtherSerialization setRecordSeparator(char recordSeparator) {
3379-
this.recordSeparator = recordSeparator;
3380-
return this;
3381-
}
3376+
class RandomOtherSerialization implements FileQuerySerialization {
33823377
}
33833378
}

0 commit comments

Comments
 (0)