You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by fe...@apache.org on 2023/04/12 07:25:29 UTC
[kyuubi] branch branch-1.7 updated: [KYUUBI #4691] [REST] Configure FAIL_ON_UNKNOWN_PROPERTIES to false for KyuubiScalaObjectMapper
This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.7 by this push:
new b6cf9e7f7 [KYUUBI #4691] [REST] Configure FAIL_ON_UNKNOWN_PROPERTIES to false for KyuubiScalaObjectMapper
b6cf9e7f7 is described below
commit b6cf9e7f761270cd6b864c638dc5e94318e40c51
Author: fwang12 <fw...@ebay.com>
AuthorDate: Wed Apr 12 15:25:08 2023 +0800
[KYUUBI #4691] [REST] Configure FAIL_ON_UNKNOWN_PROPERTIES to false for KyuubiScalaObjectMapper
### _Why are the changes needed?_
Do not failed on unknown properties in server side.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #4691 from turboFei/ignore.
Closes #4691
a03cb5be0 [fwang12] Ignore
c406878e7 [fwang12] Fast return batch info when post batches
Authored-by: fwang12 <fw...@ebay.com>
Signed-off-by: fwang12 <fw...@ebay.com>
(cherry picked from commit fa60e4c70be38bd87fefe50558277fa90a632c1e)
Signed-off-by: fwang12 <fw...@ebay.com>
---
.../org/apache/kyuubi/server/api/KyuubiScalaObjectMapper.scala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/KyuubiScalaObjectMapper.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/KyuubiScalaObjectMapper.scala
index 776c35ba7..724da1209 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/KyuubiScalaObjectMapper.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/KyuubiScalaObjectMapper.scala
@@ -19,11 +19,13 @@ package org.apache.kyuubi.server.api
import javax.ws.rs.ext.ContextResolver
-import com.fasterxml.jackson.databind.ObjectMapper
+import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper}
import com.fasterxml.jackson.module.scala.DefaultScalaModule
class KyuubiScalaObjectMapper extends ContextResolver[ObjectMapper] {
- private val mapper = new ObjectMapper().registerModule(DefaultScalaModule)
+ private val mapper = new ObjectMapper()
+ .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
+ .registerModule(DefaultScalaModule)
override def getContext(aClass: Class[_]): ObjectMapper = mapper
}