[ 
https://issues.apache.org/jira/browse/PHOENIX-6773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608127#comment-17608127
 ] 

ASF GitHub Bot commented on PHOENIX-6773:
-----------------------------------------

stoty commented on code in PR #1503:
URL: https://github.com/apache/phoenix/pull/1503#discussion_r977321314


##########
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java:
##########
@@ -852,7 +852,7 @@ public ResultSet getColumns(String catalog, String 
schemaPattern, String tableNa
                 cells.add(
                     PhoenixKeyValueUtil.newKeyValue(rowKey, TABLE_FAMILY_BYTES,
                         Bytes.toBytes(COLUMN_DEF),
-                        MetaDataProtocol.MIN_TABLE_TIMESTAMP, 
ByteUtil.EMPTY_BYTE_ARRAY));
+                        MetaDataProtocol.MIN_TABLE_TIMESTAMP, 
PVarchar.INSTANCE.toBytes(column.getExpressionStr())));

Review Comment:
   This is too long, break the line somewhere.





> PhoenixDatabaseMetadata.getColumns() always returns null COLUMN_DEF
> -------------------------------------------------------------------
>
>                 Key: PHOENIX-6773
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6773
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>            Reporter: Istvan Toth
>            Assignee: Aron Attila Meszaros
>            Priority: Minor
>              Labels: beginner
>
> The COLUMN_DEF column returned by PhoenixDatabaseMetadata.getColumns() is 
> constant null, even though Phoenix does support default values.
> Return the default value for the getColumn() call.
> Also check if we can return meaningful results for some of the other columns 
> where we unconditionally return null now.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to