You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/12 21:04:00 UTC

[GitHub] [incubator-druid] vogievetsky commented on a change in pull request #7463: Display null in SQL table cell

vogievetsky commented on a change in pull request #7463: Display null in SQL table cell
URL: https://github.com/apache/incubator-druid/pull/7463#discussion_r275063979
 
 

 ##########
 File path: web-console/src/views/sql-view.tsx
 ##########
 @@ -195,7 +195,17 @@ export class SqlView extends React.Component<SqlViewProps, SqlViewState> {
       loading={loading}
       noDataText={!loading && result && !result.rows.length ? 'No results' : (error || '')}
       sortable={false}
-      columns={(result ? result.header : []).map((h: any, i) => ({ Header: h, accessor: String(i) }))}
+      columns={(result ? result.header : []).map((h: any, i) => {
+          return {
+            Header: h,
+            accessor: String(i),
+            Cell: row => {
+              const value = row.value;
+              if (value === '' || value === null) return <span className="null-table-cell">null</span>;
+              return value;
+            }
+          };
+        })}
 
 Review comment:
   Could you de-indent by 1 click (2 spaces)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org