You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "s7monk (via GitHub)" <gi...@apache.org> on 2024/07/09 10:31:48 UTC

[PR] [Bugfix] Fix the problem that the number of rows in the query result is 0 [paimon-webui]

s7monk opened a new pull request, #488:
URL: https://github.com/apache/paimon-webui/pull/488

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   Fix the problem that the number of rows in the query result is 0.
   
   ![微信截图_20240709182735](https://github.com/apache/paimon-webui/assets/34889415/043ecb7e-98da-44a2-87f8-f85cdda0fb03)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Bugfix] Fix the problem that the number of rows in the query result is 0 [paimon-webui]

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #488:
URL: https://github.com/apache/paimon-webui/pull/488#discussion_r1670399657


##########
paimon-web-ui/src/store/job/index.ts:
##########
@@ -79,10 +79,10 @@ export const useJobStore = defineStore({
       return (key) => {
         const initResultData = state.jobs[key]?.job?.resultData
         const refreshedResultData = state.jobs[key]?.jobResultData?.resultData
-        if (initResultData)
+        if (initResultData && initResultData.length > 0)

Review Comment:
   I don't think this should add this condition.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Bugfix] Fix the problem that the number of rows in the query result is 0 [paimon-webui]

Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #488:
URL: https://github.com/apache/paimon-webui/pull/488#discussion_r1670570110


##########
paimon-web-ui/src/store/job/index.ts:
##########
@@ -79,10 +79,10 @@ export const useJobStore = defineStore({
       return (key) => {
         const initResultData = state.jobs[key]?.job?.resultData
         const refreshedResultData = state.jobs[key]?.jobResultData?.resultData
-        if (initResultData)
+        if (initResultData && initResultData.length > 0)

Review Comment:
   If this condition is not added, the result is not as expected, and the rows of the query result data are 0.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Bugfix] Fix the problem that the number of rows in the query result is 0 [paimon-webui]

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #488:
URL: https://github.com/apache/paimon-webui/pull/488#discussion_r1671563211


##########
paimon-web-ui/src/store/job/index.ts:
##########
@@ -79,10 +79,10 @@ export const useJobStore = defineStore({
       return (key) => {
         const initResultData = state.jobs[key]?.job?.resultData
         const refreshedResultData = state.jobs[key]?.jobResultData?.resultData
-        if (initResultData)
+        if (initResultData && initResultData.length > 0)

Review Comment:
   @s7monk, could you explain the reason why need to add this condition?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Bugfix] Fix zero number of rows in the query result [paimon-webui]

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas merged PR #488:
URL: https://github.com/apache/paimon-webui/pull/488


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Bugfix] Fix the problem that the number of rows in the query result is 0 [paimon-webui]

Posted by "s7monk (via GitHub)" <gi...@apache.org>.
s7monk commented on code in PR #488:
URL: https://github.com/apache/paimon-webui/pull/488#discussion_r1671599300


##########
paimon-web-ui/src/store/job/index.ts:
##########
@@ -79,10 +79,10 @@ export const useJobStore = defineStore({
       return (key) => {
         const initResultData = state.jobs[key]?.job?.resultData
         const refreshedResultData = state.jobs[key]?.jobResultData?.resultData
-        if (initResultData)
+        if (initResultData && initResultData.length > 0)

Review Comment:
   The type of initResultData is ResultDataItem[] | undefined. If only if (initResultData) can only judge the case where it is not undefined, this branch will be entered when initResultData is an empty array, so initResultData.length is returned, which is exactly 0. This is my understanding.
   
   ![image](https://github.com/apache/paimon-webui/assets/34889415/fabba470-11cf-4263-8907-3d6eafc44cea)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org