Skip to content

Commit

Permalink
add query prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Dec 26, 2024
1 parent 7e27dc5 commit 7e85bed
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

public class DorisFlightValueReader extends ValueReader implements AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(DorisFlightValueReader.class);
private static final String PREFIX = "/* ApplicationName=Flink ArrowFlightSQL Query */";

protected AdbcConnection client;
protected Lock clientLock = new ReentrantLock();

Expand Down Expand Up @@ -117,7 +119,8 @@ private String parseFlightSql(
Arrays.stream(tableIdentifiers)
.map(v -> "`" + v + "`")
.collect(Collectors.joining("."));
String sql = "SELECT " + readFields + " FROM " + queryTable;

String sql = PREFIX + " SELECT " + readFields + " FROM " + queryTable;
if (CollectionUtils.isNotEmpty(partition.getTabletIds())) {
String tablet =
partition.getTabletIds().stream()
Expand Down

0 comments on commit 7e85bed

Please sign in to comment.