morningman commented on code in PR #59060:
URL: https://github.com/apache/doris/pull/59060#discussion_r2638788473
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java:
##########
@@ -1206,27 +1206,32 @@ public List<SysTable> getSupportedSysTables() {
}
public TFileFormatType getFileFormatType(SessionVariable sessionVariable)
throws UserException {
- TFileFormatType type = null;
Table table = getRemoteTable();
String inputFormatName = table.getSd().getInputFormat();
+ String serDeLib = table.getSd().getSerdeInfo().getSerializationLib();
+ return getTFileFormatType(inputFormatName, serDeLib, sessionVariable,
firstColumnIsString(), getName());
+ }
+
+ public static TFileFormatType getTFileFormatType(String inputFormatName,
String serDeLib,
+ SessionVariable sessionVariable, boolean firstColumnIsString,
String tableName) throws UserException {
+ TFileFormatType type = null;
String hiveFormat =
HiveMetaStoreClientHelper.HiveFileFormat.getFormat(inputFormatName);
if
(hiveFormat.equals(HiveMetaStoreClientHelper.HiveFileFormat.PARQUET.getDesc()))
{
type = TFileFormatType.FORMAT_PARQUET;
} else if
(hiveFormat.equals(HiveMetaStoreClientHelper.HiveFileFormat.ORC.getDesc())) {
type = TFileFormatType.FORMAT_ORC;
} else if
(hiveFormat.equals(HiveMetaStoreClientHelper.HiveFileFormat.TEXT_FILE.getDesc()))
{
- String serDeLib =
table.getSd().getSerdeInfo().getSerializationLib();
if (serDeLib.equals(HiveMetaStoreClientHelper.HIVE_JSON_SERDE)
Review Comment:
serDeLib maybe null here
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]