Skip to content

Commit

Permalink
support null
Browse files Browse the repository at this point in the history
  • Loading branch information
peacewong committed Oct 4, 2023
1 parent 7d5b9cb commit 4ef786f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ object ResultSetAction {
private var pageSize: Int = _
private var charset: String = Configuration.BDP_ENCODING.getValue

// default value is :org.apache.linkis.storage.domain.Dolphin.LINKIS_NULL
private var nullValue: String = "LINKIS_NULL"

def setUser(user: String): Builder = {
this.user = user
this
Expand All @@ -60,6 +63,11 @@ object ResultSetAction {
this
}

def setNullValue(nullValue: String): Builder = {
this.nullValue = nullValue
this
}

def build(): ResultSetAction = {
if (user == null) throw new UJESClientBuilderException("user is needed!")
if (path == null) throw new UJESClientBuilderException("path is needed!")
Expand All @@ -68,6 +76,7 @@ object ResultSetAction {
if (page > 0) resultSetAction.setParameter("page", page)
if (pageSize > 0) resultSetAction.setParameter("pageSize", pageSize)
resultSetAction.setParameter("charset", charset)
resultSetAction.setParameter("nullValue", nullValue)
resultSetAction.setUser(user)
resultSetAction
}
Expand Down

0 comments on commit 4ef786f

Please sign in to comment.